Submission #676361


Source Code Expand

N,Q=map(int,input().split())
ht=[0]*(N+1)
ans =''
count = 0
for i in range(Q):
    a,b=map(int,input().split())
    ht[a-1] += 1
    ht[b] -= 1

for i in range(N):
    count += ht[i]
    if count%2==0:
        ans += '0'
    else:
        ans += '1'

print(ans)

Submission Info

Submission Time
Task C - オセロ
User koshin
Language Python (3.4.3)
Score 100
Code Size 277 Byte
Status AC
Exec Time 1407 ms
Memory 5236 KB

Judge Result

Set Name Sample Subtask1 All
Score / Max Score 0 / 0 60 / 60 40 / 40
Status
AC × 2
AC × 12
AC × 34
Set Name Test Cases
Sample 00_example_01.txt, 00_example_02.txt
Subtask1 00_example_01.txt, 00_example_02.txt, 10_small_01.txt, 10_small_02.txt, 10_small_03.txt, 10_small_04.txt, 10_small_05.txt, 10_small_06.txt, 10_small_07.txt, 10_small_08.txt, 10_small_09.txt, 10_small_10.txt
All 00_example_01.txt, 00_example_02.txt, 10_small_01.txt, 10_small_02.txt, 10_small_03.txt, 10_small_04.txt, 10_small_05.txt, 10_small_06.txt, 10_small_07.txt, 10_small_08.txt, 10_small_09.txt, 10_small_10.txt, 20_rand_01.txt, 20_rand_02.txt, 20_rand_03.txt, 20_rand_04.txt, 20_rand_05.txt, 20_rand_06.txt, 20_rand_07.txt, 20_rand_08.txt, 20_rand_09.txt, 20_rand_10.txt, 30_max_01.txt, 30_max_02.txt, 30_max_03.txt, 30_max_04.txt, 30_max_05.txt, 40_corner_01.txt, 40_corner_02.txt, 40_corner_03.txt, 40_corner_04.txt, 40_corner_05.txt, 40_corner_06.txt, 40_corner_07.txt
Case Name Status Exec Time Memory
00_example_01.txt AC 37 ms 3064 KB
00_example_02.txt AC 37 ms 3064 KB
10_small_01.txt AC 41 ms 3064 KB
10_small_02.txt AC 37 ms 3064 KB
10_small_03.txt AC 38 ms 3064 KB
10_small_04.txt AC 40 ms 3064 KB
10_small_05.txt AC 38 ms 3064 KB
10_small_06.txt AC 43 ms 3064 KB
10_small_07.txt AC 37 ms 3064 KB
10_small_08.txt AC 37 ms 3064 KB
10_small_09.txt AC 39 ms 3064 KB
10_small_10.txt AC 38 ms 3064 KB
20_rand_01.txt AC 730 ms 3572 KB
20_rand_02.txt AC 201 ms 3188 KB
20_rand_03.txt AC 130 ms 4212 KB
20_rand_04.txt AC 435 ms 3316 KB
20_rand_05.txt AC 206 ms 3064 KB
20_rand_06.txt AC 417 ms 3572 KB
20_rand_07.txt AC 142 ms 4212 KB
20_rand_08.txt AC 58 ms 3316 KB
20_rand_09.txt AC 288 ms 3064 KB
20_rand_10.txt AC 146 ms 3316 KB
30_max_01.txt AC 1355 ms 5236 KB
30_max_02.txt AC 1372 ms 5236 KB
30_max_03.txt AC 1343 ms 5236 KB
30_max_04.txt AC 1365 ms 5236 KB
30_max_05.txt AC 1407 ms 5236 KB
40_corner_01.txt AC 1149 ms 3064 KB
40_corner_02.txt AC 1355 ms 5236 KB
40_corner_03.txt AC 1371 ms 5236 KB
40_corner_04.txt AC 1362 ms 5236 KB
40_corner_05.txt AC 1352 ms 5236 KB
40_corner_06.txt AC 1207 ms 3064 KB
40_corner_07.txt AC 1351 ms 5236 KB