Submission #260590
Source Code Expand
#include <stdio.h> int main(){ int N,i,j,box; int Sh[30000]={0},Sm[30000]={0},Eh[30000]={0},Em[30000]={0},S[30000]={0},E[30000]={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; } } printf("あああ%d-%d\n",S[i],E[i]); } 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]=-1; E[i]=-1; } if(S[i]!=-1){ 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 | 1459 Byte |
Status | WA |
Exec Time | 2035 ms |
Memory | 1080 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:7:10: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] ./Main.c:9:14: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
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 | WA | 25 ms | 1052 KB |
00_sample_02.txt | WA | 23 ms | 928 KB |
00_sample_03.txt | WA | 24 ms | 928 KB |
cho_cho_chokudai.txt | WA | 810 ms | 928 KB |
chokudai_ga_cho.txt | WA | 918 ms | 928 KB |
test_01.txt | WA | 25 ms | 936 KB |
test_02.txt | WA | 22 ms | 928 KB |
test_03.txt | WA | 22 ms | 928 KB |
test_04.txt | WA | 22 ms | 932 KB |
test_05.txt | WA | 24 ms | 1052 KB |
test_06.txt | WA | 22 ms | 1064 KB |
test_07.txt | WA | 23 ms | 920 KB |
test_08.txt | WA | 25 ms | 932 KB |
test_09.txt | WA | 23 ms | 924 KB |
test_10.txt | WA | 23 ms | 928 KB |
test_11.txt | WA | 23 ms | 1064 KB |
test_12.txt | WA | 25 ms | 864 KB |
test_13.txt | WA | 23 ms | 932 KB |
test_14.txt | WA | 23 ms | 932 KB |
test_15.txt | WA | 24 ms | 1056 KB |
test_16.txt | WA | 23 ms | 1056 KB |
test_17.txt | WA | 26 ms | 1056 KB |
test_18.txt | WA | 27 ms | 932 KB |
test_19.txt | WA | 28 ms | 1060 KB |
test_20.txt | WA | 28 ms | 932 KB |
test_21.txt | TLE | 2033 ms | 1068 KB |
test_22.txt | TLE | 2033 ms | 1064 KB |
test_23.txt | TLE | 2033 ms | 1064 KB |
test_24.txt | TLE | 2033 ms | 956 KB |
test_25.txt | TLE | 2034 ms | 1060 KB |
test_26.txt | TLE | 2033 ms | 1064 KB |
test_27.txt | WA | 1807 ms | 936 KB |
test_28.txt | TLE | 2034 ms | 1056 KB |
test_29.txt | WA | 24 ms | 928 KB |
test_30.txt | WA | 24 ms | 932 KB |
test_31.txt | WA | 95 ms | 1060 KB |
test_32.txt | WA | 24 ms | 932 KB |
test_33.txt | WA | 1294 ms | 1056 KB |
test_34.txt | WA | 24 ms | 1048 KB |
test_35.txt | WA | 24 ms | 1052 KB |
test_36.txt | TLE | 2035 ms | 1056 KB |
test_37.txt | TLE | 2035 ms | 1056 KB |
test_38.txt | TLE | 2033 ms | 1044 KB |
test_39.txt | TLE | 2033 ms | 1060 KB |
test_40.txt | TLE | 2034 ms | 1080 KB |
test_41.txt | WA | 878 ms | 1060 KB |
test_42.txt | TLE | 2034 ms | 1060 KB |
test_43.txt | WA | 920 ms | 1056 KB |