Submission #3006417
Source Code Expand
#include<iostream> #include<algorithm> #include<math.h> #include<set> #include<vector> #include<map> #include<functional> #include<iomanip> #include<queue> #include<random> #include<numeric> #include<string> #include<stack> #include<cstring> typedef long long ll; typedef long double ld; using namespace std; ll dx[] = { 0,0,1,-1 }; ll dy[] = { 1,-1,0,0 }; ll gcd(ll a, ll b) { if (a<b) { return gcd(b, a); } else if (a%b) { return gcd(b, a%b); } else { return b; } } ll lcm(ll a, ll b) { return a / gcd(a, b)*b; } int main() { ll table[200001]; ll N, M; cin >> N >> M; for (ll i = 0; i < N; i++) { table[i] = 0; } for (ll i = 0; i < M; i++) { ll l, r; cin >> l >> r; l--; r--; table[l]++; table[r+1]--; } for (ll i = 0; i < N; i++) { if (i > 0) table[i] += table[i - 1]; } for (ll i = 0; i < N; i++) { if (table[i] % 2 == 0) cout << 0; else cout << 1; } }
Submission Info
Submission Time | |
---|---|
Task | C - オセロ |
User | sintan |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 955 Byte |
Status | WA |
Exec Time | 131 ms |
Memory | 2048 KB |
Judge Result
Set Name | Sample | Subtask1 | All | ||||||
---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 60 | 0 / 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 | WA | 1 ms | 256 KB |
00_example_02.txt | WA | 1 ms | 256 KB |
10_small_01.txt | WA | 1 ms | 256 KB |
10_small_02.txt | WA | 1 ms | 256 KB |
10_small_03.txt | WA | 1 ms | 256 KB |
10_small_04.txt | WA | 1 ms | 256 KB |
10_small_05.txt | WA | 1 ms | 256 KB |
10_small_06.txt | WA | 1 ms | 256 KB |
10_small_07.txt | WA | 1 ms | 256 KB |
10_small_08.txt | WA | 1 ms | 256 KB |
10_small_09.txt | WA | 1 ms | 256 KB |
10_small_10.txt | WA | 1 ms | 256 KB |
20_rand_01.txt | WA | 52 ms | 640 KB |
20_rand_02.txt | WA | 13 ms | 384 KB |
20_rand_03.txt | WA | 8 ms | 1280 KB |
20_rand_04.txt | WA | 30 ms | 512 KB |
20_rand_05.txt | WA | 13 ms | 256 KB |
20_rand_06.txt | WA | 30 ms | 768 KB |
20_rand_07.txt | WA | 9 ms | 1280 KB |
20_rand_08.txt | WA | 3 ms | 384 KB |
20_rand_09.txt | WA | 20 ms | 256 KB |
20_rand_10.txt | WA | 9 ms | 384 KB |
30_max_01.txt | WA | 107 ms | 2048 KB |
30_max_02.txt | WA | 108 ms | 2048 KB |
30_max_03.txt | WA | 107 ms | 2048 KB |
30_max_04.txt | WA | 107 ms | 2048 KB |
30_max_05.txt | WA | 107 ms | 2048 KB |
40_corner_01.txt | WA | 60 ms | 256 KB |
40_corner_02.txt | WA | 102 ms | 2048 KB |
40_corner_03.txt | WA | 102 ms | 2048 KB |
40_corner_04.txt | WA | 131 ms | 2048 KB |
40_corner_05.txt | WA | 80 ms | 2048 KB |
40_corner_06.txt | WA | 61 ms | 256 KB |
40_corner_07.txt | WA | 102 ms | 2048 KB |