Submission #2387017
Source Code Expand
# coding: utf-8 n = int(input()) ls0 = list() for i in range(n): r = list(input().split('-')) ls0.append(r) ls1 = list() for log in ls0: a = log[0] b = log[1] h = int(a[0:2]) m = int(a[2:4]) m -= (m % 5) hb = int(b[0:2]) mb = int(b[2:4]) if((mb % 5) != 0): mb += (5 - (mb % 5)) if (mb == 60): hb += 1 mb = 0 ta = str(h).zfill(2) + str(m).zfill(2) tb = str(hb).zfill(2) + str(mb).zfill(2) ls1.append(ta + '-' + tb) ls1 = sorted(ls1, key=lambda x: int(x[0:4])) ls2 = ls1.copy() ls3 = ls1.copy() flg = True while flg: flg = False for i, x in enumerate(ls1): if(i == len(ls1)): break for y in ls2[i+1:]: if(int(x[5:]) >= int(y[0:4])): ls3.remove(x) ls3.remove(y) if(int(x[5:]) <= int(y[5:])): ls3.append(x[0:5] + y[5:]) else: ls3.append(x[0:5] + x[5:]) flg = True break if(flg == True): break ls3 = sorted(ls3, key=lambda x: int(x[0:4])) ls1 = ls3.copy() ls2 = ls3.copy() for x in ls3: print(x)
Submission Info
Submission Time | |
---|---|
Task | D - 感雨時刻の整理 |
User | Linta |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 1276 Byte |
Status | TLE |
Exec Time | 2104 ms |
Memory | 14960 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 | 18 ms | 3188 KB |
00_sample_02.txt | AC | 18 ms | 3188 KB |
00_sample_03.txt | AC | 18 ms | 3188 KB |
cho_cho_chokudai.txt | TLE | 2104 ms | 14960 KB |
chokudai_ga_cho.txt | TLE | 2104 ms | 13752 KB |
test_01.txt | AC | 24 ms | 3188 KB |
test_02.txt | AC | 25 ms | 3188 KB |
test_03.txt | AC | 24 ms | 3192 KB |
test_04.txt | AC | 24 ms | 3188 KB |
test_05.txt | AC | 25 ms | 3188 KB |
test_06.txt | AC | 29 ms | 3188 KB |
test_07.txt | AC | 24 ms | 3188 KB |
test_08.txt | AC | 21 ms | 3188 KB |
test_09.txt | AC | 86 ms | 3188 KB |
test_10.txt | AC | 95 ms | 3188 KB |
test_11.txt | AC | 189 ms | 3188 KB |
test_12.txt | AC | 50 ms | 3188 KB |
test_13.txt | AC | 28 ms | 3188 KB |
test_14.txt | AC | 75 ms | 3188 KB |
test_15.txt | AC | 100 ms | 3188 KB |
test_16.txt | AC | 35 ms | 3188 KB |
test_17.txt | AC | 76 ms | 3188 KB |
test_18.txt | AC | 29 ms | 3188 KB |
test_19.txt | AC | 53 ms | 3188 KB |
test_20.txt | AC | 61 ms | 3188 KB |
test_21.txt | TLE | 2104 ms | 13900 KB |
test_22.txt | TLE | 2104 ms | 13960 KB |
test_23.txt | TLE | 2104 ms | 13920 KB |
test_24.txt | TLE | 2104 ms | 13952 KB |
test_25.txt | TLE | 2104 ms | 13940 KB |
test_26.txt | TLE | 2104 ms | 13860 KB |
test_27.txt | TLE | 2104 ms | 13976 KB |
test_28.txt | TLE | 2104 ms | 13900 KB |
test_29.txt | AC | 18 ms | 3188 KB |
test_30.txt | AC | 23 ms | 3192 KB |
test_31.txt | TLE | 2104 ms | 4588 KB |
test_32.txt | AC | 20 ms | 3188 KB |
test_33.txt | TLE | 2104 ms | 10184 KB |
test_34.txt | AC | 18 ms | 3188 KB |
test_35.txt | AC | 96 ms | 3192 KB |
test_36.txt | TLE | 2104 ms | 13972 KB |
test_37.txt | TLE | 2104 ms | 13848 KB |
test_38.txt | TLE | 2104 ms | 13852 KB |
test_39.txt | TLE | 2104 ms | 13964 KB |
test_40.txt | TLE | 2104 ms | 13796 KB |
test_41.txt | TLE | 2104 ms | 13736 KB |
test_42.txt | TLE | 2104 ms | 13736 KB |
test_43.txt | TLE | 2104 ms | 13728 KB |