Submission #523982


Source Code Expand

Copy
NM = raw_input()
nm_list = NM.split(" ")
N = int(nm_list[0])
M = int(nm_list[1])

clean_directions = []
for i in range(0,M):
	str = raw_input()
	str_list = str.split(" ")
	clean_directions.append([int(str_list[0]),int(str_list[1])])

# create rooms
rooms = range(0,N+1)
for i in range(0,N+1):
	rooms[i] = 0

for direction in clean_directions:
	for i in range(direction[0],direction[1]+1):
		rooms[i] += 1

#print (rooms)

# verify
sabori_directions = []
index = 1
for direction in clean_directions:
	flg = True
	#print (rooms)
	for i in range(direction[0],direction[1]+1):
		if rooms[i] == 1:
			flg = False
			break
	if flg:
		sabori_directions.append(index)
	index += 1

#print (sabori_directions)
print len(sabori_directions)
for i in sabori_directions:
	print i

Submission Info

Submission Time
Task B - ドキドキデート大作戦高橋君
User tasuwo_
Language Python (2.7.3)
Score 30
Code Size 806 Byte
Status
Exec Time 2040 ms
Memory 38408 KB

Judge Result

Set Name Sample Subtask1 All
Score / Max Score 0 / 0 30 / 30 0 / 70
Status
× 3
× 12
× 17
× 3
Set Name Test Cases
Sample subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt
Subtask1 subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt
All subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask2_01.txt, subtask2_02.txt, subtask2_03.txt, subtask2_04.txt, subtask2_05.txt, subtask2_06.txt, subtask2_07.txt, subtask2_08.txt
Case Name Status Exec Time Memory
subtask0_sample_01.txt 55 ms 3384 KB
subtask0_sample_02.txt 54 ms 3372 KB
subtask0_sample_03.txt 58 ms 3300 KB
subtask1_01.txt 955 ms 38300 KB
subtask1_02.txt 1170 ms 38292 KB
subtask1_03.txt 984 ms 32020 KB
subtask1_04.txt 956 ms 28824 KB
subtask1_05.txt 1002 ms 28764 KB
subtask1_06.txt 56 ms 3504 KB
subtask1_07.txt 57 ms 3376 KB
subtask1_08.txt 59 ms 3376 KB
subtask1_09.txt 59 ms 3372 KB
subtask2_01.txt 2040 ms 35948 KB
subtask2_02.txt 2040 ms 38408 KB
subtask2_03.txt 60 ms 3384 KB
subtask2_04.txt 62 ms 3384 KB
subtask2_05.txt 61 ms 3376 KB
subtask2_06.txt 61 ms 3380 KB
subtask2_07.txt 66 ms 3372 KB
subtask2_08.txt 2040 ms 31928 KB