#include <bits/extc++.h>
using namespace std;
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2")
#define int long long
#define f first
#define s second
#define all(x) x.begin(), x.end()
#define debug(x) do{auto y = x; cout << #x << " = " << y << endl;}while(0)
// #define endl "\n"
#define unordered_map __gnu_pbds::gp_hash_table
using pii = pair<int, int>;
const int inf = 1ll << 60;
const int MOD = 1e9 + 7;
struct segtree {
vector<int> t, lz;
segtree(int s) {
int n = 1;
while(n < s) n *= 2;
t.resize(n * 2);
lz.resize(n * 2);
}
void push(int n, int tl, int tr) {
t[n] += lz[n];
if(tl + 1 != tr) {
lz[n * 2] += lz[n];
lz[n * 2 + 1] += lz[n];
}
lz[n] = 0;
}
void inc(int ul, int ur, int n = 1, int tl = 0, int tr = -1) {
if(ul >= ur) {
inc(ul, inf);
inc(0, ur);
return;
}
if(tr == -1) tr = t.size() / 2;
if(ul >= tr || ur <= tl) return;
if(ul <= tl && ur >= tr) {
lz[n]++;
return;
}
push(n, tl, tr);
int tm = (tl + tr) / 2;
inc(ul, ur, n * 2, tl, tm);
inc(ul, ur, n * 2 + 1, tm, tr);
push(n * 2, tl, tm);
push(n * 2 + 1, tm, tr);
t[n] = min(t[n * 2], t[n * 2 + 1]);
}
int query(int ql, int qr, int n = 1, int tl = 0, int tr = -1) {
if(tr == -1) tr = t.size() / 2;
if(ql >= tr || qr <= tl) return inf;
push(n, tl, tr);
if(ql <= tl && qr >= tr) return t[n];
int tm = (tl + tr) / 2;
return min(query(ql, qr, n * 2, tl, tm), query(ql, qr, n * 2 + 1, tm, tr));
}
};
struct interval_tree {
vector<unordered_map<int, int>> t;
interval_tree(int s) {
int n = 1;
while(n < s) n *= 2;
t.resize(n * 2);
}
void update(int ul, int ur, int v, int n = 1, int tl = 0, int tr = -1) {
if(ul >= ur) {
update(ul, inf, v);
update(0, ur, v);
return;
}
if(tr == -1) tr = t.size() / 2;
if(ul >= tr || ur <= tl) return;
if(ul <= tl && ur >= tr) {
t[n][v] = 0;
return;
}
int tm = (tl + tr) / 2;
update(ul, ur, v, n * 2, tl, tm);
update(ul, ur, v, n * 2 + 1, tm, tr);
}
void erase(int ul, int ur, int v, int n = 1, int tl = 0, int tr = -1) {
if(ul >= ur) {
erase(ul, inf, v);
erase(0, ur, v);
return;
}
if(tr == -1) tr = t.size() / 2;
if(ul >= tr || ur <= tl) return;
if(ul <= tl && ur >= tr) {
t[n].erase(v);
return;
}
int tm = (tl + tr) / 2;
erase(ul, ur, v, n * 2, tl, tm);
erase(ul, ur, v, n * 2 + 1, tm, tr);
}
int cnt(int i, int n = 1, int tl = 0, int tr = -1) {
if(tr == -1) tr = t.size() / 2;
if(tl + 1 == tr) return t[n].size();
int tm = (tl + tr) / 2;
if(i < tm) return t[n].size() + cnt(i, n * 2, tl, tm);
return t[n].size() + cnt(i, n * 2 + 1, tm, tr);
}
pii get(int i, int n = 1, int tl = 0, int tr = -1) {
if(tr == -1) tr = t.size() / 2;
pii ret = {-1, -1};
if(tl + 1 != tr) {
int tm = (tl + tr) / 2;
if(i < tm) ret = get(i, n * 2, tl, tm);
else ret = get(i, n * 2 + 1, tm, tr);
}
for(auto i : t[n]) {
if(ret.s != -1 && ret.f != -1) return ret;
if(ret.f == -1) ret.f = i.f;
else ret.s = i.f;
}
return ret;
}
};
void die() {
cout << "impossible" << endl;
exit(0);
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, m; cin >> n >> m;
vector<pii> rs(m);
interval_tree intr(n);
for(int i = 0; i < m; i++) {
int a, b; cin >> a >> b; a--;
rs[i] = {a, b};
intr.update(a, b, i);
}
segtree st1(n), st2(n);
deque<int> ids;
for(int i = 0; i < n; i++) {
int c = intr.cnt(i);
if(c < 2) die();
if(c == 2) ids.push_back(i);
}
vector<int> which(m);
while(ids.size()) {
int i;
pii x = intr.get(ids.front());
if(which[x.f] || which[x.s]) {
i = ids[0];
ids.pop_front();
} else {
i = ids.back();
ids.pop_back();
x = intr.get(i);
}
if(!which[x.f]) {
if(which[x.s] != 1) {
st1.inc(rs[x.f].f, rs[x.f].s);
which[x.f] = 1;
} else {
st2.inc(rs[x.f].f, rs[x.f].s);
which[x.f] = 2;
}
}
if(!which[x.s]) {
if(which[x.f] != 2) {
st2.inc(rs[x.s].f, rs[x.s].s);
which[x.s] = 2;
} else {
st1.inc(rs[x.s].f, rs[x.s].s);
which[x.s] = 1;
}
}
}
for(int i = 0; i < m; i++) {
if(!which[i]) continue;
intr.erase(rs[i].f, rs[i].s, i);
}
for(int i = 0; i < n; i++) {
pii x = intr.get(i);
if(st1.query(i, i + 1) == 0) {
if(x.f == -1) die();
st1.inc(rs[x.f].f, rs[x.f].s);
which[x.f] = 1;
intr.erase(rs[x.f].f, rs[x.f].s, x.f);
swap(x.f, x.s);
}
if(st2.query(i, i + 1) == 0) {
if(x.f == -1) die();
st2.inc(rs[x.f].f, rs[x.f].s);
which[x.f] = 2;
intr.erase(rs[x.f].f, rs[x.f].s, x.f);
}
}
for(auto i = 0; i < m; i++) {
cout << which[i] % 2;
}
cout << endl;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
356 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
604 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
1 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
456 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
1 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
452 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
356 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
604 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
1 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
456 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
1 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
452 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
1 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
1 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
1 ms |
348 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
1 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
344 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
0 ms |
348 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
348 KB |
Output is correct |
55 |
Correct |
1 ms |
348 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
1 ms |
360 KB |
Output is correct |
58 |
Correct |
0 ms |
348 KB |
Output is correct |
59 |
Correct |
0 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
456 KB |
Output is correct |
61 |
Correct |
1 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
0 ms |
348 KB |
Output is correct |
64 |
Correct |
0 ms |
348 KB |
Output is correct |
65 |
Correct |
0 ms |
344 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
1 ms |
348 KB |
Output is correct |
68 |
Correct |
1 ms |
348 KB |
Output is correct |
69 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
356 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
604 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
1 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
456 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
1 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
452 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
1 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
1 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
1 ms |
348 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
1 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
344 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
0 ms |
348 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
348 KB |
Output is correct |
55 |
Correct |
1 ms |
348 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
1 ms |
360 KB |
Output is correct |
58 |
Correct |
0 ms |
348 KB |
Output is correct |
59 |
Correct |
0 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
456 KB |
Output is correct |
61 |
Correct |
1 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
0 ms |
348 KB |
Output is correct |
64 |
Correct |
0 ms |
348 KB |
Output is correct |
65 |
Correct |
0 ms |
344 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
1 ms |
348 KB |
Output is correct |
68 |
Correct |
1 ms |
348 KB |
Output is correct |
69 |
Correct |
1 ms |
348 KB |
Output is correct |
70 |
Correct |
1 ms |
1372 KB |
Output is correct |
71 |
Correct |
2 ms |
1116 KB |
Output is correct |
72 |
Correct |
1 ms |
1172 KB |
Output is correct |
73 |
Correct |
1 ms |
1116 KB |
Output is correct |
74 |
Correct |
2 ms |
1112 KB |
Output is correct |
75 |
Correct |
0 ms |
348 KB |
Output is correct |
76 |
Correct |
1 ms |
1372 KB |
Output is correct |
77 |
Correct |
1 ms |
1372 KB |
Output is correct |
78 |
Correct |
1 ms |
1116 KB |
Output is correct |
79 |
Correct |
1 ms |
1116 KB |
Output is correct |
80 |
Correct |
1 ms |
1116 KB |
Output is correct |
81 |
Correct |
1 ms |
964 KB |
Output is correct |
82 |
Correct |
1 ms |
1116 KB |
Output is correct |
83 |
Correct |
2 ms |
1116 KB |
Output is correct |
84 |
Correct |
2 ms |
1116 KB |
Output is correct |
85 |
Correct |
1 ms |
1116 KB |
Output is correct |
86 |
Correct |
1 ms |
1116 KB |
Output is correct |
87 |
Correct |
2 ms |
1116 KB |
Output is correct |
88 |
Correct |
1 ms |
1116 KB |
Output is correct |
89 |
Correct |
1 ms |
1224 KB |
Output is correct |
90 |
Correct |
2 ms |
1624 KB |
Output is correct |
91 |
Correct |
1 ms |
1116 KB |
Output is correct |
92 |
Correct |
1 ms |
604 KB |
Output is correct |
93 |
Correct |
1 ms |
1116 KB |
Output is correct |
94 |
Correct |
1 ms |
1116 KB |
Output is correct |
95 |
Correct |
1 ms |
964 KB |
Output is correct |
96 |
Correct |
3 ms |
1116 KB |
Output is correct |
97 |
Correct |
2 ms |
1116 KB |
Output is correct |
98 |
Correct |
1 ms |
604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
138 ms |
128892 KB |
Output is correct |
2 |
Correct |
121 ms |
89744 KB |
Output is correct |
3 |
Correct |
110 ms |
153560 KB |
Output is correct |
4 |
Correct |
566 ms |
154056 KB |
Output is correct |
5 |
Correct |
279 ms |
92872 KB |
Output is correct |
6 |
Correct |
102 ms |
93780 KB |
Output is correct |
7 |
Correct |
266 ms |
92656 KB |
Output is correct |
8 |
Correct |
129 ms |
89172 KB |
Output is correct |
9 |
Correct |
120 ms |
89172 KB |
Output is correct |
10 |
Correct |
283 ms |
93040 KB |
Output is correct |
11 |
Correct |
253 ms |
92112 KB |
Output is correct |
12 |
Correct |
223 ms |
92752 KB |
Output is correct |
13 |
Correct |
41 ms |
89428 KB |
Output is correct |
14 |
Correct |
43 ms |
89516 KB |
Output is correct |
15 |
Correct |
179 ms |
92752 KB |
Output is correct |
16 |
Correct |
106 ms |
152636 KB |
Output is correct |
17 |
Correct |
399 ms |
177100 KB |
Output is correct |
18 |
Correct |
185 ms |
79440 KB |
Output is correct |
19 |
Correct |
51 ms |
92184 KB |
Output is correct |
20 |
Correct |
148 ms |
48744 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
356 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
604 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
1 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
456 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
1 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
452 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
1 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
1 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
1 ms |
348 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
1 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
344 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
0 ms |
348 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
348 KB |
Output is correct |
55 |
Correct |
1 ms |
348 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
1 ms |
360 KB |
Output is correct |
58 |
Correct |
0 ms |
348 KB |
Output is correct |
59 |
Correct |
0 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
456 KB |
Output is correct |
61 |
Correct |
1 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
0 ms |
348 KB |
Output is correct |
64 |
Correct |
0 ms |
348 KB |
Output is correct |
65 |
Correct |
0 ms |
344 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
1 ms |
348 KB |
Output is correct |
68 |
Correct |
1 ms |
348 KB |
Output is correct |
69 |
Correct |
1 ms |
348 KB |
Output is correct |
70 |
Correct |
1 ms |
1372 KB |
Output is correct |
71 |
Correct |
2 ms |
1116 KB |
Output is correct |
72 |
Correct |
1 ms |
1172 KB |
Output is correct |
73 |
Correct |
1 ms |
1116 KB |
Output is correct |
74 |
Correct |
2 ms |
1112 KB |
Output is correct |
75 |
Correct |
0 ms |
348 KB |
Output is correct |
76 |
Correct |
1 ms |
1372 KB |
Output is correct |
77 |
Correct |
1 ms |
1372 KB |
Output is correct |
78 |
Correct |
1 ms |
1116 KB |
Output is correct |
79 |
Correct |
1 ms |
1116 KB |
Output is correct |
80 |
Correct |
1 ms |
1116 KB |
Output is correct |
81 |
Correct |
1 ms |
964 KB |
Output is correct |
82 |
Correct |
1 ms |
1116 KB |
Output is correct |
83 |
Correct |
2 ms |
1116 KB |
Output is correct |
84 |
Correct |
2 ms |
1116 KB |
Output is correct |
85 |
Correct |
1 ms |
1116 KB |
Output is correct |
86 |
Correct |
1 ms |
1116 KB |
Output is correct |
87 |
Correct |
2 ms |
1116 KB |
Output is correct |
88 |
Correct |
1 ms |
1116 KB |
Output is correct |
89 |
Correct |
1 ms |
1224 KB |
Output is correct |
90 |
Correct |
2 ms |
1624 KB |
Output is correct |
91 |
Correct |
1 ms |
1116 KB |
Output is correct |
92 |
Correct |
1 ms |
604 KB |
Output is correct |
93 |
Correct |
1 ms |
1116 KB |
Output is correct |
94 |
Correct |
1 ms |
1116 KB |
Output is correct |
95 |
Correct |
1 ms |
964 KB |
Output is correct |
96 |
Correct |
3 ms |
1116 KB |
Output is correct |
97 |
Correct |
2 ms |
1116 KB |
Output is correct |
98 |
Correct |
1 ms |
604 KB |
Output is correct |
99 |
Correct |
138 ms |
128892 KB |
Output is correct |
100 |
Correct |
121 ms |
89744 KB |
Output is correct |
101 |
Correct |
110 ms |
153560 KB |
Output is correct |
102 |
Correct |
566 ms |
154056 KB |
Output is correct |
103 |
Correct |
279 ms |
92872 KB |
Output is correct |
104 |
Correct |
102 ms |
93780 KB |
Output is correct |
105 |
Correct |
266 ms |
92656 KB |
Output is correct |
106 |
Correct |
129 ms |
89172 KB |
Output is correct |
107 |
Correct |
120 ms |
89172 KB |
Output is correct |
108 |
Correct |
283 ms |
93040 KB |
Output is correct |
109 |
Correct |
253 ms |
92112 KB |
Output is correct |
110 |
Correct |
223 ms |
92752 KB |
Output is correct |
111 |
Correct |
41 ms |
89428 KB |
Output is correct |
112 |
Correct |
43 ms |
89516 KB |
Output is correct |
113 |
Correct |
179 ms |
92752 KB |
Output is correct |
114 |
Correct |
106 ms |
152636 KB |
Output is correct |
115 |
Correct |
399 ms |
177100 KB |
Output is correct |
116 |
Correct |
185 ms |
79440 KB |
Output is correct |
117 |
Correct |
51 ms |
92184 KB |
Output is correct |
118 |
Correct |
148 ms |
48744 KB |
Output is correct |
119 |
Correct |
137 ms |
89424 KB |
Output is correct |
120 |
Correct |
229 ms |
92084 KB |
Output is correct |
121 |
Correct |
203 ms |
90916 KB |
Output is correct |
122 |
Correct |
0 ms |
348 KB |
Output is correct |
123 |
Correct |
47 ms |
88884 KB |
Output is correct |
124 |
Correct |
61 ms |
89732 KB |
Output is correct |
125 |
Correct |
175 ms |
90212 KB |
Output is correct |
126 |
Correct |
118 ms |
89172 KB |
Output is correct |
127 |
Correct |
132 ms |
89432 KB |
Output is correct |
128 |
Correct |
255 ms |
92508 KB |
Output is correct |
129 |
Correct |
201 ms |
91220 KB |
Output is correct |
130 |
Correct |
249 ms |
91344 KB |
Output is correct |
131 |
Correct |
120 ms |
89492 KB |
Output is correct |
132 |
Correct |
123 ms |
89428 KB |
Output is correct |
133 |
Correct |
396 ms |
178980 KB |
Output is correct |
134 |
Correct |
186 ms |
112568 KB |
Output is correct |
135 |
Correct |
97 ms |
88548 KB |
Output is correct |
136 |
Correct |
92 ms |
95720 KB |
Output is correct |
137 |
Correct |
111 ms |
97876 KB |
Output is correct |
138 |
Correct |
98 ms |
88812 KB |
Output is correct |