Submission #675009
Source Code Expand
#include <iostream> #include <algorithm> #include <vector> #include <cstdio> #include <cmath> #include <string> using namespace std; int vl[200002]; int vh[200002]; int main(){ int i,j,k,l,n,m; int q; cin >>n>>q; for (i=0;i<q;i++){ cin >>j>>k; vl[j]++; vh[k+1]++; } l=0; for (i=1;i<=n;i++){ if (vl[i]%2==1) l=!l; if (vh[i]%2==1) l=!l; cout<<l; } cout<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - オセロ |
User | m_buyoh |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 533 Byte |
Status | AC |
Exec Time | 271 ms |
Memory | 1792 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 | 4 ms | 256 KB |
00_example_02.txt | AC | 4 ms | 256 KB |
10_small_01.txt | AC | 5 ms | 256 KB |
10_small_02.txt | AC | 4 ms | 256 KB |
10_small_03.txt | AC | 4 ms | 256 KB |
10_small_04.txt | AC | 4 ms | 256 KB |
10_small_05.txt | AC | 4 ms | 256 KB |
10_small_06.txt | AC | 4 ms | 256 KB |
10_small_07.txt | AC | 4 ms | 256 KB |
10_small_08.txt | AC | 4 ms | 256 KB |
10_small_09.txt | AC | 4 ms | 256 KB |
10_small_10.txt | AC | 4 ms | 256 KB |
20_rand_01.txt | AC | 116 ms | 512 KB |
20_rand_02.txt | AC | 30 ms | 384 KB |
20_rand_03.txt | AC | 16 ms | 896 KB |
20_rand_04.txt | AC | 67 ms | 512 KB |
20_rand_05.txt | AC | 30 ms | 256 KB |
20_rand_06.txt | AC | 65 ms | 640 KB |
20_rand_07.txt | AC | 18 ms | 1024 KB |
20_rand_08.txt | AC | 7 ms | 384 KB |
20_rand_09.txt | AC | 43 ms | 256 KB |
20_rand_10.txt | AC | 22 ms | 384 KB |
30_max_01.txt | AC | 231 ms | 1792 KB |
30_max_02.txt | AC | 229 ms | 1792 KB |
30_max_03.txt | AC | 232 ms | 1792 KB |
30_max_04.txt | AC | 232 ms | 1792 KB |
30_max_05.txt | AC | 230 ms | 1792 KB |
40_corner_01.txt | AC | 143 ms | 256 KB |
40_corner_02.txt | AC | 231 ms | 384 KB |
40_corner_03.txt | AC | 218 ms | 384 KB |
40_corner_04.txt | AC | 271 ms | 384 KB |
40_corner_05.txt | AC | 175 ms | 384 KB |
40_corner_06.txt | AC | 142 ms | 256 KB |
40_corner_07.txt | AC | 219 ms | 384 KB |