#include "bits/stdc++.h"
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...)
#endif
using ll = long long;
using pii = pair<int, int>;
#define F first
#define S second
#define sz(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll get_rand(ll l, ll r) {
assert(l <= r);
return uniform_int_distribution<ll> (l, r)(rng);
}
const int N = 2e5 + 3;
int n, m, q, L[N], R[N];
vector<pii> g[N];
pii e[N];
// contain no odd cycle -> bipartite graph
namespace Sub12{
bool valid_input(){
return n <= 2000 and m <= 2000 and q <= 2000;
}
int vis[N];
bool dfs(int u, int l, int r, int col){
bool ok = 1;
vis[u] = col;
for(auto [v, id] : g[u]){
if(l <= id and id <= r)
continue;
if(vis[v])
ok &= (vis[u] != vis[v]);
else
ok &= dfs(v, l, r, col ^ 3);
}
return ok;
}
void solve(){
for(int i = 1; i <= q; ++i){
bool bipartite = 1;
for(int u = 1; u <= n; ++u)
vis[u] = 0;
for(int u = 1; u <= n; ++u){
if(!vis[u])
bipartite &= dfs(u, L[i], R[i], 1);
}
cout << (bipartite ? "NO\n" : "YES\n");
}
}
}
struct DSU{
bool bipartite = 1;
vector<pii> p;
int n;
void init(int _n){
n = _n;
p.resize(n + 2);
for(int i = 1; i <= n; ++i)
p[i] = {i, 0};
}
pii find_set(int u){
if(u != p[u].F){
int parity = p[u].S;
p[u] = find_set(p[u].F);
p[u].S ^= parity;
}
return p[u];
}
void add_edge(int u, int v){
pii pu = find_set(u);
u = pu.F;
pii pv = find_set(v);
v = pv.F;
int x = pu.S, y = pv.S;
if(u == v){
bipartite &= (x != y);
return;
}
p[v] = {u, x ^ y ^ 1};
}
};
namespace Sub34{
bool valid_input(){
bool ok = 1;
for(int i = 1; i <= q; ++i)
ok &= (L[i] <= 200);
return ok;
}
int ans[N];
vector<pii> d[N];
void solve(){
for(int i = 1; i <= q; ++i){
d[L[i]].push_back({R[i], i});
}
for(int i = 1; i <= min(200, m); ++i){
DSU dsu;
dsu.init(n);
for(int j = 1; j < i; ++j){
dsu.add_edge(e[j].F, e[j].S);
}
sort(all(d[i]), [](pii &x, pii &y) -> bool{
return x.F < y.F;
});
for(int j = m; j >= i; --j){
while(!d[i].empty() and d[i].back().F == j){
ans[d[i].back().S] = dsu.bipartite;
d[i].pop_back();
}
dsu.add_edge(e[j].F, e[j].S);
}
}
for(int i = 1; i <= q; ++i)
cout << (ans[i] ? "NO\n" : "YES\n");
}
}
struct DSU_Rollback{
vector<int> p, c;
vector<array<int, 5>> op;
bool bipartite = 1;
void init(int n){
p.clear();
p.resize(n + 2, -1);
c.clear();
c.resize(n + 2, 0);
}
pii get(int x){
int d = 0;
while(p[x] >= 0){
d ^= c[x];
x = p[x];
}
return {x, d};
}
void join_sets(int u, int v){
debug("JOIN", u, v);
pii pu = get(u), pv = get(v);
op.push_back({pu.F, pv.F, p[pu.F], p[pv.F], bipartite});
if(pu.F == pv.F){
bipartite &= (pu.S != pv.S);
return;
}
if(p[pu.F] > p[pv.F])
swap(pu, pv);
p[pu.F] += p[pv.F];
p[pv.F] = pu.F;
c[pv.F] = pu.S ^ pv.S ^ 1;
return;
}
void rollback(){
debug("ROLL");
array<int, 5> x = op.back();
op.pop_back();
if(x[0] == -1) return;
p[x[0]] = x[2], p[x[1]] = x[3];
bipartite = x[4];
}
};
namespace Sub5{
bool valid_input(){
return q <= 2000;
}
int B, add_time[N];
vector<int> blk[N];
int ans[N];
void solve(){
B = m / sqrt(q);
debug(B);
for(int i = 1; i <= q; ++i)
blk[(L[i] + B - 1) / B].push_back(i);
for(int bl = 1; bl < N; ++bl){
if(blk[bl].empty())
continue;
vector<int> &d = blk[bl];
debug(d);
sort(all(d), [](int &x, int &y) -> bool {
return R[x] < R[y];
});
DSU_Rollback dsu;
dsu.init(n);
int timer = 0;
int U = (bl - 1) * B + 1;
debug(U);
for(int i = 1; i < U; ++i)
dsu.join_sets(e[i].F, e[i].S);
for(int i = m; i > R[d.front()]; --i)
dsu.join_sets(e[i].F, e[i].S);
int cur = R[d.front()] + 1;
for(int x : d){
debug(L[x], R[x], cur);
while(cur <= R[x]){
dsu.rollback();
++cur;
}
int last = timer;
debug(last);
for(int i = U; i < L[x]; ++i)
dsu.join_sets(e[i].F, e[i].S);
ans[x] = dsu.bipartite;
for(int i = U; i < L[x]; ++i)
dsu.rollback();
}
}
for(int i = 1; i <= q; ++i)
cout << (ans[i] ? "NO\n" : "YES\n");
}
};
namespace Sub6{
DSU_Rollback dsu;
int last[N];
void calc(int l, int r, int optL, int optR){
int mid = (l + r) >> 1;
for(int i = l; i < mid; ++i)
dsu.join_sets(e[i].F, e[i].S);
int opt = optR;
while(dsu.bipartite)
dsu.join_sets(e[opt].F, e[opt].S), --opt;
last[mid] = opt;
for(int i = opt + 1; i <= optR; ++i)
dsu.rollback();
dsu.join_sets(e[mid].F, e[mid].S);
if(mid < r)
calc(mid + 1, r, opt, optR);
for(int i = l; i <= mid; ++i)
dsu.rollback();
for(int i = optR; i > opt; --i)
dsu.join_sets(e[i].F, e[i].S);
if(l < mid)
calc(l, mid - 1, optL, opt);
for(int i = opt + 1; i <= optR; ++i)
dsu.rollback();
}
void solve(){
dsu.init(n);
calc(1, m, 1, m);
for(int i = 1; i <= m; ++i)
debug(i, last[i]);
for(int i = 1; i <= q; ++i)
cout << (last[L[i]] >= R[i] ? "YES\n" : "NO\n");
}
}
void solve(){
cin >> n >> m >> q;
for(int i = 1; i <= m; ++i){
int u, v;
cin >> u >> v;
g[u].push_back({v, i});
g[v].push_back({u, i});
e[i] = {u, v};
}
for(int i = 1; i <= q; ++i)
cin >> L[i] >> R[i];
Sub6::solve();
}
int32_t main() {
cin.tie(nullptr)->sync_with_stdio(0);
#define task "nohome"
if(fopen(task".inp", "r")){
freopen(task".inp", "r", stdin);
freopen(task".out", "w", stdout);
}
int test = 1;
// cin >> test;
for(int i = 1; i <= test; ++i){
// cout << "Case #" << i << ": ";
solve();
}
#ifdef LOCAL
cerr << "\n[Time]: " << 1000.0 * clock() / CLOCKS_PER_SEC << " ms.\n";
#endif
return 0;
}
Compilation message
Joker.cpp: In function 'void Sub5::solve()':
Joker.cpp:233:21: warning: unused variable 'last' [-Wunused-variable]
233 | int last = timer;
| ^~~~
Joker.cpp: In function 'int32_t main()':
Joker.cpp:309:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
309 | freopen(task".inp", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Joker.cpp:310:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
310 | freopen(task".out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
20828 KB |
Output is correct |
2 |
Correct |
4 ms |
20828 KB |
Output is correct |
3 |
Correct |
4 ms |
20828 KB |
Output is correct |
4 |
Correct |
4 ms |
20824 KB |
Output is correct |
5 |
Correct |
4 ms |
20828 KB |
Output is correct |
6 |
Correct |
4 ms |
20828 KB |
Output is correct |
7 |
Correct |
4 ms |
20828 KB |
Output is correct |
8 |
Correct |
4 ms |
20936 KB |
Output is correct |
9 |
Correct |
4 ms |
20828 KB |
Output is correct |
10 |
Correct |
5 ms |
20920 KB |
Output is correct |
11 |
Correct |
4 ms |
20824 KB |
Output is correct |
12 |
Correct |
4 ms |
20984 KB |
Output is correct |
13 |
Correct |
4 ms |
20828 KB |
Output is correct |
14 |
Correct |
5 ms |
21084 KB |
Output is correct |
15 |
Correct |
5 ms |
20828 KB |
Output is correct |
16 |
Correct |
4 ms |
20984 KB |
Output is correct |
17 |
Correct |
5 ms |
20828 KB |
Output is correct |
18 |
Correct |
4 ms |
20824 KB |
Output is correct |
19 |
Correct |
4 ms |
20828 KB |
Output is correct |
20 |
Correct |
4 ms |
20828 KB |
Output is correct |
21 |
Correct |
4 ms |
20828 KB |
Output is correct |
22 |
Correct |
4 ms |
20828 KB |
Output is correct |
23 |
Correct |
4 ms |
20828 KB |
Output is correct |
24 |
Correct |
4 ms |
20936 KB |
Output is correct |
25 |
Correct |
5 ms |
20828 KB |
Output is correct |
26 |
Correct |
4 ms |
20828 KB |
Output is correct |
27 |
Correct |
4 ms |
21080 KB |
Output is correct |
28 |
Correct |
4 ms |
20824 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
20828 KB |
Output is correct |
2 |
Correct |
4 ms |
20828 KB |
Output is correct |
3 |
Correct |
4 ms |
20828 KB |
Output is correct |
4 |
Correct |
4 ms |
20824 KB |
Output is correct |
5 |
Correct |
4 ms |
20828 KB |
Output is correct |
6 |
Correct |
4 ms |
20828 KB |
Output is correct |
7 |
Correct |
4 ms |
20828 KB |
Output is correct |
8 |
Correct |
4 ms |
20936 KB |
Output is correct |
9 |
Correct |
4 ms |
20828 KB |
Output is correct |
10 |
Correct |
5 ms |
20920 KB |
Output is correct |
11 |
Correct |
4 ms |
20824 KB |
Output is correct |
12 |
Correct |
4 ms |
20984 KB |
Output is correct |
13 |
Correct |
4 ms |
20828 KB |
Output is correct |
14 |
Correct |
5 ms |
21084 KB |
Output is correct |
15 |
Correct |
5 ms |
20828 KB |
Output is correct |
16 |
Correct |
4 ms |
20984 KB |
Output is correct |
17 |
Correct |
5 ms |
20828 KB |
Output is correct |
18 |
Correct |
4 ms |
20824 KB |
Output is correct |
19 |
Correct |
4 ms |
20828 KB |
Output is correct |
20 |
Correct |
4 ms |
20828 KB |
Output is correct |
21 |
Correct |
4 ms |
20828 KB |
Output is correct |
22 |
Correct |
4 ms |
20828 KB |
Output is correct |
23 |
Correct |
4 ms |
20828 KB |
Output is correct |
24 |
Correct |
4 ms |
20936 KB |
Output is correct |
25 |
Correct |
5 ms |
20828 KB |
Output is correct |
26 |
Correct |
4 ms |
20828 KB |
Output is correct |
27 |
Correct |
4 ms |
21080 KB |
Output is correct |
28 |
Correct |
4 ms |
20824 KB |
Output is correct |
29 |
Correct |
5 ms |
20996 KB |
Output is correct |
30 |
Correct |
5 ms |
21084 KB |
Output is correct |
31 |
Correct |
5 ms |
21072 KB |
Output is correct |
32 |
Correct |
5 ms |
21084 KB |
Output is correct |
33 |
Correct |
5 ms |
21084 KB |
Output is correct |
34 |
Correct |
6 ms |
21192 KB |
Output is correct |
35 |
Correct |
5 ms |
21084 KB |
Output is correct |
36 |
Correct |
5 ms |
21084 KB |
Output is correct |
37 |
Correct |
5 ms |
21172 KB |
Output is correct |
38 |
Correct |
5 ms |
21084 KB |
Output is correct |
39 |
Correct |
6 ms |
21084 KB |
Output is correct |
40 |
Correct |
6 ms |
20992 KB |
Output is correct |
41 |
Correct |
5 ms |
21084 KB |
Output is correct |
42 |
Correct |
6 ms |
21196 KB |
Output is correct |
43 |
Correct |
5 ms |
21096 KB |
Output is correct |
44 |
Correct |
5 ms |
20948 KB |
Output is correct |
45 |
Correct |
5 ms |
21084 KB |
Output is correct |
46 |
Correct |
6 ms |
21080 KB |
Output is correct |
47 |
Correct |
5 ms |
21084 KB |
Output is correct |
48 |
Correct |
5 ms |
21084 KB |
Output is correct |
49 |
Correct |
6 ms |
21084 KB |
Output is correct |
50 |
Correct |
5 ms |
21084 KB |
Output is correct |
51 |
Correct |
9 ms |
21184 KB |
Output is correct |
52 |
Correct |
5 ms |
21084 KB |
Output is correct |
53 |
Correct |
6 ms |
21080 KB |
Output is correct |
54 |
Correct |
5 ms |
21084 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
20828 KB |
Output is correct |
2 |
Correct |
4 ms |
20828 KB |
Output is correct |
3 |
Correct |
145 ms |
36772 KB |
Output is correct |
4 |
Correct |
246 ms |
44696 KB |
Output is correct |
5 |
Correct |
149 ms |
39904 KB |
Output is correct |
6 |
Correct |
166 ms |
39808 KB |
Output is correct |
7 |
Correct |
143 ms |
39684 KB |
Output is correct |
8 |
Correct |
159 ms |
37812 KB |
Output is correct |
9 |
Correct |
173 ms |
37984 KB |
Output is correct |
10 |
Correct |
208 ms |
39360 KB |
Output is correct |
11 |
Correct |
230 ms |
38328 KB |
Output is correct |
12 |
Correct |
189 ms |
39412 KB |
Output is correct |
13 |
Correct |
154 ms |
37320 KB |
Output is correct |
14 |
Correct |
154 ms |
38496 KB |
Output is correct |
15 |
Correct |
202 ms |
39616 KB |
Output is correct |
16 |
Correct |
194 ms |
40904 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
20828 KB |
Output is correct |
2 |
Correct |
4 ms |
20828 KB |
Output is correct |
3 |
Correct |
4 ms |
20828 KB |
Output is correct |
4 |
Correct |
4 ms |
20824 KB |
Output is correct |
5 |
Correct |
4 ms |
20828 KB |
Output is correct |
6 |
Correct |
4 ms |
20828 KB |
Output is correct |
7 |
Correct |
4 ms |
20828 KB |
Output is correct |
8 |
Correct |
4 ms |
20936 KB |
Output is correct |
9 |
Correct |
4 ms |
20828 KB |
Output is correct |
10 |
Correct |
5 ms |
20920 KB |
Output is correct |
11 |
Correct |
4 ms |
20824 KB |
Output is correct |
12 |
Correct |
4 ms |
20984 KB |
Output is correct |
13 |
Correct |
4 ms |
20828 KB |
Output is correct |
14 |
Correct |
5 ms |
21084 KB |
Output is correct |
15 |
Correct |
5 ms |
20828 KB |
Output is correct |
16 |
Correct |
4 ms |
20984 KB |
Output is correct |
17 |
Correct |
5 ms |
20828 KB |
Output is correct |
18 |
Correct |
4 ms |
20824 KB |
Output is correct |
19 |
Correct |
4 ms |
20828 KB |
Output is correct |
20 |
Correct |
4 ms |
20828 KB |
Output is correct |
21 |
Correct |
4 ms |
20828 KB |
Output is correct |
22 |
Correct |
4 ms |
20828 KB |
Output is correct |
23 |
Correct |
4 ms |
20828 KB |
Output is correct |
24 |
Correct |
4 ms |
20936 KB |
Output is correct |
25 |
Correct |
5 ms |
20828 KB |
Output is correct |
26 |
Correct |
4 ms |
20828 KB |
Output is correct |
27 |
Correct |
4 ms |
21080 KB |
Output is correct |
28 |
Correct |
4 ms |
20824 KB |
Output is correct |
29 |
Correct |
145 ms |
36772 KB |
Output is correct |
30 |
Correct |
246 ms |
44696 KB |
Output is correct |
31 |
Correct |
149 ms |
39904 KB |
Output is correct |
32 |
Correct |
166 ms |
39808 KB |
Output is correct |
33 |
Correct |
143 ms |
39684 KB |
Output is correct |
34 |
Correct |
159 ms |
37812 KB |
Output is correct |
35 |
Correct |
173 ms |
37984 KB |
Output is correct |
36 |
Correct |
208 ms |
39360 KB |
Output is correct |
37 |
Correct |
230 ms |
38328 KB |
Output is correct |
38 |
Correct |
189 ms |
39412 KB |
Output is correct |
39 |
Correct |
154 ms |
37320 KB |
Output is correct |
40 |
Correct |
154 ms |
38496 KB |
Output is correct |
41 |
Correct |
202 ms |
39616 KB |
Output is correct |
42 |
Correct |
194 ms |
40904 KB |
Output is correct |
43 |
Correct |
142 ms |
36904 KB |
Output is correct |
44 |
Correct |
242 ms |
45896 KB |
Output is correct |
45 |
Correct |
175 ms |
40488 KB |
Output is correct |
46 |
Correct |
144 ms |
40232 KB |
Output is correct |
47 |
Correct |
137 ms |
38852 KB |
Output is correct |
48 |
Correct |
175 ms |
38848 KB |
Output is correct |
49 |
Correct |
206 ms |
40388 KB |
Output is correct |
50 |
Correct |
148 ms |
37972 KB |
Output is correct |
51 |
Correct |
164 ms |
39776 KB |
Output is correct |
52 |
Correct |
182 ms |
40044 KB |
Output is correct |
53 |
Correct |
150 ms |
38088 KB |
Output is correct |
54 |
Correct |
167 ms |
38336 KB |
Output is correct |
55 |
Correct |
186 ms |
39428 KB |
Output is correct |
56 |
Correct |
201 ms |
40896 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
20828 KB |
Output is correct |
2 |
Correct |
4 ms |
20828 KB |
Output is correct |
3 |
Correct |
4 ms |
20828 KB |
Output is correct |
4 |
Correct |
4 ms |
20824 KB |
Output is correct |
5 |
Correct |
4 ms |
20828 KB |
Output is correct |
6 |
Correct |
4 ms |
20828 KB |
Output is correct |
7 |
Correct |
4 ms |
20828 KB |
Output is correct |
8 |
Correct |
4 ms |
20936 KB |
Output is correct |
9 |
Correct |
4 ms |
20828 KB |
Output is correct |
10 |
Correct |
5 ms |
20920 KB |
Output is correct |
11 |
Correct |
4 ms |
20824 KB |
Output is correct |
12 |
Correct |
4 ms |
20984 KB |
Output is correct |
13 |
Correct |
4 ms |
20828 KB |
Output is correct |
14 |
Correct |
5 ms |
21084 KB |
Output is correct |
15 |
Correct |
5 ms |
20828 KB |
Output is correct |
16 |
Correct |
4 ms |
20984 KB |
Output is correct |
17 |
Correct |
5 ms |
20828 KB |
Output is correct |
18 |
Correct |
4 ms |
20824 KB |
Output is correct |
19 |
Correct |
4 ms |
20828 KB |
Output is correct |
20 |
Correct |
4 ms |
20828 KB |
Output is correct |
21 |
Correct |
4 ms |
20828 KB |
Output is correct |
22 |
Correct |
4 ms |
20828 KB |
Output is correct |
23 |
Correct |
4 ms |
20828 KB |
Output is correct |
24 |
Correct |
4 ms |
20936 KB |
Output is correct |
25 |
Correct |
5 ms |
20828 KB |
Output is correct |
26 |
Correct |
4 ms |
20828 KB |
Output is correct |
27 |
Correct |
4 ms |
21080 KB |
Output is correct |
28 |
Correct |
4 ms |
20824 KB |
Output is correct |
29 |
Correct |
5 ms |
20996 KB |
Output is correct |
30 |
Correct |
5 ms |
21084 KB |
Output is correct |
31 |
Correct |
5 ms |
21072 KB |
Output is correct |
32 |
Correct |
5 ms |
21084 KB |
Output is correct |
33 |
Correct |
5 ms |
21084 KB |
Output is correct |
34 |
Correct |
6 ms |
21192 KB |
Output is correct |
35 |
Correct |
5 ms |
21084 KB |
Output is correct |
36 |
Correct |
5 ms |
21084 KB |
Output is correct |
37 |
Correct |
5 ms |
21172 KB |
Output is correct |
38 |
Correct |
5 ms |
21084 KB |
Output is correct |
39 |
Correct |
6 ms |
21084 KB |
Output is correct |
40 |
Correct |
6 ms |
20992 KB |
Output is correct |
41 |
Correct |
5 ms |
21084 KB |
Output is correct |
42 |
Correct |
6 ms |
21196 KB |
Output is correct |
43 |
Correct |
5 ms |
21096 KB |
Output is correct |
44 |
Correct |
5 ms |
20948 KB |
Output is correct |
45 |
Correct |
5 ms |
21084 KB |
Output is correct |
46 |
Correct |
6 ms |
21080 KB |
Output is correct |
47 |
Correct |
5 ms |
21084 KB |
Output is correct |
48 |
Correct |
5 ms |
21084 KB |
Output is correct |
49 |
Correct |
6 ms |
21084 KB |
Output is correct |
50 |
Correct |
5 ms |
21084 KB |
Output is correct |
51 |
Correct |
9 ms |
21184 KB |
Output is correct |
52 |
Correct |
5 ms |
21084 KB |
Output is correct |
53 |
Correct |
6 ms |
21080 KB |
Output is correct |
54 |
Correct |
5 ms |
21084 KB |
Output is correct |
55 |
Correct |
110 ms |
35552 KB |
Output is correct |
56 |
Correct |
203 ms |
43312 KB |
Output is correct |
57 |
Correct |
96 ms |
38336 KB |
Output is correct |
58 |
Correct |
117 ms |
35724 KB |
Output is correct |
59 |
Correct |
141 ms |
37568 KB |
Output is correct |
60 |
Correct |
177 ms |
38600 KB |
Output is correct |
61 |
Correct |
139 ms |
35652 KB |
Output is correct |
62 |
Correct |
138 ms |
37928 KB |
Output is correct |
63 |
Correct |
119 ms |
35528 KB |
Output is correct |
64 |
Correct |
162 ms |
37080 KB |
Output is correct |
65 |
Correct |
169 ms |
38820 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
20828 KB |
Output is correct |
2 |
Correct |
4 ms |
20828 KB |
Output is correct |
3 |
Correct |
4 ms |
20828 KB |
Output is correct |
4 |
Correct |
4 ms |
20824 KB |
Output is correct |
5 |
Correct |
4 ms |
20828 KB |
Output is correct |
6 |
Correct |
4 ms |
20828 KB |
Output is correct |
7 |
Correct |
4 ms |
20828 KB |
Output is correct |
8 |
Correct |
4 ms |
20936 KB |
Output is correct |
9 |
Correct |
4 ms |
20828 KB |
Output is correct |
10 |
Correct |
5 ms |
20920 KB |
Output is correct |
11 |
Correct |
4 ms |
20824 KB |
Output is correct |
12 |
Correct |
4 ms |
20984 KB |
Output is correct |
13 |
Correct |
4 ms |
20828 KB |
Output is correct |
14 |
Correct |
5 ms |
21084 KB |
Output is correct |
15 |
Correct |
5 ms |
20828 KB |
Output is correct |
16 |
Correct |
4 ms |
20984 KB |
Output is correct |
17 |
Correct |
5 ms |
20828 KB |
Output is correct |
18 |
Correct |
4 ms |
20824 KB |
Output is correct |
19 |
Correct |
4 ms |
20828 KB |
Output is correct |
20 |
Correct |
4 ms |
20828 KB |
Output is correct |
21 |
Correct |
4 ms |
20828 KB |
Output is correct |
22 |
Correct |
4 ms |
20828 KB |
Output is correct |
23 |
Correct |
4 ms |
20828 KB |
Output is correct |
24 |
Correct |
4 ms |
20936 KB |
Output is correct |
25 |
Correct |
5 ms |
20828 KB |
Output is correct |
26 |
Correct |
4 ms |
20828 KB |
Output is correct |
27 |
Correct |
4 ms |
21080 KB |
Output is correct |
28 |
Correct |
4 ms |
20824 KB |
Output is correct |
29 |
Correct |
5 ms |
20996 KB |
Output is correct |
30 |
Correct |
5 ms |
21084 KB |
Output is correct |
31 |
Correct |
5 ms |
21072 KB |
Output is correct |
32 |
Correct |
5 ms |
21084 KB |
Output is correct |
33 |
Correct |
5 ms |
21084 KB |
Output is correct |
34 |
Correct |
6 ms |
21192 KB |
Output is correct |
35 |
Correct |
5 ms |
21084 KB |
Output is correct |
36 |
Correct |
5 ms |
21084 KB |
Output is correct |
37 |
Correct |
5 ms |
21172 KB |
Output is correct |
38 |
Correct |
5 ms |
21084 KB |
Output is correct |
39 |
Correct |
6 ms |
21084 KB |
Output is correct |
40 |
Correct |
6 ms |
20992 KB |
Output is correct |
41 |
Correct |
5 ms |
21084 KB |
Output is correct |
42 |
Correct |
6 ms |
21196 KB |
Output is correct |
43 |
Correct |
5 ms |
21096 KB |
Output is correct |
44 |
Correct |
5 ms |
20948 KB |
Output is correct |
45 |
Correct |
5 ms |
21084 KB |
Output is correct |
46 |
Correct |
6 ms |
21080 KB |
Output is correct |
47 |
Correct |
5 ms |
21084 KB |
Output is correct |
48 |
Correct |
5 ms |
21084 KB |
Output is correct |
49 |
Correct |
6 ms |
21084 KB |
Output is correct |
50 |
Correct |
5 ms |
21084 KB |
Output is correct |
51 |
Correct |
9 ms |
21184 KB |
Output is correct |
52 |
Correct |
5 ms |
21084 KB |
Output is correct |
53 |
Correct |
6 ms |
21080 KB |
Output is correct |
54 |
Correct |
5 ms |
21084 KB |
Output is correct |
55 |
Correct |
145 ms |
36772 KB |
Output is correct |
56 |
Correct |
246 ms |
44696 KB |
Output is correct |
57 |
Correct |
149 ms |
39904 KB |
Output is correct |
58 |
Correct |
166 ms |
39808 KB |
Output is correct |
59 |
Correct |
143 ms |
39684 KB |
Output is correct |
60 |
Correct |
159 ms |
37812 KB |
Output is correct |
61 |
Correct |
173 ms |
37984 KB |
Output is correct |
62 |
Correct |
208 ms |
39360 KB |
Output is correct |
63 |
Correct |
230 ms |
38328 KB |
Output is correct |
64 |
Correct |
189 ms |
39412 KB |
Output is correct |
65 |
Correct |
154 ms |
37320 KB |
Output is correct |
66 |
Correct |
154 ms |
38496 KB |
Output is correct |
67 |
Correct |
202 ms |
39616 KB |
Output is correct |
68 |
Correct |
194 ms |
40904 KB |
Output is correct |
69 |
Correct |
142 ms |
36904 KB |
Output is correct |
70 |
Correct |
242 ms |
45896 KB |
Output is correct |
71 |
Correct |
175 ms |
40488 KB |
Output is correct |
72 |
Correct |
144 ms |
40232 KB |
Output is correct |
73 |
Correct |
137 ms |
38852 KB |
Output is correct |
74 |
Correct |
175 ms |
38848 KB |
Output is correct |
75 |
Correct |
206 ms |
40388 KB |
Output is correct |
76 |
Correct |
148 ms |
37972 KB |
Output is correct |
77 |
Correct |
164 ms |
39776 KB |
Output is correct |
78 |
Correct |
182 ms |
40044 KB |
Output is correct |
79 |
Correct |
150 ms |
38088 KB |
Output is correct |
80 |
Correct |
167 ms |
38336 KB |
Output is correct |
81 |
Correct |
186 ms |
39428 KB |
Output is correct |
82 |
Correct |
201 ms |
40896 KB |
Output is correct |
83 |
Correct |
110 ms |
35552 KB |
Output is correct |
84 |
Correct |
203 ms |
43312 KB |
Output is correct |
85 |
Correct |
96 ms |
38336 KB |
Output is correct |
86 |
Correct |
117 ms |
35724 KB |
Output is correct |
87 |
Correct |
141 ms |
37568 KB |
Output is correct |
88 |
Correct |
177 ms |
38600 KB |
Output is correct |
89 |
Correct |
139 ms |
35652 KB |
Output is correct |
90 |
Correct |
138 ms |
37928 KB |
Output is correct |
91 |
Correct |
119 ms |
35528 KB |
Output is correct |
92 |
Correct |
162 ms |
37080 KB |
Output is correct |
93 |
Correct |
169 ms |
38820 KB |
Output is correct |
94 |
Correct |
146 ms |
37424 KB |
Output is correct |
95 |
Correct |
176 ms |
42364 KB |
Output is correct |
96 |
Correct |
128 ms |
41924 KB |
Output is correct |
97 |
Correct |
148 ms |
39200 KB |
Output is correct |
98 |
Correct |
160 ms |
40788 KB |
Output is correct |
99 |
Correct |
161 ms |
38336 KB |
Output is correct |
100 |
Correct |
189 ms |
41668 KB |
Output is correct |
101 |
Correct |
153 ms |
38720 KB |
Output is correct |
102 |
Correct |
174 ms |
39776 KB |
Output is correct |
103 |
Correct |
179 ms |
40960 KB |
Output is correct |
104 |
Correct |
158 ms |
38848 KB |
Output is correct |
105 |
Correct |
187 ms |
39792 KB |
Output is correct |
106 |
Correct |
201 ms |
41832 KB |
Output is correct |
107 |
Correct |
108 ms |
43852 KB |
Output is correct |
108 |
Correct |
142 ms |
38100 KB |
Output is correct |
109 |
Correct |
136 ms |
37332 KB |
Output is correct |
110 |
Correct |
142 ms |
38720 KB |
Output is correct |
111 |
Correct |
137 ms |
38368 KB |
Output is correct |
112 |
Correct |
138 ms |
38100 KB |
Output is correct |
113 |
Correct |
137 ms |
38536 KB |
Output is correct |
114 |
Correct |
137 ms |
38096 KB |
Output is correct |
115 |
Correct |
135 ms |
37148 KB |
Output is correct |
116 |
Correct |
135 ms |
38612 KB |
Output is correct |