Submission #458083


Source Code Expand

normalize() {
    local IFS=-
    local bgn end
    while read bgn end ; do
        bgn=$(( 10#$bgn / 5 * 5 ))
        end=$(( (10#$end + 4) / 5 * 5 ))
        (( end % 100 == 60 )) && end=$(( end + 40 ))
        printf '%04d %04d\n' ${bgn} ${end}
    done
}
 
merge() {
    local bgn end bgn_i end_i
    read bgn end
    while read bgn_i end_i ; do
        if [[ $end < $bgn_i ]] ; then
            echo ${bgn}-${end}
            bgn=${bgn_i}
        fi
        if [[ $end < $end_i ]] ; then
            end=${end_i}
        fi
    done
    echo ${bgn}-${end}
}
 
read  # Skip.
normalize | sort | uniq | merge

Submission Info

Submission Time
Task D - 感雨時刻の整理
User yuizumi
Language Bash (4.2.25)
Score 0
Code Size 639 Byte
Status TLE
Exec Time 2036 ms
Memory 2444 KB

Judge Result

Set Name all
Score / Max Score 0 / 100
Status
AC × 30
TLE × 18
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 38 ms 1424 KB
00_sample_02.txt AC 35 ms 1352 KB
00_sample_03.txt AC 35 ms 1496 KB
cho_cho_chokudai.txt TLE 2032 ms 2444 KB
chokudai_ga_cho.txt TLE 2033 ms 2316 KB
test_01.txt AC 55 ms 1496 KB
test_02.txt AC 56 ms 1452 KB
test_03.txt AC 55 ms 1456 KB
test_04.txt AC 55 ms 1404 KB
test_05.txt AC 55 ms 1464 KB
test_06.txt AC 62 ms 1552 KB
test_07.txt AC 54 ms 1500 KB
test_08.txt AC 49 ms 1448 KB
test_09.txt AC 87 ms 1436 KB
test_10.txt AC 86 ms 1456 KB
test_11.txt AC 71 ms 1476 KB
test_12.txt AC 72 ms 1444 KB
test_13.txt AC 57 ms 1448 KB
test_14.txt AC 97 ms 1416 KB
test_15.txt AC 104 ms 1576 KB
test_16.txt AC 52 ms 1568 KB
test_17.txt AC 99 ms 1416 KB
test_18.txt AC 60 ms 1512 KB
test_19.txt AC 79 ms 1476 KB
test_20.txt AC 98 ms 1572 KB
test_21.txt TLE 2034 ms 2300 KB
test_22.txt TLE 2034 ms 2348 KB
test_23.txt TLE 2032 ms 2416 KB
test_24.txt TLE 2035 ms 2324 KB
test_25.txt TLE 2035 ms 2304 KB
test_26.txt TLE 2035 ms 2292 KB
test_27.txt TLE 2036 ms 2388 KB
test_28.txt TLE 2034 ms 2384 KB
test_29.txt AC 38 ms 1376 KB
test_30.txt AC 41 ms 1340 KB
test_31.txt AC 407 ms 1712 KB
test_32.txt AC 39 ms 1424 KB
test_33.txt AC 1644 ms 2420 KB
test_34.txt AC 37 ms 1252 KB
test_35.txt AC 59 ms 1400 KB
test_36.txt TLE 2034 ms 2400 KB
test_37.txt TLE 2034 ms 2236 KB
test_38.txt TLE 2032 ms 2392 KB
test_39.txt TLE 2033 ms 2336 KB
test_40.txt TLE 2033 ms 2428 KB
test_41.txt TLE 2032 ms 2420 KB
test_42.txt TLE 2033 ms 2420 KB
test_43.txt TLE 2033 ms 2376 KB