1 /* 2 m数组记录出现的花色和数值,按照数值每5个搜索,看看有几个已满足,剩下 5 - cnt需要替换 3 ╰· 4 */ 5 #include6 #include 7 #include 8 #include 9 #include 10 using namespace std;11 12 const int MAXN = 1e4 + 10;13 const int INF = 0x3f3f3f3f;14 15 int main(void) //BestCoder Round #41 1001 ZCC loves straight flush16 {17 //freopen ("A.in", "r", stdin);18 19 int t;20 scanf ("%d", &t);21 while (t--)22 {23 int c[5], d[5], m[5][20];24 memset (m, 0, sizeof (m));25 string s;26 for (int i=0; i<5; ++i)27 {28 cin >> s; c[i] = s[0] - 'A';29 if (s.size () == 2) d[i] = s[1] - '0';30 else d[i] = 10 + s[2] - '0';31 m[c[i]][d[i]]++;32 }33 34 int mn = INF;35 for (int i=0; i<5; ++i)36 {37 int d = c[i];38 for (int j=1; j<=10; ++j)39 {40 int cnt = 0;41 for (int k=j; k