Submission #3444471
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[200002]; 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 = 0; i < N; i++) a[i+1] += a[i]; for (int i = 1; i <= N; i++) cout << a[i] % 2; cout << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - オセロ |
User | waccho |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 590 Byte |
Status | AC |
Exec Time | 132 ms |
Memory | 2048 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 | 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 | 52 ms | 640 KB |
20_rand_02.txt | AC | 13 ms | 384 KB |
20_rand_03.txt | AC | 7 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 | 30 ms | 768 KB |
20_rand_07.txt | AC | 8 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 | AC | 106 ms | 2048 KB |
30_max_02.txt | AC | 107 ms | 2048 KB |
30_max_03.txt | AC | 107 ms | 2048 KB |
30_max_04.txt | AC | 106 ms | 2048 KB |
30_max_05.txt | AC | 106 ms | 2048 KB |
40_corner_01.txt | AC | 61 ms | 256 KB |
40_corner_02.txt | AC | 102 ms | 2048 KB |
40_corner_03.txt | AC | 102 ms | 2048 KB |
40_corner_04.txt | AC | 132 ms | 2048 KB |
40_corner_05.txt | AC | 79 ms | 2048 KB |
40_corner_06.txt | AC | 60 ms | 256 KB |
40_corner_07.txt | AC | 102 ms | 2048 KB |