#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define ll long long
#define file(name) \
if(fopen(name".inp", "r")) \
freopen(name".inp", "r", stdin), freopen(name".out", "w", stdout); \
const int MAX = 5e5 + 5;
struct Edge {
int u, v;
int get(int x) {
return x ^ u ^ v;
}
} e[MAX];
int n, m, q;
vector <int> adj[MAX];
namespace sub1 {
bool check() {
return max({n, m, q}) <= 5000;
}
int dd[MAX];
bool solve(int l, int r) {
fill(dd + 1, dd + n + 1, -1);
bool ans = true;
function <void(int, int)>
dfs = [&] (int u, int c) {
dd[u] = c;
for (int i : adj[u]) if(i < l || i > r) {
int v = e[i].get(u);
if(dd[v] == -1) {
dfs(v, 1 ^ c);
} else {
if(c == dd[v]) {
ans = false;
}
}
}
};
for (int u = 1; u <= n; ++u) if(dd[u] == -1) {
dfs(u, 0);
}
return ans;
}
void solve() {
while(q--) {
int l, r; cin >> l >> r;
cout << (solve(l, r) ? "NO" : "YES") << '\n';
}
exit(0);
}
}
struct Query {
int l, r, id;
} queries[MAX];
int ans[MAX];
namespace sub2 {
bool check() {
for (int i = 1; i <= q; ++i) {
if(queries[i].l != 1) {
return false;
}
}
return true;
}
int rank[MAX];
pair <int, int> par[MAX];
bool bipartite[MAX];
void make_set(int v) {
par[v] = make_pair(v, 0);
rank[v] = 0;
bipartite[v] = true;
}
pair <int, int> find_set(int u) {
if(u != par[u].fi) {
int parity = par[u].se;
par[u] = find_set(par[u].fi);
par[u].se ^= parity;
}
return par[u];
}
bool total = true;
bool merge(int a, int b) {
pair <int, int> pa = find_set(a); a = pa.fi; int x = pa.se;
pair <int, int> pb = find_set(b); b = pb.fi; int y = pb.se;
if(a == b) {
if(x == y) {
bipartite[a] = false;
total = false;
}
return false;
}
if(rank[a] < rank[b]) swap(a, b);
par[b] = make_pair(a, 1 ^ x ^ y);
bipartite[a] &= bipartite[b];
if(rank[a] == rank[b]) rank[a]++;
return true;
}
void solve() {
sort(queries + 1, queries + q + 1, [&] (const Query &a, const Query &b) {
return a.r > b.r;
});
int j = m;
for (int i = 1; i <= n; ++i) make_set(i);
for (int i = 1; i <= q; ++i) {
while(j >= 1 && j > queries[i].r) {
merge(e[j].u, e[j].v);
j--;
}
ans[queries[i].id] = total;
}
for (int i = 1; i <= q; ++i) {
cout << (ans[i] ? "NO" : "YES") << '\n';
}
exit(0);
}
}
namespace sub3 {
bool check() {
return true;
}
struct save {
int u, v, ranku, rankv, res, cnt;
};
vector <save> tmp;
int res = true;
int lab[MAX], wei[MAX], dp[MAX];
int find(int u) {
return lab[u] < 0 ? u : find(lab[u]);
}
int get_w(int u) {
return lab[u] < 0 ? 0 : wei[u] ^ get_w(lab[u]);
}
bool merge(int u, int v, int cnt) {
if(!res) return false;
int w = 1 ^ get_w(u) ^ get_w(v);
u = find(u), v = find(v);
assert(u != 0 && v != 0);
if(lab[u] > lab[v]) swap(u, v);
tmp.push_back({u, v, lab[u], lab[v], res, cnt});
if(u == v) {
if(w) res = false;
return w == 0;
}
lab[u] += lab[v];
lab[v] = u;
wei[v] = w;
return true;
}
void rollback(int l, int r) {
if(l > r) return;
while(!tmp.empty() && tmp.back().cnt >= l && tmp.back().cnt <= r) {
auto [u, v, labu, labv, x, _] = tmp.back(); tmp.pop_back();
lab[u] = labu, lab[v] = labv;
wei[v] = 0;
res = x;
}
}
void dnc(int l, int r, int optL, int optR) {
if(l > r) return;
int mid = l + r >> 1;
for (int i = l; i < mid; i++) {
merge(e[i].u, e[i].v, i);
}
int optM = max(mid, optL) - 1;
for (int i = optR; i >= max(mid, optL); --i) {
if(!res) {
optM = i;
break;
}
merge(e[i].u, e[i].v, i);
}
dp[mid] = ++optM;
optM = min(m, optM);
rollback(optM, optR);
merge(e[mid].u, e[mid].v, mid);
dnc(mid + 1, r, optM, optR);
rollback(l, mid);
for (int i = optM + 1; i <= optR; ++i) {
merge(e[i].u, e[i].v, i);
}
dnc(l, mid - 1, optL, optM);
rollback(optM + 1, optR);
}
void solve() {
memset(lab, -1, sizeof lab);
dnc(1, m, 1, m);
for (int i = 1; i <= q; ++i) {
int l = queries[i].l, r = queries[i].r;
cout << (dp[l] > r ? "YES" : "NO") << '\n';
}
}
}
void you_make_it(void) {
cin >> n >> m >> q;
for (int i = 1; i <= m; ++i) {
cin >> e[i].u >> e[i].v;
adj[e[i].u].push_back(i);
adj[e[i].v].push_back(i);
}
// if(sub1::check()) sub1::solve();
for (int i = 1; i <= q; ++i) cin >> queries[i].l >> queries[i].r, queries[i].id = i;
if(sub3::check()) sub3::solve();
}
signed main() {
#ifdef LOCAL
freopen("TASK.inp", "r", stdin);
freopen("TASK.out", "w", stdout);
#endif
file("joker");
auto start_time = chrono::steady_clock::now();
cin.tie(0), cout.tie(0) -> sync_with_stdio(0);
you_make_it();
auto end_time = chrono::steady_clock::now();
cerr << "\nExecution time : " << chrono::duration_cast <chrono::milliseconds> (end_time - start_time).count() << "[ms]" << endl;
return (0 ^ 0);
}
// Dream it. Wish it. Do it.
Compilation message
Joker.cpp: In function 'void sub3::dnc(int, int, int, int)':
Joker.cpp:197:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
197 | int mid = l + r >> 1;
| ~~^~~
Joker.cpp: In function 'int main()':
Joker.cpp:10:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
10 | freopen(name".inp", "r", stdin), freopen(name".out", "w", stdout); \
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Joker.cpp:261:5: note: in expansion of macro 'file'
261 | file("joker");
| ^~~~
Joker.cpp:10:49: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
10 | freopen(name".inp", "r", stdin), freopen(name".out", "w", stdout); \
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Joker.cpp:261:5: note: in expansion of macro 'file'
261 | file("joker");
| ^~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
22876 KB |
Output is correct |
2 |
Correct |
5 ms |
22876 KB |
Output is correct |
3 |
Correct |
4 ms |
22872 KB |
Output is correct |
4 |
Correct |
4 ms |
23028 KB |
Output is correct |
5 |
Correct |
4 ms |
22876 KB |
Output is correct |
6 |
Correct |
4 ms |
22876 KB |
Output is correct |
7 |
Correct |
4 ms |
22876 KB |
Output is correct |
8 |
Correct |
4 ms |
22876 KB |
Output is correct |
9 |
Correct |
5 ms |
22976 KB |
Output is correct |
10 |
Correct |
4 ms |
22876 KB |
Output is correct |
11 |
Correct |
5 ms |
23020 KB |
Output is correct |
12 |
Correct |
5 ms |
22876 KB |
Output is correct |
13 |
Correct |
5 ms |
22876 KB |
Output is correct |
14 |
Correct |
5 ms |
22876 KB |
Output is correct |
15 |
Correct |
5 ms |
23128 KB |
Output is correct |
16 |
Correct |
4 ms |
22876 KB |
Output is correct |
17 |
Correct |
5 ms |
22876 KB |
Output is correct |
18 |
Correct |
5 ms |
22876 KB |
Output is correct |
19 |
Correct |
4 ms |
22876 KB |
Output is correct |
20 |
Correct |
4 ms |
22960 KB |
Output is correct |
21 |
Correct |
4 ms |
22876 KB |
Output is correct |
22 |
Correct |
5 ms |
22876 KB |
Output is correct |
23 |
Correct |
4 ms |
22876 KB |
Output is correct |
24 |
Correct |
5 ms |
22876 KB |
Output is correct |
25 |
Correct |
5 ms |
22876 KB |
Output is correct |
26 |
Correct |
5 ms |
22876 KB |
Output is correct |
27 |
Correct |
4 ms |
22876 KB |
Output is correct |
28 |
Correct |
5 ms |
22880 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
22876 KB |
Output is correct |
2 |
Correct |
5 ms |
22876 KB |
Output is correct |
3 |
Correct |
4 ms |
22872 KB |
Output is correct |
4 |
Correct |
4 ms |
23028 KB |
Output is correct |
5 |
Correct |
4 ms |
22876 KB |
Output is correct |
6 |
Correct |
4 ms |
22876 KB |
Output is correct |
7 |
Correct |
4 ms |
22876 KB |
Output is correct |
8 |
Correct |
4 ms |
22876 KB |
Output is correct |
9 |
Correct |
5 ms |
22976 KB |
Output is correct |
10 |
Correct |
4 ms |
22876 KB |
Output is correct |
11 |
Correct |
5 ms |
23020 KB |
Output is correct |
12 |
Correct |
5 ms |
22876 KB |
Output is correct |
13 |
Correct |
5 ms |
22876 KB |
Output is correct |
14 |
Correct |
5 ms |
22876 KB |
Output is correct |
15 |
Correct |
5 ms |
23128 KB |
Output is correct |
16 |
Correct |
4 ms |
22876 KB |
Output is correct |
17 |
Correct |
5 ms |
22876 KB |
Output is correct |
18 |
Correct |
5 ms |
22876 KB |
Output is correct |
19 |
Correct |
4 ms |
22876 KB |
Output is correct |
20 |
Correct |
4 ms |
22960 KB |
Output is correct |
21 |
Correct |
4 ms |
22876 KB |
Output is correct |
22 |
Correct |
5 ms |
22876 KB |
Output is correct |
23 |
Correct |
4 ms |
22876 KB |
Output is correct |
24 |
Correct |
5 ms |
22876 KB |
Output is correct |
25 |
Correct |
5 ms |
22876 KB |
Output is correct |
26 |
Correct |
5 ms |
22876 KB |
Output is correct |
27 |
Correct |
4 ms |
22876 KB |
Output is correct |
28 |
Correct |
5 ms |
22880 KB |
Output is correct |
29 |
Correct |
5 ms |
22996 KB |
Output is correct |
30 |
Correct |
6 ms |
23132 KB |
Output is correct |
31 |
Correct |
6 ms |
23040 KB |
Output is correct |
32 |
Correct |
6 ms |
23116 KB |
Output is correct |
33 |
Correct |
5 ms |
23132 KB |
Output is correct |
34 |
Correct |
6 ms |
23192 KB |
Output is correct |
35 |
Correct |
6 ms |
23136 KB |
Output is correct |
36 |
Correct |
6 ms |
23136 KB |
Output is correct |
37 |
Correct |
7 ms |
23136 KB |
Output is correct |
38 |
Correct |
6 ms |
23040 KB |
Output is correct |
39 |
Correct |
5 ms |
23144 KB |
Output is correct |
40 |
Correct |
5 ms |
23196 KB |
Output is correct |
41 |
Correct |
5 ms |
23144 KB |
Output is correct |
42 |
Correct |
5 ms |
23144 KB |
Output is correct |
43 |
Correct |
6 ms |
23056 KB |
Output is correct |
44 |
Correct |
5 ms |
23144 KB |
Output is correct |
45 |
Correct |
5 ms |
23144 KB |
Output is correct |
46 |
Correct |
5 ms |
23144 KB |
Output is correct |
47 |
Correct |
5 ms |
23144 KB |
Output is correct |
48 |
Correct |
5 ms |
23128 KB |
Output is correct |
49 |
Correct |
5 ms |
23128 KB |
Output is correct |
50 |
Correct |
6 ms |
23132 KB |
Output is correct |
51 |
Correct |
5 ms |
23128 KB |
Output is correct |
52 |
Correct |
5 ms |
23132 KB |
Output is correct |
53 |
Correct |
5 ms |
23132 KB |
Output is correct |
54 |
Correct |
6 ms |
23132 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
22876 KB |
Output is correct |
2 |
Correct |
5 ms |
22876 KB |
Output is correct |
3 |
Correct |
119 ms |
33516 KB |
Output is correct |
4 |
Correct |
196 ms |
43460 KB |
Output is correct |
5 |
Correct |
125 ms |
43652 KB |
Output is correct |
6 |
Correct |
115 ms |
39600 KB |
Output is correct |
7 |
Correct |
112 ms |
38604 KB |
Output is correct |
8 |
Correct |
130 ms |
37816 KB |
Output is correct |
9 |
Correct |
134 ms |
38604 KB |
Output is correct |
10 |
Correct |
174 ms |
40524 KB |
Output is correct |
11 |
Correct |
136 ms |
39368 KB |
Output is correct |
12 |
Correct |
147 ms |
39932 KB |
Output is correct |
13 |
Correct |
145 ms |
37880 KB |
Output is correct |
14 |
Correct |
133 ms |
37836 KB |
Output is correct |
15 |
Correct |
166 ms |
38956 KB |
Output is correct |
16 |
Correct |
176 ms |
41072 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
22876 KB |
Output is correct |
2 |
Correct |
5 ms |
22876 KB |
Output is correct |
3 |
Correct |
4 ms |
22872 KB |
Output is correct |
4 |
Correct |
4 ms |
23028 KB |
Output is correct |
5 |
Correct |
4 ms |
22876 KB |
Output is correct |
6 |
Correct |
4 ms |
22876 KB |
Output is correct |
7 |
Correct |
4 ms |
22876 KB |
Output is correct |
8 |
Correct |
4 ms |
22876 KB |
Output is correct |
9 |
Correct |
5 ms |
22976 KB |
Output is correct |
10 |
Correct |
4 ms |
22876 KB |
Output is correct |
11 |
Correct |
5 ms |
23020 KB |
Output is correct |
12 |
Correct |
5 ms |
22876 KB |
Output is correct |
13 |
Correct |
5 ms |
22876 KB |
Output is correct |
14 |
Correct |
5 ms |
22876 KB |
Output is correct |
15 |
Correct |
5 ms |
23128 KB |
Output is correct |
16 |
Correct |
4 ms |
22876 KB |
Output is correct |
17 |
Correct |
5 ms |
22876 KB |
Output is correct |
18 |
Correct |
5 ms |
22876 KB |
Output is correct |
19 |
Correct |
4 ms |
22876 KB |
Output is correct |
20 |
Correct |
4 ms |
22960 KB |
Output is correct |
21 |
Correct |
4 ms |
22876 KB |
Output is correct |
22 |
Correct |
5 ms |
22876 KB |
Output is correct |
23 |
Correct |
4 ms |
22876 KB |
Output is correct |
24 |
Correct |
5 ms |
22876 KB |
Output is correct |
25 |
Correct |
5 ms |
22876 KB |
Output is correct |
26 |
Correct |
5 ms |
22876 KB |
Output is correct |
27 |
Correct |
4 ms |
22876 KB |
Output is correct |
28 |
Correct |
5 ms |
22880 KB |
Output is correct |
29 |
Correct |
119 ms |
33516 KB |
Output is correct |
30 |
Correct |
196 ms |
43460 KB |
Output is correct |
31 |
Correct |
125 ms |
43652 KB |
Output is correct |
32 |
Correct |
115 ms |
39600 KB |
Output is correct |
33 |
Correct |
112 ms |
38604 KB |
Output is correct |
34 |
Correct |
130 ms |
37816 KB |
Output is correct |
35 |
Correct |
134 ms |
38604 KB |
Output is correct |
36 |
Correct |
174 ms |
40524 KB |
Output is correct |
37 |
Correct |
136 ms |
39368 KB |
Output is correct |
38 |
Correct |
147 ms |
39932 KB |
Output is correct |
39 |
Correct |
145 ms |
37880 KB |
Output is correct |
40 |
Correct |
133 ms |
37836 KB |
Output is correct |
41 |
Correct |
166 ms |
38956 KB |
Output is correct |
42 |
Correct |
176 ms |
41072 KB |
Output is correct |
43 |
Correct |
123 ms |
39116 KB |
Output is correct |
44 |
Correct |
200 ms |
43960 KB |
Output is correct |
45 |
Correct |
168 ms |
44764 KB |
Output is correct |
46 |
Correct |
116 ms |
40220 KB |
Output is correct |
47 |
Correct |
112 ms |
40004 KB |
Output is correct |
48 |
Correct |
152 ms |
38592 KB |
Output is correct |
49 |
Correct |
177 ms |
41244 KB |
Output is correct |
50 |
Correct |
151 ms |
38696 KB |
Output is correct |
51 |
Correct |
143 ms |
40472 KB |
Output is correct |
52 |
Correct |
154 ms |
41072 KB |
Output is correct |
53 |
Correct |
147 ms |
37948 KB |
Output is correct |
54 |
Correct |
153 ms |
39692 KB |
Output is correct |
55 |
Correct |
164 ms |
40392 KB |
Output is correct |
56 |
Correct |
184 ms |
40980 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
22876 KB |
Output is correct |
2 |
Correct |
5 ms |
22876 KB |
Output is correct |
3 |
Correct |
4 ms |
22872 KB |
Output is correct |
4 |
Correct |
4 ms |
23028 KB |
Output is correct |
5 |
Correct |
4 ms |
22876 KB |
Output is correct |
6 |
Correct |
4 ms |
22876 KB |
Output is correct |
7 |
Correct |
4 ms |
22876 KB |
Output is correct |
8 |
Correct |
4 ms |
22876 KB |
Output is correct |
9 |
Correct |
5 ms |
22976 KB |
Output is correct |
10 |
Correct |
4 ms |
22876 KB |
Output is correct |
11 |
Correct |
5 ms |
23020 KB |
Output is correct |
12 |
Correct |
5 ms |
22876 KB |
Output is correct |
13 |
Correct |
5 ms |
22876 KB |
Output is correct |
14 |
Correct |
5 ms |
22876 KB |
Output is correct |
15 |
Correct |
5 ms |
23128 KB |
Output is correct |
16 |
Correct |
4 ms |
22876 KB |
Output is correct |
17 |
Correct |
5 ms |
22876 KB |
Output is correct |
18 |
Correct |
5 ms |
22876 KB |
Output is correct |
19 |
Correct |
4 ms |
22876 KB |
Output is correct |
20 |
Correct |
4 ms |
22960 KB |
Output is correct |
21 |
Correct |
4 ms |
22876 KB |
Output is correct |
22 |
Correct |
5 ms |
22876 KB |
Output is correct |
23 |
Correct |
4 ms |
22876 KB |
Output is correct |
24 |
Correct |
5 ms |
22876 KB |
Output is correct |
25 |
Correct |
5 ms |
22876 KB |
Output is correct |
26 |
Correct |
5 ms |
22876 KB |
Output is correct |
27 |
Correct |
4 ms |
22876 KB |
Output is correct |
28 |
Correct |
5 ms |
22880 KB |
Output is correct |
29 |
Correct |
5 ms |
22996 KB |
Output is correct |
30 |
Correct |
6 ms |
23132 KB |
Output is correct |
31 |
Correct |
6 ms |
23040 KB |
Output is correct |
32 |
Correct |
6 ms |
23116 KB |
Output is correct |
33 |
Correct |
5 ms |
23132 KB |
Output is correct |
34 |
Correct |
6 ms |
23192 KB |
Output is correct |
35 |
Correct |
6 ms |
23136 KB |
Output is correct |
36 |
Correct |
6 ms |
23136 KB |
Output is correct |
37 |
Correct |
7 ms |
23136 KB |
Output is correct |
38 |
Correct |
6 ms |
23040 KB |
Output is correct |
39 |
Correct |
5 ms |
23144 KB |
Output is correct |
40 |
Correct |
5 ms |
23196 KB |
Output is correct |
41 |
Correct |
5 ms |
23144 KB |
Output is correct |
42 |
Correct |
5 ms |
23144 KB |
Output is correct |
43 |
Correct |
6 ms |
23056 KB |
Output is correct |
44 |
Correct |
5 ms |
23144 KB |
Output is correct |
45 |
Correct |
5 ms |
23144 KB |
Output is correct |
46 |
Correct |
5 ms |
23144 KB |
Output is correct |
47 |
Correct |
5 ms |
23144 KB |
Output is correct |
48 |
Correct |
5 ms |
23128 KB |
Output is correct |
49 |
Correct |
5 ms |
23128 KB |
Output is correct |
50 |
Correct |
6 ms |
23132 KB |
Output is correct |
51 |
Correct |
5 ms |
23128 KB |
Output is correct |
52 |
Correct |
5 ms |
23132 KB |
Output is correct |
53 |
Correct |
5 ms |
23132 KB |
Output is correct |
54 |
Correct |
6 ms |
23132 KB |
Output is correct |
55 |
Correct |
97 ms |
33640 KB |
Output is correct |
56 |
Correct |
169 ms |
40048 KB |
Output is correct |
57 |
Correct |
93 ms |
40328 KB |
Output is correct |
58 |
Correct |
89 ms |
35016 KB |
Output is correct |
59 |
Correct |
121 ms |
35788 KB |
Output is correct |
60 |
Correct |
146 ms |
36804 KB |
Output is correct |
61 |
Correct |
123 ms |
34760 KB |
Output is correct |
62 |
Correct |
122 ms |
35948 KB |
Output is correct |
63 |
Correct |
104 ms |
34244 KB |
Output is correct |
64 |
Correct |
130 ms |
35784 KB |
Output is correct |
65 |
Correct |
145 ms |
36808 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
22876 KB |
Output is correct |
2 |
Correct |
5 ms |
22876 KB |
Output is correct |
3 |
Correct |
4 ms |
22872 KB |
Output is correct |
4 |
Correct |
4 ms |
23028 KB |
Output is correct |
5 |
Correct |
4 ms |
22876 KB |
Output is correct |
6 |
Correct |
4 ms |
22876 KB |
Output is correct |
7 |
Correct |
4 ms |
22876 KB |
Output is correct |
8 |
Correct |
4 ms |
22876 KB |
Output is correct |
9 |
Correct |
5 ms |
22976 KB |
Output is correct |
10 |
Correct |
4 ms |
22876 KB |
Output is correct |
11 |
Correct |
5 ms |
23020 KB |
Output is correct |
12 |
Correct |
5 ms |
22876 KB |
Output is correct |
13 |
Correct |
5 ms |
22876 KB |
Output is correct |
14 |
Correct |
5 ms |
22876 KB |
Output is correct |
15 |
Correct |
5 ms |
23128 KB |
Output is correct |
16 |
Correct |
4 ms |
22876 KB |
Output is correct |
17 |
Correct |
5 ms |
22876 KB |
Output is correct |
18 |
Correct |
5 ms |
22876 KB |
Output is correct |
19 |
Correct |
4 ms |
22876 KB |
Output is correct |
20 |
Correct |
4 ms |
22960 KB |
Output is correct |
21 |
Correct |
4 ms |
22876 KB |
Output is correct |
22 |
Correct |
5 ms |
22876 KB |
Output is correct |
23 |
Correct |
4 ms |
22876 KB |
Output is correct |
24 |
Correct |
5 ms |
22876 KB |
Output is correct |
25 |
Correct |
5 ms |
22876 KB |
Output is correct |
26 |
Correct |
5 ms |
22876 KB |
Output is correct |
27 |
Correct |
4 ms |
22876 KB |
Output is correct |
28 |
Correct |
5 ms |
22880 KB |
Output is correct |
29 |
Correct |
5 ms |
22996 KB |
Output is correct |
30 |
Correct |
6 ms |
23132 KB |
Output is correct |
31 |
Correct |
6 ms |
23040 KB |
Output is correct |
32 |
Correct |
6 ms |
23116 KB |
Output is correct |
33 |
Correct |
5 ms |
23132 KB |
Output is correct |
34 |
Correct |
6 ms |
23192 KB |
Output is correct |
35 |
Correct |
6 ms |
23136 KB |
Output is correct |
36 |
Correct |
6 ms |
23136 KB |
Output is correct |
37 |
Correct |
7 ms |
23136 KB |
Output is correct |
38 |
Correct |
6 ms |
23040 KB |
Output is correct |
39 |
Correct |
5 ms |
23144 KB |
Output is correct |
40 |
Correct |
5 ms |
23196 KB |
Output is correct |
41 |
Correct |
5 ms |
23144 KB |
Output is correct |
42 |
Correct |
5 ms |
23144 KB |
Output is correct |
43 |
Correct |
6 ms |
23056 KB |
Output is correct |
44 |
Correct |
5 ms |
23144 KB |
Output is correct |
45 |
Correct |
5 ms |
23144 KB |
Output is correct |
46 |
Correct |
5 ms |
23144 KB |
Output is correct |
47 |
Correct |
5 ms |
23144 KB |
Output is correct |
48 |
Correct |
5 ms |
23128 KB |
Output is correct |
49 |
Correct |
5 ms |
23128 KB |
Output is correct |
50 |
Correct |
6 ms |
23132 KB |
Output is correct |
51 |
Correct |
5 ms |
23128 KB |
Output is correct |
52 |
Correct |
5 ms |
23132 KB |
Output is correct |
53 |
Correct |
5 ms |
23132 KB |
Output is correct |
54 |
Correct |
6 ms |
23132 KB |
Output is correct |
55 |
Correct |
119 ms |
33516 KB |
Output is correct |
56 |
Correct |
196 ms |
43460 KB |
Output is correct |
57 |
Correct |
125 ms |
43652 KB |
Output is correct |
58 |
Correct |
115 ms |
39600 KB |
Output is correct |
59 |
Correct |
112 ms |
38604 KB |
Output is correct |
60 |
Correct |
130 ms |
37816 KB |
Output is correct |
61 |
Correct |
134 ms |
38604 KB |
Output is correct |
62 |
Correct |
174 ms |
40524 KB |
Output is correct |
63 |
Correct |
136 ms |
39368 KB |
Output is correct |
64 |
Correct |
147 ms |
39932 KB |
Output is correct |
65 |
Correct |
145 ms |
37880 KB |
Output is correct |
66 |
Correct |
133 ms |
37836 KB |
Output is correct |
67 |
Correct |
166 ms |
38956 KB |
Output is correct |
68 |
Correct |
176 ms |
41072 KB |
Output is correct |
69 |
Correct |
123 ms |
39116 KB |
Output is correct |
70 |
Correct |
200 ms |
43960 KB |
Output is correct |
71 |
Correct |
168 ms |
44764 KB |
Output is correct |
72 |
Correct |
116 ms |
40220 KB |
Output is correct |
73 |
Correct |
112 ms |
40004 KB |
Output is correct |
74 |
Correct |
152 ms |
38592 KB |
Output is correct |
75 |
Correct |
177 ms |
41244 KB |
Output is correct |
76 |
Correct |
151 ms |
38696 KB |
Output is correct |
77 |
Correct |
143 ms |
40472 KB |
Output is correct |
78 |
Correct |
154 ms |
41072 KB |
Output is correct |
79 |
Correct |
147 ms |
37948 KB |
Output is correct |
80 |
Correct |
153 ms |
39692 KB |
Output is correct |
81 |
Correct |
164 ms |
40392 KB |
Output is correct |
82 |
Correct |
184 ms |
40980 KB |
Output is correct |
83 |
Correct |
97 ms |
33640 KB |
Output is correct |
84 |
Correct |
169 ms |
40048 KB |
Output is correct |
85 |
Correct |
93 ms |
40328 KB |
Output is correct |
86 |
Correct |
89 ms |
35016 KB |
Output is correct |
87 |
Correct |
121 ms |
35788 KB |
Output is correct |
88 |
Correct |
146 ms |
36804 KB |
Output is correct |
89 |
Correct |
123 ms |
34760 KB |
Output is correct |
90 |
Correct |
122 ms |
35948 KB |
Output is correct |
91 |
Correct |
104 ms |
34244 KB |
Output is correct |
92 |
Correct |
130 ms |
35784 KB |
Output is correct |
93 |
Correct |
145 ms |
36808 KB |
Output is correct |
94 |
Correct |
127 ms |
38860 KB |
Output is correct |
95 |
Correct |
167 ms |
46008 KB |
Output is correct |
96 |
Correct |
131 ms |
45828 KB |
Output is correct |
97 |
Correct |
122 ms |
40388 KB |
Output is correct |
98 |
Correct |
122 ms |
39564 KB |
Output is correct |
99 |
Correct |
141 ms |
39104 KB |
Output is correct |
100 |
Correct |
154 ms |
41144 KB |
Output is correct |
101 |
Correct |
140 ms |
39112 KB |
Output is correct |
102 |
Correct |
154 ms |
40448 KB |
Output is correct |
103 |
Correct |
175 ms |
41960 KB |
Output is correct |
104 |
Correct |
144 ms |
38580 KB |
Output is correct |
105 |
Correct |
159 ms |
39872 KB |
Output is correct |
106 |
Correct |
185 ms |
41460 KB |
Output is correct |
107 |
Correct |
108 ms |
47544 KB |
Output is correct |
108 |
Correct |
132 ms |
39112 KB |
Output is correct |
109 |
Correct |
131 ms |
39032 KB |
Output is correct |
110 |
Correct |
125 ms |
38332 KB |
Output is correct |
111 |
Correct |
125 ms |
38404 KB |
Output is correct |
112 |
Correct |
126 ms |
38160 KB |
Output is correct |
113 |
Correct |
125 ms |
39696 KB |
Output is correct |
114 |
Correct |
125 ms |
38588 KB |
Output is correct |
115 |
Correct |
124 ms |
38160 KB |
Output is correct |
116 |
Correct |
131 ms |
39372 KB |
Output is correct |