Submission #524053


Source Code Expand

Copy
n, m = list(map(int, input().split()))
c = 0
k = [0] * n
r = []
rr = []
for i in range(m):
  s, t = list(map(int, input().split()))
  r.append([s, t])
  k[s - 1:t] = list(map(lambda x: x + 1, k[s - 1:t]))
 
for i in range(m):
  s, t = r[i]
  if min(k[s - 1:t]) == 1:
    continue
  else:
    c += 1
    rr.append(i+1)
 
print(c)
print("\r\n".join(list(map(str,rr))))

Submission Info

Submission Time
Task B - ドキドキデート大作戦高橋君
User purintai
Language Python3 (3.4.2)
Score 0
Code Size 385 Byte
Status
Exec Time 2036 ms
Memory 37124 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt
Subtask1 0 / 30 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 0 / 70 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 645 ms 7140 KB
subtask0_sample_02.txt 117 ms 6756 KB
subtask0_sample_03.txt 113 ms 6856 KB
subtask1_01.txt 1662 ms 26176 KB
subtask1_02.txt 1919 ms 37124 KB
subtask1_03.txt 1614 ms 25452 KB
subtask1_04.txt 1723 ms 31008 KB
subtask1_05.txt 1697 ms 30876 KB
subtask1_06.txt 114 ms 6760 KB
subtask1_07.txt 114 ms 6760 KB
subtask1_08.txt 110 ms 6760 KB
subtask1_09.txt 114 ms 6752 KB
subtask2_01.txt 2036 ms 13936 KB
subtask2_02.txt 2034 ms 13868 KB
subtask2_03.txt 114 ms 6756 KB
subtask2_04.txt 114 ms 6760 KB
subtask2_05.txt 117 ms 6760 KB
subtask2_06.txt 114 ms 6884 KB
subtask2_07.txt 112 ms 6764 KB
subtask2_08.txt 2034 ms 12532 KB