Submission #1691530
Source Code Expand
#include <bits/stdc++.h> #define REP(i,a,b) for(int i=(a);i<(b);i++) #define RREP(i,a,b) for(int i=(a);i>=(b);i--) typedef long long ll; typedef long double ld; using namespace std; const int INF=1e9, MOD=1e9+7, around[]={0,1,1,-1,0,-1,1,0,0}; const ld PI=abs(acos(-1)); int n,m,a,b,s[200010]; int main(){ cin >> n >> m; REP(i,0,m){ cin >> a >> b; s[a]++; s[b+1]--; } REP(i,0,n){ s[i+1]+=s[i]; cout << (s[i+1]%2?1:0); } cout << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - オセロ |
User | ecasdqina |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 493 Byte |
Status | AC |
Exec Time | 169 ms |
Memory | 1280 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 | 1 ms | 256 KB |
00_example_02.txt | AC | 1 ms | 256 KB |
10_small_01.txt | AC | 2 ms | 256 KB |
10_small_02.txt | AC | 1 ms | 256 KB |
10_small_03.txt | AC | 1 ms | 256 KB |
10_small_04.txt | AC | 1 ms | 256 KB |
10_small_05.txt | AC | 1 ms | 256 KB |
10_small_06.txt | AC | 1 ms | 256 KB |
10_small_07.txt | AC | 1 ms | 256 KB |
10_small_08.txt | AC | 1 ms | 256 KB |
10_small_09.txt | AC | 1 ms | 256 KB |
10_small_10.txt | AC | 1 ms | 256 KB |
20_rand_01.txt | AC | 64 ms | 512 KB |
20_rand_02.txt | AC | 16 ms | 256 KB |
20_rand_03.txt | AC | 8 ms | 768 KB |
20_rand_04.txt | AC | 38 ms | 384 KB |
20_rand_05.txt | AC | 16 ms | 256 KB |
20_rand_06.txt | AC | 36 ms | 512 KB |
20_rand_07.txt | AC | 9 ms | 768 KB |
20_rand_08.txt | AC | 3 ms | 384 KB |
20_rand_09.txt | AC | 23 ms | 256 KB |
20_rand_10.txt | AC | 11 ms | 384 KB |
30_max_01.txt | AC | 133 ms | 1152 KB |
30_max_02.txt | AC | 133 ms | 1280 KB |
30_max_03.txt | AC | 135 ms | 1152 KB |
30_max_04.txt | AC | 133 ms | 1152 KB |
30_max_05.txt | AC | 134 ms | 1152 KB |
40_corner_01.txt | AC | 71 ms | 256 KB |
40_corner_02.txt | AC | 128 ms | 1280 KB |
40_corner_03.txt | AC | 128 ms | 1152 KB |
40_corner_04.txt | AC | 169 ms | 1280 KB |
40_corner_05.txt | AC | 93 ms | 1152 KB |
40_corner_06.txt | AC | 71 ms | 256 KB |
40_corner_07.txt | AC | 128 ms | 1280 KB |