Submission #370332
Source Code Expand
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int length = scanner.nextInt(); int status[] = new int[2400]; int i; int raining = 0; int start = 0; for(i = 0; i < length; i ++){ String[] time = scanner.next().split("-"); int _start = Integer.parseInt(time[0]); int _stop = Integer.parseInt(time[1]); _start = _start - _start%5; _stop = _stop - (_stop%5==0?0:(_stop%5-5)); status[_start] ++; status[_stop] --; } scanner.close(); for(i = 0; i < 2400; i += 5){ if(status[i] > 0){ if(raining < 1){ start = i; } raining += status[i]; }else if(status[i] < 0){ raining += status[i]; if(raining == 0){ System.out.printf("%04d-%04d\n", start, i); } } } } }
Submission Info
Submission Time | |
---|---|
Task | D - 感雨時刻の整理 |
User | ne260090 |
Language | Java (OpenJDK 1.7.0) |
Score | 0 |
Code Size | 852 Byte |
Status | RE |
Exec Time | 890 ms |
Memory | 38948 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 | 404 ms | 22912 KB |
00_sample_02.txt | RE | 392 ms | 22840 KB |
00_sample_03.txt | AC | 399 ms | 23024 KB |
cho_cho_chokudai.txt | WA | 870 ms | 37528 KB |
chokudai_ga_cho.txt | RE | 412 ms | 22964 KB |
test_01.txt | AC | 451 ms | 23544 KB |
test_02.txt | AC | 444 ms | 23508 KB |
test_03.txt | AC | 440 ms | 23488 KB |
test_04.txt | AC | 448 ms | 23504 KB |
test_05.txt | AC | 445 ms | 23392 KB |
test_06.txt | RE | 389 ms | 22836 KB |
test_07.txt | RE | 389 ms | 22704 KB |
test_08.txt | RE | 387 ms | 22860 KB |
test_09.txt | RE | 390 ms | 22700 KB |
test_10.txt | RE | 410 ms | 22804 KB |
test_11.txt | AC | 456 ms | 23852 KB |
test_12.txt | RE | 392 ms | 22832 KB |
test_13.txt | RE | 393 ms | 22700 KB |
test_14.txt | RE | 395 ms | 22792 KB |
test_15.txt | RE | 390 ms | 22828 KB |
test_16.txt | RE | 411 ms | 22912 KB |
test_17.txt | RE | 400 ms | 22708 KB |
test_18.txt | RE | 397 ms | 22832 KB |
test_19.txt | RE | 390 ms | 22828 KB |
test_20.txt | RE | 401 ms | 22832 KB |
test_21.txt | RE | 394 ms | 22700 KB |
test_22.txt | RE | 399 ms | 22836 KB |
test_23.txt | RE | 407 ms | 22836 KB |
test_24.txt | RE | 401 ms | 22804 KB |
test_25.txt | RE | 382 ms | 22836 KB |
test_26.txt | WA | 827 ms | 37248 KB |
test_27.txt | AC | 819 ms | 36920 KB |
test_28.txt | WA | 861 ms | 38392 KB |
test_29.txt | AC | 393 ms | 22964 KB |
test_30.txt | WA | 403 ms | 23024 KB |
test_31.txt | WA | 635 ms | 30268 KB |
test_32.txt | AC | 399 ms | 22992 KB |
test_33.txt | WA | 789 ms | 35796 KB |
test_34.txt | AC | 385 ms | 22912 KB |
test_35.txt | WA | 424 ms | 23768 KB |
test_36.txt | AC | 882 ms | 37476 KB |
test_37.txt | WA | 890 ms | 38948 KB |
test_38.txt | WA | 822 ms | 37612 KB |
test_39.txt | AC | 836 ms | 37620 KB |
test_40.txt | WA | 865 ms | 38372 KB |
test_41.txt | RE | 385 ms | 22836 KB |
test_42.txt | RE | 418 ms | 23348 KB |
test_43.txt | RE | 795 ms | 36056 KB |