Submission #109686
Source Code Expand
i = gets.to_i raintimes = [] i.times { raintimes << gets.chomp.split("-") } def convertStartTime(time) case time[-1].to_i when 0..4 time[0,3] + '0' when 5..9 time[0,3] + '5' end end def convertEndTime (time) case time[-1].to_i when 0 time when 1..5 time[0,3] + '5' when 6..9 tenmin = time[2].to_i if tenmin < 5 time.to_i.round(-1).to_s else ((time[0,2].to_i + 1) * 100).to_s end end end convertedTimes = [] raintimes.each { |start, endt| start = convertStartTime(start) endt = convertEndTime(endt) convertedTimes << [start, endt].map(&:to_i) } a = [] convertedTimes.sort.each { |start, endt| if a.any? a.each {|s, e| if e.between?(start, endt) a.delete([s,e]) a << [s, endt] else a << [start, endt] if start > e end } else a << [start, endt] end } a.each{|p| puts p.join('-').rjust(9, '0')}
Submission Info
Submission Time | |
---|---|
Task | D - 感雨時刻の整理 |
User | toshimaru |
Language | Ruby (1.9.3) |
Score | 0 |
Code Size | 986 Byte |
Status | TLE |
Exec Time | 2040 ms |
Memory | 11884 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 | 56 ms | 4120 KB |
00_sample_02.txt | AC | 55 ms | 4240 KB |
00_sample_03.txt | AC | 53 ms | 4124 KB |
cho_cho_chokudai.txt | AC | 406 ms | 11880 KB |
chokudai_ga_cho.txt | AC | 589 ms | 11880 KB |
test_01.txt | WA | 71 ms | 4120 KB |
test_02.txt | WA | 72 ms | 4124 KB |
test_03.txt | WA | 72 ms | 4244 KB |
test_04.txt | WA | 75 ms | 4116 KB |
test_05.txt | WA | 73 ms | 4120 KB |
test_06.txt | AC | 58 ms | 4252 KB |
test_07.txt | AC | 57 ms | 4120 KB |
test_08.txt | AC | 56 ms | 4120 KB |
test_09.txt | AC | 61 ms | 4248 KB |
test_10.txt | AC | 64 ms | 4244 KB |
test_11.txt | WA | 63 ms | 4228 KB |
test_12.txt | AC | 60 ms | 4244 KB |
test_13.txt | AC | 56 ms | 4128 KB |
test_14.txt | AC | 65 ms | 4244 KB |
test_15.txt | AC | 65 ms | 4252 KB |
test_16.txt | WA | 187 ms | 4240 KB |
test_17.txt | AC | 61 ms | 4240 KB |
test_18.txt | AC | 58 ms | 4248 KB |
test_19.txt | AC | 59 ms | 4248 KB |
test_20.txt | AC | 60 ms | 4240 KB |
test_21.txt | AC | 596 ms | 11744 KB |
test_22.txt | AC | 597 ms | 11752 KB |
test_23.txt | AC | 629 ms | 11756 KB |
test_24.txt | AC | 591 ms | 11868 KB |
test_25.txt | AC | 618 ms | 11880 KB |
test_26.txt | AC | 530 ms | 11880 KB |
test_27.txt | WA | 394 ms | 11756 KB |
test_28.txt | TLE | 2040 ms | 11876 KB |
test_29.txt | AC | 55 ms | 4112 KB |
test_30.txt | WA | 57 ms | 4116 KB |
test_31.txt | TLE | 2034 ms | 5108 KB |
test_32.txt | WA | 58 ms | 4124 KB |
test_33.txt | TLE | 2035 ms | 8856 KB |
test_34.txt | WA | 55 ms | 4120 KB |
test_35.txt | WA | 83 ms | 4248 KB |
test_36.txt | AC | 614 ms | 11880 KB |
test_37.txt | TLE | 2040 ms | 11884 KB |
test_38.txt | WA | 1310 ms | 11868 KB |
test_39.txt | TLE | 2039 ms | 11880 KB |
test_40.txt | TLE | 2039 ms | 11884 KB |
test_41.txt | AC | 284 ms | 11752 KB |
test_42.txt | AC | 436 ms | 11788 KB |
test_43.txt | AC | 286 ms | 11880 KB |