# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
159747 | 2019-10-24T12:22:02 Z | geon040702 | None (KOI17_card) | C++14 | 12 ms | 568 KB |
#include <bits/stdc++.h> using namespace std; int N, a; int A[5]; int B[5]; int main(void) { int i, j, x; for(j=0;j<5;j++) { A[j] = 0; B[j] = 0; } scanf("%d", &N); for(i=0;i<N;i++) { scanf("%d", &a); for(j=0;j<a;j++) { scanf("%d", &x); A[x]+=1; } scanf("%d", &a); for(j=0;j<a;j++) { scanf("%d", &x); B[x]+=1; } for(j=4;j>=0;j--) { if(j == 0) { printf("D\n"); break; } if(A[j] != B[j]) { if(A[j] > B[j]) { printf("A\n"); break; } else { printf("B\n"); break; } } } for(j=0;j<5;j++) { A[j] = 0; B[j] = 0; } } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 376 KB | Output is correct |
2 | Correct | 4 ms | 376 KB | Output is correct |
3 | Correct | 5 ms | 376 KB | Output is correct |
4 | Correct | 6 ms | 376 KB | Output is correct |
5 | Correct | 7 ms | 376 KB | Output is correct |
6 | Correct | 11 ms | 504 KB | Output is correct |
7 | Correct | 11 ms | 504 KB | Output is correct |
8 | Correct | 11 ms | 504 KB | Output is correct |
9 | Correct | 11 ms | 504 KB | Output is correct |
10 | Correct | 11 ms | 504 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Correct | 3 ms | 376 KB | Output is correct |
5 | Correct | 4 ms | 376 KB | Output is correct |
6 | Correct | 5 ms | 376 KB | Output is correct |
7 | Correct | 6 ms | 376 KB | Output is correct |
8 | Correct | 7 ms | 376 KB | Output is correct |
9 | Correct | 11 ms | 504 KB | Output is correct |
10 | Correct | 11 ms | 504 KB | Output is correct |
11 | Correct | 11 ms | 504 KB | Output is correct |
12 | Correct | 11 ms | 504 KB | Output is correct |
13 | Correct | 11 ms | 504 KB | Output is correct |
14 | Correct | 10 ms | 508 KB | Output is correct |
15 | Correct | 10 ms | 504 KB | Output is correct |
16 | Correct | 11 ms | 504 KB | Output is correct |
17 | Correct | 11 ms | 564 KB | Output is correct |
18 | Correct | 12 ms | 504 KB | Output is correct |
19 | Correct | 11 ms | 504 KB | Output is correct |
20 | Correct | 11 ms | 568 KB | Output is correct |
21 | Correct | 11 ms | 504 KB | Output is correct |
22 | Correct | 11 ms | 504 KB | Output is correct |
23 | Correct | 11 ms | 504 KB | Output is correct |