Submission #524221


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])
  if min(k[s - 1:t]) < 2:
    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)
if not c == 0: print("\r\n".join(list(map(str,rr))))

Submission Info

Submission Time
Task B - ドキドキデート大作戦高橋君
User purintai
Language Python3 (3.4.2)
Score 30
Code Size 429 Byte
Status
Exec Time 2040 ms
Memory 37260 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 30 / 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 420 ms 7240 KB
subtask0_sample_02.txt 94 ms 6756 KB
subtask0_sample_03.txt 95 ms 6760 KB
subtask1_01.txt 1757 ms 26132 KB
subtask1_02.txt 1999 ms 37260 KB
subtask1_03.txt 1754 ms 25364 KB
subtask1_04.txt 1847 ms 30800 KB
subtask1_05.txt 1843 ms 30892 KB
subtask1_06.txt 95 ms 6760 KB
subtask1_07.txt 99 ms 6744 KB
subtask1_08.txt 98 ms 6736 KB
subtask1_09.txt 97 ms 6868 KB
subtask2_01.txt 2035 ms 13796 KB
subtask2_02.txt 2040 ms 13796 KB
subtask2_03.txt 96 ms 6760 KB
subtask2_04.txt 97 ms 6844 KB
subtask2_05.txt 100 ms 6800 KB
subtask2_06.txt 102 ms 6756 KB
subtask2_07.txt 95 ms 6760 KB
subtask2_08.txt 2034 ms 11164 KB