Submission #907672
Source Code Expand
r,d;main(c){for(;~(c=getchar());r=r>d?r:d)d+=(c=='T')*2-1;printf("%d\n",r*2);}
Submission Info
Submission Time | |
---|---|
Task | A - STring |
User | leafmoon |
Language | C (GCC 5.4.1) |
Score | 300 |
Code Size | 78 Byte |
Status | AC |
Exec Time | 3 ms |
Memory | 128 KB |
Compile Error
./Main.c:1:1: warning: data definition has no type or storage class r,d;main(c){for(;~(c=getchar());r=r>d?r:d)d+=(c=='T')*2-1;printf("%d\n",r*2);} ^ ./Main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘r’ [-Wimplicit-int] ./Main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘d’ [-Wimplicit-int] r,d;main(c){for(;~(c=getchar());r=r>d?r:d)d+=(c=='T')*2-1;printf("%d\n",r*2);} ^ ./Main.c:1:5: warning: return type defaults to ‘int’ [-Wimplicit-int] r,d;main(c){for(;~(c=getchar());r=r>d?r:d)d+=(c=='T')*2-1;printf("%d\n",r*2);} ^ ./Main.c: In function ‘main’: ./Main.c:1:5: warning: type of ‘c’ defaults to ‘int’ [-Wimplicit-int] ./Main.c:1:22: warning: implicit declaration of function ‘getchar’ [-Wimplicit-function-declaration] r,d;main(c){for(;~(c=getchar());r=r>d?r:d)d+=(c=='T')*2-1;printf("%d\n",r*2);} ^ ./Main.c:1:59: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] r,d;main(c){for(;~(c=getchar());r=r>d?r:d)d+=(c=='T')*2...
Judge Result
Set Name | Sample | Subtask1 | All | ||||||
---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | 100 / 100 | ||||||
Status |
|
|
|
Set Name | Test Cases |
---|---|
Sample | example0, example1, example2 |
Subtask1 | example0, example1, example2, sub_corner0, sub_corner1, sub_corner2, sub_rand0, handmade0, handmade1 |
All | corner0, corner1, corner2, example0, example1, example2, handmade0, handmade1, maxrand0, sub_corner0, sub_corner1, sub_corner2, sub_rand0 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
corner0 | AC | 3 ms | 128 KB |
corner1 | AC | 3 ms | 128 KB |
corner2 | AC | 3 ms | 128 KB |
example0 | AC | 1 ms | 128 KB |
example1 | AC | 1 ms | 128 KB |
example2 | AC | 1 ms | 128 KB |
handmade0 | AC | 1 ms | 128 KB |
handmade1 | AC | 1 ms | 128 KB |
maxrand0 | AC | 3 ms | 128 KB |
sub_corner0 | AC | 1 ms | 128 KB |
sub_corner1 | AC | 1 ms | 128 KB |
sub_corner2 | AC | 1 ms | 128 KB |
sub_rand0 | AC | 1 ms | 128 KB |