Submission #109692
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.uniq.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 | 991 Byte |
Status | WA |
Exec Time | 727 ms |
Memory | 12948 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 | 54 ms | 4128 KB |
00_sample_03.txt | AC | 58 ms | 4128 KB |
cho_cho_chokudai.txt | AC | 376 ms | 11624 KB |
chokudai_ga_cho.txt | AC | 614 ms | 12948 KB |
test_01.txt | WA | 75 ms | 4248 KB |
test_02.txt | WA | 69 ms | 4244 KB |
test_03.txt | WA | 72 ms | 4240 KB |
test_04.txt | WA | 73 ms | 4120 KB |
test_05.txt | WA | 71 ms | 4248 KB |
test_06.txt | AC | 59 ms | 4248 KB |
test_07.txt | AC | 57 ms | 4244 KB |
test_08.txt | AC | 56 ms | 4120 KB |
test_09.txt | AC | 59 ms | 4252 KB |
test_10.txt | AC | 62 ms | 4252 KB |
test_11.txt | WA | 58 ms | 4128 KB |
test_12.txt | AC | 59 ms | 4244 KB |
test_13.txt | AC | 59 ms | 4256 KB |
test_14.txt | AC | 62 ms | 4116 KB |
test_15.txt | AC | 62 ms | 4244 KB |
test_16.txt | WA | 175 ms | 4252 KB |
test_17.txt | AC | 61 ms | 4120 KB |
test_18.txt | AC | 60 ms | 4252 KB |
test_19.txt | AC | 61 ms | 4244 KB |
test_20.txt | AC | 64 ms | 4244 KB |
test_21.txt | AC | 503 ms | 11996 KB |
test_22.txt | AC | 547 ms | 12380 KB |
test_23.txt | AC | 508 ms | 12184 KB |
test_24.txt | AC | 528 ms | 12384 KB |
test_25.txt | AC | 532 ms | 12268 KB |
test_26.txt | AC | 374 ms | 11616 KB |
test_27.txt | WA | 351 ms | 11624 KB |
test_28.txt | WA | 584 ms | 11620 KB |
test_29.txt | AC | 52 ms | 4120 KB |
test_30.txt | WA | 60 ms | 4124 KB |
test_31.txt | WA | 254 ms | 5016 KB |
test_32.txt | WA | 56 ms | 4120 KB |
test_33.txt | WA | 507 ms | 8084 KB |
test_34.txt | WA | 53 ms | 4124 KB |
test_35.txt | WA | 75 ms | 4248 KB |
test_36.txt | AC | 560 ms | 12564 KB |
test_37.txt | WA | 514 ms | 11628 KB |
test_38.txt | WA | 369 ms | 11620 KB |
test_39.txt | WA | 680 ms | 11620 KB |
test_40.txt | WA | 727 ms | 11532 KB |
test_41.txt | AC | 371 ms | 11640 KB |
test_42.txt | AC | 329 ms | 11540 KB |
test_43.txt | AC | 381 ms | 11624 KB |