Submission #1347573


Source Code Expand

a[8],c,n;main(i){for(scanf("%*d");~scanf("%d",&i);i<8?++a[i]:++n)i/=400;for(i=0;i<8;)c+=a[i++]||0;printf("%d %d\n",c?c:1,c+n);}

Submission Info

Submission Time
Task C - Colorful Leaderboard
User Double_oxygeN
Language C (GCC 5.4.1)
Score 300
Code Size 127 Byte
Status AC
Exec Time 0 ms
Memory 128 KB

Compile Error

./Main.c:1:1: warning: data definition has no type or storage class
 a[8],c,n;main(i){for(scanf("%*d");~scanf("%d",&i);i<8?++a[i]:++n)i/=400;for(i=0;i<8;)c+=a[i++]||0;printf("%d %d\n",c?c:1,c+n);}
 ^
./Main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int]
./Main.c:1:6: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int]
 a[8],c,n;main(i){for(scanf("%*d");~scanf("%d",&i);i<8?++a[i]:++n)i/=400;for(i=0;i<8;)c+=a[i++]||0;printf("%d %d\n",c?c:1,c+n);}
      ^
./Main.c:1:8: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int]
 a[8],c,n;main(i){for(scanf("%*d");~scanf("%d",&i);i<8?++a[i]:++n)i/=400;for(i=0;i<8;)c+=a[i++]||0;printf("%d %d\n",c?c:1,c+n);}
        ^
./Main.c:1:10: warning: return type defaults to ‘int’ [-Wimplicit-int]
 a[8],c,n;main(i){for(scanf("%*d");~scanf("%d",&i);i<8?++a[i]:++n)i/=400;for(i=0;i<8;)c+=a[i++]||0;printf("%d %d\n",c?c:1,c+n);}
          ^
./Main.c: In function ‘main’:
./Main.c:1:10: warning: type of ‘i’ defaults to ‘in...

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 8
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All in1.txt, in2.txt, in3.txt, in4.txt, in5.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
in1.txt AC 0 ms 128 KB
in2.txt AC 0 ms 128 KB
in3.txt AC 0 ms 128 KB
in4.txt AC 0 ms 128 KB
in5.txt AC 0 ms 128 KB
s1.txt AC 0 ms 128 KB
s2.txt AC 0 ms 128 KB
s3.txt AC 0 ms 128 KB