Submission #5785352


Source Code Expand

o[1<<17];e[1<<17];i;f;s;g;t;main(a,b){for(;~scanf("%d",&a);)i++?i%2?b=++e[a],b>e[f]?s=f,f=a:b>e[s]&&f-a?s=a:0:(b=++o[a],b>o[g]?t=g,g=a:b>o[t]&&g-a?t=a:0):0;printf("%.f",i-1-(f-g?e[f]+o[g]:fmax(e[f]+o[t],e[s]+o[g])));}

Submission Info

Submission Time
Task C - /\/\/\/
User myun
Language C (GCC 5.4.1)
Score 300
Code Size 217 Byte
Status AC
Exec Time 11 ms
Memory 896 KB

Compile Error

./Main.c:1:1: warning: data definition has no type or storage class
 o[1<<17];e[1<<17];i;f;s;g;t;main(a,b){for(;~scanf("%d",&a);)i++?i%2?b=++e[a],b>e[f]?s=f,f=a:b>e[s]&&f-a?s=a:0:(b=++o[a],b>o[g]?t=g,g=a:b>o[t]&&g-a?t=a:0):0;printf("%.f",i-1-(f-g?e[f]+o[g]:fmax(e[f]+o[t],e[s]+o[g])));}
 ^
./Main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘o’ [-Wimplicit-int]
./Main.c:1:10: warning: data definition has no type or storage class
 o[1<<17];e[1<<17];i;f;s;g;t;main(a,b){for(;~scanf("%d",&a);)i++?i%2?b=++e[a],b>e[f]?s=f,f=a:b>e[s]&&f-a?s=a:0:(b=++o[a],b>o[g]?t=g,g=a:b>o[t]&&g-a?t=a:0):0;printf("%.f",i-1-(f-g?e[f]+o[g]:fmax(e[f]+o[t],e[s]+o[g])));}
          ^
./Main.c:1:10: warning: type defaults to ‘int’ in declaration of ‘e’ [-Wimplicit-int]
./Main.c:1:19: warning: data definition has no type or storage class
 o[1<<17];e[1<<17];i;f;s;g;t;main(a,b){for(;~scanf("%d",&a);)i++?i%2?b=++e[a],b>e[f]?s=f,f=a:b>e[s]&&f-a?s=a:0:(b=++o[a],b>o[g]?t=g,g=a:b>o[t]&&g-a?t=a:0):0;printf("%.f",i-1-(f-g?e[f]+o[g]:fmax(...

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 20
Set Name Test Cases
Sample sample1_3132.txt, sample2_iw.txt, sample3_1111.txt
All ababa_0.txt, ababa_1.txt, eq_0.txt, eq_1.txt, rnd_17.txt, sample1_3132.txt, sample2_iw.txt, sample3_1111.txt, top2_0.txt, top2_1.txt, top2_2.txt, top2_3.txt, top2modoki_0.txt, top2modoki_1.txt, top2modoki_2.txt, top2modoki_3.txt, vary_1.txt, vary_2.txt, vary_3.txt, zoro_0.txt
Case Name Status Exec Time Memory
ababa_0.txt AC 10 ms 512 KB
ababa_1.txt AC 10 ms 512 KB
eq_0.txt AC 10 ms 256 KB
eq_1.txt AC 10 ms 256 KB
rnd_17.txt AC 10 ms 256 KB
sample1_3132.txt AC 1 ms 128 KB
sample2_iw.txt AC 1 ms 128 KB
sample3_1111.txt AC 1 ms 128 KB
top2_0.txt AC 11 ms 896 KB
top2_1.txt AC 11 ms 896 KB
top2_2.txt AC 11 ms 896 KB
top2_3.txt AC 11 ms 896 KB
top2modoki_0.txt AC 11 ms 896 KB
top2modoki_1.txt AC 11 ms 896 KB
top2modoki_2.txt AC 11 ms 896 KB
top2modoki_3.txt AC 11 ms 896 KB
vary_1.txt AC 11 ms 896 KB
vary_2.txt AC 11 ms 896 KB
vary_3.txt AC 11 ms 896 KB
zoro_0.txt AC 1 ms 128 KB