题目链接:hdu 4461 The Power of Xiangqi
题目大意:两方下象棋,给定两方剩余棋子的种类,根据能力值评估胜者,特殊条件为如果没有马或者炮,战斗力要减
1,如果本来就是1就不用减了。
解题思路:水题,模拟计算。
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int g[10] = {16, 7, 8, 1, 1, 2, 3};
int solve () {
char s[3];
int n, ret = 0, v[10];
memset(v, 0, sizeof(v));
scanf("%d", &n);
while (n--) {
scanf("%s......
阅读全文