题目链接:https://nanti.jisuanke.com/t/41408
题目意思很简单,就是个模拟过程。
1 #include <iostream> 2 #include <cstring> 3 #include <algorithm> 4 #include <cstdio> 5 #include <map> 6 #define rep(i,j,k) for(int i = (j); i <= (k); ++i) 7 #define per(i,j,k) for(int i = (j); i >= (k); --i) 8 #define rep__(i,j,k) for(int i = (j); i < (k); ++i) 9 #define per__(i,j,k) for(int i = (j); i > (k); --i) 10 #define inf 1e9 11 using namespace std; 12 typedef long long LL; 13 const int N = (int)1e5 + 10; 14 15 // map<char,int > mp; 16 struct node{ 17 char name[20]; 18 int card[20]; 19 bool pair; 20 int rank_1,rank_2; 21 int sum; 22 23 void fun(char* tmp){ 24 rep__(i,0,20) card[i] = 0; 25 rank_1 = rank_2 = 0; 26 pair = false; 27 sum = 0; 28 int i = 0; 29 while(tmp[i] != '