MSBOP 2015 Round2B register

Ended

Participants:6187

Verdict:AC | RE
Submitted:2015-04-26 15:32:55

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<iostream>
using namespace std;
int main()
{
    int T;
    cin >> T;
    int *ans=new int[T];
    for (int i = 0; i < T; i++)
    {
        int N;
        cin >> N;
        char pocker[5][2];
        for (int j = 0; j < N; j++)
        {
            cin >> pocker[j][0] >> pocker[j][1];
        }
        if (N == 1)
        {
            ans[i] = 1;
        }
        if (N == 2)
        {
            if (pocker[0][0] != pocker[1][0])
                ans[i] = 2;
            else
                ans[i] = 0;
        }
        if (N == 3)
        {
            if (pocker[0][0] == pocker[1][0] && pocker[0][0] == pocker[2][0])
                ans[i] = 0;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX