Submission #1868190
Source Code Expand
N=int(input()) def listout(): for i in range(0,N): print(str("{0:02d}".format(rain[i][0][0]))+str("{0:02d}".format(rain[i][0][1]))+'-'+str("{0:02d}".format(rain[i][1][0]))+str("{0:02d}".format(rain[i][1][1]))) rain=[] for i in range(0,N): inp=input() t0,t1=inp.split('-') rain.append([[int(t0[0:2]),int(t0[2:4])],[int(t1[0:2]),int(t1[2:4])]]) #rain[N][START/END 0/1][HOUR/MIN 0/1] #listout() #時間丸め for i in range(0,N): for j in range(0,2): if(j==0): rain[i][j][1]=rain[i][j][1]-rain[i][j][1]%5 elif(rain[i][j][1]%5 !=0): rain[i][j][1]=rain[i][j][1]+(5-(rain[i][j][1]%5)) if(rain[i][j][1]==60): rain[i][j][0]+=1 rain[i][j][1]=0 #listout() rain.sort(key=lambda x:x[0]) #listout() if((N-1)!=0): #remove overrap cnt=0 unique=False while(not unique): cnt=0 for i in range(0,N-1): if(rain[i] in rain[i+1:]): rain.pop(i) N-=1 break else: cnt+=1 if(cnt==(N-1)): unique=True #listout() #marge cnt=0 marged=False while(not marged): cnt=0 for i in range(0,N-1): if(rain[i][1] >= rain[i+1][0]): if(rain[i][0] < rain[i+1][0] and rain[i][1] > rain[i+1][1]): rain.pop(i+1) N-=1 break rain[i][1]=rain[i+1][1] rain.pop(i+1) N-=1 break else: cnt+=1 if(cnt==(N-1)): marged=True listout()
Submission Info
Submission Time | |
---|---|
Task | D - 感雨時刻の整理 |
User | nadayan |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 1753 Byte |
Status | WA |
Exec Time | 2104 ms |
Memory | 13980 KB |
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 | 17 ms | 3192 KB |
00_sample_02.txt | AC | 17 ms | 3192 KB |
00_sample_03.txt | AC | 17 ms | 3192 KB |
cho_cho_chokudai.txt | TLE | 2104 ms | 12020 KB |
chokudai_ga_cho.txt | TLE | 2104 ms | 12268 KB |
test_01.txt | AC | 19 ms | 3192 KB |
test_02.txt | AC | 19 ms | 3192 KB |
test_03.txt | AC | 19 ms | 3192 KB |
test_04.txt | AC | 19 ms | 3192 KB |
test_05.txt | AC | 19 ms | 3192 KB |
test_06.txt | TLE | 2104 ms | 3192 KB |
test_07.txt | TLE | 2104 ms | 3192 KB |
test_08.txt | TLE | 2104 ms | 3192 KB |
test_09.txt | TLE | 2104 ms | 3192 KB |
test_10.txt | TLE | 2104 ms | 3192 KB |
test_11.txt | AC | 32 ms | 3192 KB |
test_12.txt | TLE | 2104 ms | 3192 KB |
test_13.txt | TLE | 2104 ms | 3192 KB |
test_14.txt | TLE | 2104 ms | 3192 KB |
test_15.txt | TLE | 2104 ms | 3192 KB |
test_16.txt | AC | 20 ms | 3192 KB |
test_17.txt | TLE | 2103 ms | 3192 KB |
test_18.txt | TLE | 2104 ms | 3192 KB |
test_19.txt | TLE | 2104 ms | 3192 KB |
test_20.txt | TLE | 2104 ms | 3192 KB |
test_21.txt | TLE | 2104 ms | 12276 KB |
test_22.txt | TLE | 2104 ms | 12276 KB |
test_23.txt | TLE | 2104 ms | 12276 KB |
test_24.txt | TLE | 2104 ms | 12276 KB |
test_25.txt | TLE | 2104 ms | 12276 KB |
test_26.txt | TLE | 2104 ms | 13980 KB |
test_27.txt | TLE | 2104 ms | 12020 KB |
test_28.txt | TLE | 2104 ms | 12276 KB |
test_29.txt | AC | 17 ms | 3192 KB |
test_30.txt | WA | 18 ms | 3192 KB |
test_31.txt | TLE | 2104 ms | 4340 KB |
test_32.txt | WA | 18 ms | 3192 KB |
test_33.txt | TLE | 2104 ms | 9076 KB |
test_34.txt | AC | 17 ms | 3192 KB |
test_35.txt | WA | 56 ms | 3192 KB |
test_36.txt | TLE | 2104 ms | 12276 KB |
test_37.txt | TLE | 2104 ms | 12276 KB |
test_38.txt | TLE | 2104 ms | 12276 KB |
test_39.txt | TLE | 2104 ms | 12276 KB |
test_40.txt | TLE | 2104 ms | 12276 KB |
test_41.txt | TLE | 2104 ms | 12020 KB |
test_42.txt | TLE | 2104 ms | 12276 KB |
test_43.txt | TLE | 2104 ms | 12276 KB |