Submission #4658094
Source Code Expand
n,q=map(int,input().split()) s=[0]*(n+1) for i in range(q): l,r=map(int,input().split()) s[l-1]+=1 s[r]-=1 ans="" sum=0 for k in range(n): sum+=s[k] if sum%2!=0: ans+="1" else: ans+="0" print(ans)
Submission Info
Submission Time | |
---|---|
Task | C - オセロ |
User | timai91 |
Language | Python (3.4.3) |
Score | 100 |
Code Size | 252 Byte |
Status | AC |
Exec Time | 714 ms |
Memory | 5108 KB |
Judge Result
Set Name | Sample | Subtask1 | All | ||||||
---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 60 / 60 | 40 / 40 | ||||||
Status |
|
|
|
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 | 17 ms | 3060 KB |
00_example_02.txt | AC | 17 ms | 3060 KB |
10_small_01.txt | AC | 19 ms | 3060 KB |
10_small_02.txt | AC | 18 ms | 3060 KB |
10_small_03.txt | AC | 17 ms | 3060 KB |
10_small_04.txt | AC | 18 ms | 2940 KB |
10_small_05.txt | AC | 17 ms | 2940 KB |
10_small_06.txt | AC | 18 ms | 3060 KB |
10_small_07.txt | AC | 17 ms | 3060 KB |
10_small_08.txt | AC | 17 ms | 3060 KB |
10_small_09.txt | AC | 18 ms | 3060 KB |
10_small_10.txt | AC | 17 ms | 3060 KB |
20_rand_01.txt | AC | 363 ms | 3444 KB |
20_rand_02.txt | AC | 100 ms | 3188 KB |
20_rand_03.txt | AC | 59 ms | 4212 KB |
20_rand_04.txt | AC | 215 ms | 3316 KB |
20_rand_05.txt | AC | 104 ms | 3060 KB |
20_rand_06.txt | AC | 212 ms | 3572 KB |
20_rand_07.txt | AC | 67 ms | 4212 KB |
20_rand_08.txt | AC | 28 ms | 3188 KB |
20_rand_09.txt | AC | 148 ms | 3060 KB |
20_rand_10.txt | AC | 76 ms | 3316 KB |
30_max_01.txt | AC | 714 ms | 5108 KB |
30_max_02.txt | AC | 673 ms | 5108 KB |
30_max_03.txt | AC | 703 ms | 5108 KB |
30_max_04.txt | AC | 684 ms | 5108 KB |
30_max_05.txt | AC | 679 ms | 5108 KB |
40_corner_01.txt | AC | 599 ms | 3060 KB |
40_corner_02.txt | AC | 656 ms | 5108 KB |
40_corner_03.txt | AC | 662 ms | 5108 KB |
40_corner_04.txt | AC | 693 ms | 5108 KB |
40_corner_05.txt | AC | 677 ms | 5108 KB |
40_corner_06.txt | AC | 590 ms | 3060 KB |
40_corner_07.txt | AC | 654 ms | 5108 KB |