Submission #3444453
Source Code Expand
#include <iostream> #include <iomanip> #include <algorithm> #include <vector> #include <map> #include <stack> #include <string> #include <list> #include <deque> #include <math.h> using namespace std; typedef pair<int, int> P; #define ll long long #define int ll #define INF (1LL<<30) int N, Q; int a[200001]; signed main(){ cin >> N >> Q; for (int i = 0; i < Q; i++){ int l, r; cin >> l >> r; a[l]++; a[r + 1]--; } for (int i = 1; i <= N; i++) a[i] += a[i - 1]; for (int i = 1; i <= N; i++){ if (a[i] % 2==0) cout << "0"; else cout << "1"; } cout << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - オセロ |
User | waccho |
Language | C++14 (GCC 5.4.1) |
Score | 60 |
Code Size | 634 Byte |
Status | WA |
Exec Time | 104 ms |
Memory | 2048 KB |
Judge Result
Set Name | Sample | Subtask1 | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 60 / 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 | AC | 1 ms | 256 KB |
00_example_02.txt | AC | 1 ms | 256 KB |
10_small_01.txt | AC | 1 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 | 51 ms | 640 KB |
20_rand_02.txt | AC | 13 ms | 384 KB |
20_rand_03.txt | AC | 6 ms | 1280 KB |
20_rand_04.txt | AC | 30 ms | 512 KB |
20_rand_05.txt | AC | 13 ms | 256 KB |
20_rand_06.txt | AC | 29 ms | 768 KB |
20_rand_07.txt | AC | 7 ms | 1280 KB |
20_rand_08.txt | AC | 2 ms | 384 KB |
20_rand_09.txt | AC | 18 ms | 256 KB |
20_rand_10.txt | AC | 9 ms | 384 KB |
30_max_01.txt | WA | 97 ms | 2048 KB |
30_max_02.txt | WA | 97 ms | 2048 KB |
30_max_03.txt | WA | 97 ms | 2048 KB |
30_max_04.txt | WA | 98 ms | 2048 KB |
30_max_05.txt | WA | 97 ms | 2048 KB |
40_corner_01.txt | AC | 60 ms | 256 KB |
40_corner_02.txt | AC | 54 ms | 2048 KB |
40_corner_03.txt | AC | 104 ms | 2048 KB |
40_corner_04.txt | AC | 68 ms | 2048 KB |
40_corner_05.txt | AC | 76 ms | 2048 KB |
40_corner_06.txt | AC | 61 ms | 256 KB |
40_corner_07.txt | WA | 54 ms | 2048 KB |