coderforce 519A A and B and Chess
来源:互联网 发布:c语言实验转换字母 编辑:程序博客网 时间:2024/06/06 05:37
水题不解释,仔细读题皆可
#include<stdio.h>#include<string.h>#include<algorithm>const int maxm=50;char map[maxm][maxm];int main(){ int sum1=0,sum2=0; for(int i=0; i<8; i++) { scanf("%s",map[i]); } for(int i=0; i<8; i++) { for(int j=0; j<8; j++) { if(map[i][j]=='Q') { sum1+=9; } else if(map[i][j]=='R') { sum1+=5; } else if(map[i][j]=='B'||map[i][j]=='N') { sum1+=3; } else if(map[i][j]=='P') { sum1+=1; } else if(map[i][j]=='q') { sum2+=9; } else if(map[i][j]=='r') { sum2+=5; } else if(map[i][j]=='b'||map[i][j]=='n') { sum2+=3; } else if(map[i][j]=='p') { sum2+=1; } } } if(sum1==sum2) { printf("Draw\n"); } else if(sum1>sum2) { printf("White\n"); } else { printf("Black\n"); } return 0;}
0 0
- coderforce 519A A and B and Chess
- A and B and Chess 519A
- coderforce 519C A and B and Team Training
- coderforce 519D A and B and Interesting Substrings
- A. A and B and Chess
- 519A - A and B and Chess【implementation】
- coderforce B .A and B and Compilation Errors
- coderforce A.Ilya and Diplomas
- A. Kalevitch and Chess
- coderforce 296A Yaroslav and Permutations
- coderforce 580A Kefa and First Steps
- coderforce 573A Bear and Poker
- coderforce 574A Bear and Elections
- coderforce 551A - GukiZ and Contest
- coderforce 587A Duff and Weight Lifting
- coderforce 525A Vitaliy and Pie
- coderforce 552A. Vanya and Table
- coderforce 535A. Tavas and Nafas
- 可变参数宏 __VA_ARGS__
- 递归
- iOS多线程总结
- [note]linux和win7双系统下启动项丢失问题
- 数据库资料整理
- coderforce 519A A and B and Chess
- 雾天和水下图像增强仿真
- sql小结
- Week3-1Semantic similarity:Synonymy and other Semantic Relations
- php snmp counter64 无法显示
- Name for argument type [java.lang.String] not available, and parameter name information not found in
- 动态规划
- LightOJ 1002 Country Roads
- 安装操作系统centos6.5手动分区以及设置网络连通性