Submission #1956969
Source Code Expand
c,h[999];main(){for(;~scanf("%d",h);)c+=c?!h[*h]++:1;printf("%d",~-c);}
Submission Info
Submission Time | |
---|---|
Task | B - Kagami Mochi |
User | masakt |
Language | C (GCC 5.4.1) |
Score | 200 |
Code Size | 71 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 128 KB |
Compile Error
./Main.c:1:1: warning: data definition has no type or storage class c,h[999];main(){for(;~scanf("%d",h);)c+=c?!h[*h]++:1;printf("%d",~-c);} ^ ./Main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int] ./Main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘h’ [-Wimplicit-int] c,h[999];main(){for(;~scanf("%d",h);)c+=c?!h[*h]++:1;printf("%d",~-c);} ^ ./Main.c:1:10: warning: return type defaults to ‘int’ [-Wimplicit-int] c,h[999];main(){for(;~scanf("%d",h);)c+=c?!h[*h]++:1;printf("%d",~-c);} ^ ./Main.c: In function ‘main’: ./Main.c:1:23: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] c,h[999];main(){for(;~scanf("%d",h);)c+=c?!h[*h]++:1;printf("%d",~-c);} ^ ./Main.c:1:23: warning: incompatible implicit declaration of built-in function ‘scanf’ ./Main.c:1:23: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ ./Main.c:1:54: warning: implicit declaration of function ‘printf’ [-Wimplicit-functio...
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | a01, a02, a03 |
All | a01, a02, a03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
a01 | AC | 1 ms | 128 KB |
a02 | AC | 1 ms | 128 KB |
a03 | AC | 1 ms | 128 KB |
b04 | AC | 1 ms | 128 KB |
b05 | AC | 1 ms | 128 KB |
b06 | AC | 1 ms | 128 KB |
b07 | AC | 1 ms | 128 KB |
b08 | AC | 1 ms | 128 KB |
b09 | AC | 1 ms | 128 KB |
b10 | AC | 1 ms | 128 KB |
b11 | AC | 1 ms | 128 KB |
b12 | AC | 1 ms | 128 KB |
b13 | AC | 1 ms | 128 KB |