Submission #1078175


Source Code Expand

import static java.lang.System.*;

import java.util.Scanner;
 
public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(in);
		int n = sc.nextInt();
		
		boolean[] time = new boolean[24*12+1];
		while(n-- > 0){
			String[] str = sc.next().split("-");
			int s = new Integer(str[0]);
			int e = new Integer(str[1]);
			
			if(s % 10 >= 5) s = s / 10 * 10 + 5;
			else s = s / 10 * 10;
			
			if(e % 10 > 5) e = e / 10 * 10 + 10;
			else if(e % 10 > 0) e = e / 10 * 10 + 5;
			else e = e / 10 * 10;
			
			
			s = s / 100 * 12 + s % 100 / 5;
			e = e / 100 * 12 + e % 100 / 5;
			//12:30 150/12
			
			for(int i=s; i<e; i++) time[i] = true;
		}
		
		for(int i=0; i<=24*12;i++) {
			if(time[i]) {
				int s = i;
				
				for(; i< 24*12 && time[i]; i++);
				out.printf("%02d%02d-%02d%02d", s/12,s%12*5,i/12,i%12*5);
				out.println();
				
			}
		}
		
	}
	
}

Submission Info

Submission Time
Task D - 感雨時刻の整理
User f671008
Language Java (OpenJDK 1.7.0)
Score 100
Code Size 932 Byte
Status AC
Exec Time 662 ms
Memory 44612 KB

Judge Result

Set Name all
Score / Max Score 100 / 100
Status
AC × 48
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 245 ms 21772 KB
00_sample_02.txt AC 233 ms 21800 KB
00_sample_03.txt AC 246 ms 21692 KB
cho_cho_chokudai.txt AC 593 ms 42056 KB
chokudai_ga_cho.txt AC 602 ms 43596 KB
test_01.txt AC 295 ms 22456 KB
test_02.txt AC 290 ms 22456 KB
test_03.txt AC 294 ms 22440 KB
test_04.txt AC 292 ms 22452 KB
test_05.txt AC 293 ms 22400 KB
test_06.txt AC 295 ms 24668 KB
test_07.txt AC 268 ms 23428 KB
test_08.txt AC 257 ms 22984 KB
test_09.txt AC 310 ms 25628 KB
test_10.txt AC 333 ms 25756 KB
test_11.txt AC 298 ms 24828 KB
test_12.txt AC 285 ms 24540 KB
test_13.txt AC 265 ms 21948 KB
test_14.txt AC 306 ms 25000 KB
test_15.txt AC 301 ms 25096 KB
test_16.txt AC 249 ms 21920 KB
test_17.txt AC 296 ms 25052 KB
test_18.txt AC 249 ms 21948 KB
test_19.txt AC 284 ms 23984 KB
test_20.txt AC 275 ms 23104 KB
test_21.txt AC 621 ms 42580 KB
test_22.txt AC 605 ms 43344 KB
test_23.txt AC 610 ms 42588 KB
test_24.txt AC 608 ms 43148 KB
test_25.txt AC 645 ms 43268 KB
test_26.txt AC 645 ms 44576 KB
test_27.txt AC 629 ms 42120 KB
test_28.txt AC 618 ms 43576 KB
test_29.txt AC 236 ms 21716 KB
test_30.txt AC 246 ms 21860 KB
test_31.txt AC 440 ms 29640 KB
test_32.txt AC 244 ms 21724 KB
test_33.txt AC 625 ms 41956 KB
test_34.txt AC 234 ms 21804 KB
test_35.txt AC 260 ms 22536 KB
test_36.txt AC 596 ms 44008 KB
test_37.txt AC 622 ms 43540 KB
test_38.txt AC 651 ms 44612 KB
test_39.txt AC 611 ms 43592 KB
test_40.txt AC 610 ms 43216 KB
test_41.txt AC 599 ms 42452 KB
test_42.txt AC 606 ms 43728 KB
test_43.txt AC 662 ms 43120 KB