Submission #260052
Source Code Expand
int main(){ int N,i,j,box; char a; int Sh[50]={0},Sm[50]={0},Eh[50]={0},Em[50]={0},S[50]={0},E[50]={0}; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%d-%d",&S[i],&E[i]); Sh[i] = S[i]/100; Sm[i] = S[i]-Sh[i]*100; Eh[i] = E[i]/100; Em[i] = E[i]-Eh[i]*100; Sm[i] = Sm[i] - (Sm[i]%5); if(Em[i]%5 != 0){ Em[i] = (5 - Em[i]%5)+Em[i]; } if(Em[i]==60){ Eh[i]=Eh[i]+1; Em[i]=00; } S[i]=(Sh[i]*100)+Sm[i]; E[i]=(Eh[i]*100)+Em[i]; } for(i=0;i<N;i++){ for(j=i+1;j<N;j++){ if(S[i]>=S[j]){ box=S[i]; S[i]=S[j]; S[j]=box; } if(E[i]>E[j]){ box=E[i]; E[i]=E[j]; E[j]=box; } } } for(i=1;i<N;i++){ if(E[i-1]>=S[i]){ S[i]=S[i-1]; E[i-1]=E[i]; } } for(i=0;i<N;i++){ if(N == 1){ printf("%04d-%04d\n",S[0],E[0]); }else{ if(S[i] == S[i+1]){ S[i]=0; E[i]=0; } if(S[i]!=0){ printf("%04d-%04d\n",S[i],E[i]); } } } return 0; }
Submission Info
Submission Time | |
---|---|
Task | D - 感雨時刻の整理 |
User | ne260141 |
Language | C (GCC 4.6.4) |
Score | 0 |
Code Size | 1382 Byte |
Status | RE |
Exec Time | 326 ms |
Memory | 808 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:6:5: warning: incompatible implicit declaration of built-in function ‘scanf’ [enabled by default] ./Main.c:47:13: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default] ./Main.c:54:17: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
Judge Result
Set Name | all | ||||
---|---|---|---|---|---|
Score / Max Score | 0 / 100 | ||||
Status |
|
Set Name | Test Cases |
---|---|
all | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, cho_cho_chokudai.txt, chokudai_ga_cho.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt, test_31.txt, test_32.txt, test_33.txt, test_34.txt, test_35.txt, test_36.txt, test_37.txt, test_38.txt, test_39.txt, test_40.txt, test_41.txt, test_42.txt, test_43.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | AC | 25 ms | 700 KB |
00_sample_02.txt | AC | 24 ms | 704 KB |
00_sample_03.txt | AC | 24 ms | 672 KB |
cho_cho_chokudai.txt | RE | 275 ms | 800 KB |
chokudai_ga_cho.txt | RE | 301 ms | 792 KB |
test_01.txt | RE | 278 ms | 792 KB |
test_02.txt | RE | 275 ms | 676 KB |
test_03.txt | RE | 299 ms | 668 KB |
test_04.txt | RE | 326 ms | 648 KB |
test_05.txt | RE | 309 ms | 792 KB |
test_06.txt | RE | 294 ms | 676 KB |
test_07.txt | RE | 280 ms | 676 KB |
test_08.txt | RE | 263 ms | 672 KB |
test_09.txt | RE | 299 ms | 804 KB |
test_10.txt | RE | 278 ms | 676 KB |
test_11.txt | RE | 300 ms | 704 KB |
test_12.txt | RE | 304 ms | 680 KB |
test_13.txt | RE | 296 ms | 680 KB |
test_14.txt | RE | 268 ms | 748 KB |
test_15.txt | RE | 288 ms | 720 KB |
test_16.txt | RE | 267 ms | 676 KB |
test_17.txt | RE | 305 ms | 804 KB |
test_18.txt | RE | 286 ms | 672 KB |
test_19.txt | RE | 311 ms | 672 KB |
test_20.txt | RE | 307 ms | 792 KB |
test_21.txt | RE | 295 ms | 800 KB |
test_22.txt | RE | 296 ms | 680 KB |
test_23.txt | RE | 310 ms | 808 KB |
test_24.txt | RE | 284 ms | 792 KB |
test_25.txt | RE | 271 ms | 804 KB |
test_26.txt | RE | 302 ms | 796 KB |
test_27.txt | RE | 289 ms | 680 KB |
test_28.txt | RE | 292 ms | 672 KB |
test_29.txt | AC | 23 ms | 796 KB |
test_30.txt | AC | 23 ms | 708 KB |
test_31.txt | RE | 285 ms | 796 KB |
test_32.txt | AC | 22 ms | 712 KB |
test_33.txt | RE | 282 ms | 676 KB |
test_34.txt | AC | 25 ms | 748 KB |
test_35.txt | RE | 287 ms | 800 KB |
test_36.txt | RE | 287 ms | 804 KB |
test_37.txt | RE | 272 ms | 680 KB |
test_38.txt | RE | 278 ms | 796 KB |
test_39.txt | RE | 321 ms | 780 KB |
test_40.txt | RE | 297 ms | 676 KB |
test_41.txt | RE | 298 ms | 796 KB |
test_42.txt | RE | 273 ms | 800 KB |
test_43.txt | RE | 301 ms | 804 KB |