Submission #1371789
Source Code Expand
#include <cstdio> #define MAXN 100 //FILE *fin=fopen("a.in","r"); //FILE *fout=fopen("a.out", "w"); int f[3]; char m[3][MAXN+1]; int card(int n) { if(f[n] > 0) { char x = m[n][f[n]]; f[n]--; card(x-'a'); } else { return n; } } int main() { int rez; char castigator; for(int n = 0; n <= 2; n++) { char ch = fgetc(stdin); while(ch != '\n') { f[n]++; m[n][f[n]] = ch; char ch = fgetc(stdin); } } rez = card(0); castigator = 'A'+rez; printf("%c", castigator); return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Card Game for Three (ABC Edit) |
User | FizZ |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 642 Byte |
Status | RE |
Exec Time | 98 ms |
Memory | 128 KB |
Judge Result
Set Name | Sample | All | ||
---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||
Status | AC |
|
Set Name | Test Cases |
---|---|
Sample | |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, sample_01.txt, sample_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | RE | 98 ms | 128 KB |
02.txt | RE | 97 ms | 128 KB |
03.txt | RE | 97 ms | 128 KB |
04.txt | RE | 97 ms | 128 KB |
05.txt | RE | 97 ms | 128 KB |
06.txt | RE | 96 ms | 128 KB |
07.txt | RE | 98 ms | 128 KB |
08.txt | RE | 98 ms | 128 KB |
09.txt | RE | 98 ms | 128 KB |
10.txt | RE | 98 ms | 128 KB |
sample_01.txt | RE | 97 ms | 128 KB |
sample_02.txt | RE | 98 ms | 128 KB |