# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
603885 |
2022-07-24T13:00:37 Z |
Arnch |
Jail (JOI22_jail) |
C++17 |
|
2833 ms |
315244 KB |
// oooo
/*
har chi delet mikhad bebar ~
gitar o ba khodet nabar! ~
;Amoo_Hasan;
*/
#include<bits/stdc++.h>
//#pragma GCC optimize("O3,no-stack-protector,unroll-loops")
//#pragma GCC target("avx2,fma")
using namespace std;
typedef long long ll;
typedef long double ld;
#define Sz(x) int((x).size())
#define All(x) (x).begin(), (x).end()
#define wtf(x) cout<<#x <<" : " <<x <<endl
constexpr ll inf = 1e9, N = 2e5 + 10, mod = 1e9 + 7, Log = 20;
/*
val -> number of path
type -> (1 == bed) or (2 == work)
*/
int n, m;
int type[N << 4][4], val[N << 4][4];
int sz[N], st[N], fn[N], head[N], ptr[N], tim;
int par[N][Log], h[N], cnt_t;
bool mark[N << 4];
map<int, int> mp, vis;
vector<int> adj[N], G[N << 4], RG[N << 4], topol, his;
vector<pair<int, int> > path;
struct Node {
int num;
};
struct Seg {
Node x[N << 4];
int typ;
Seg(int type) {
typ = type;
}
void pre(int l, int r, int v) {
if(r - l < 2) {
if(type[ptr[l]][typ] == 0) x[v].num = v + (typ - 1) * (N << 1);
else {
if(mp[val[ptr[l]][typ]] != 0) x[v].num = mp[val[ptr[l]][typ]];
else x[v].num = mp[val[ptr[l]][typ]] = v;
vis[x[v].num] = 1;
}
his.push_back(x[v].num);
return;
}
int mid = (l + r) >> 1;
pre(l, mid, 2 * v), pre(mid, r, 2 * v + 1);
x[v].num = v + (typ - 1) * (N << 1);
his.push_back(x[v].num);
}
void build(int l, int r, int v) {
if(r - l < 2) {
return;
}
int mid = (l + r) >> 1;
build(l, mid, 2 * v), build(mid, r, 2 * v + 1);
if(typ == 1) {
if(mid - l >= 2 || (type[ptr[l]][typ])) {
/*wtf(typ);
cout<<"^^" <<x[2 * v].num <<" " <<x[v].num <<" " <<endl;*/
G[x[2 * v].num].push_back(x[v].num), RG[x[v].num].push_back(x[2 * v].num);
}
if(r - mid >= 2 || (type[ptr[mid]][typ])) {
/*wtf(typ);
cout<<"^^" <<x[2 * v + 1].num <<" " <<x[v].num <<endl;*/
G[x[2 * v + 1].num].push_back(x[v].num), RG[x[v].num].push_back(x[2 * v + 1].num);
}
} else {
if(mid - l >= 2 || (type[ptr[l]][typ])) {
/*wtf(typ);
cout<<"^^" <<" " <<x[v].num <<" " <<x[2 * v].num <<endl;*/
G[x[v].num].push_back(x[2 * v].num), RG[x[2 * v].num].push_back(x[v].num);
}
if(r - mid >= 2 || (type[ptr[mid]][typ])) {
/*wtf(typ);
cout<<"^^" <<" " <<x[v].num <<" " <<x[2 * v + 1].num <<endl;*/
G[x[v].num].push_back(x[2 * v + 1].num), RG[x[2 * v + 1].num].push_back(x[v].num);
}
}
}
void upd(int l, int r, int s, int e, int cnt, int v) {
if(r <= s || l >= e) return;
if(l >= s && r <= e) {
if(r - l < 2 && !type[ptr[l]][typ]) return;
if(typ == 1) {
G[x[v].num].push_back(cnt);
RG[cnt].push_back(x[v].num);
} else {
G[cnt].push_back(x[v].num);
RG[x[v].num].push_back(cnt);
}
return;
}
int mid = (l + r) >> 1;
upd(l, mid, s, e, cnt, 2 * v), upd(mid, r, s, e, cnt, 2 * v + 1);
}
};
void get_input() {
cin >>n;
for(int i = 0; i < n - 1; i++) {
int u, v; cin >>u >>v;
adj[u].push_back(v), adj[v].push_back(u);
}
cin >>m;
for(int i = 0; i < m; i++) {
int s, t; cin >>s >>t;
path.push_back({s, t});
type[s][1] = 1, type[t][2] = 1;
val[s][1] = val[t][2] = i;
}
}
void pre_dfs(int x = 1, int p = 0) {
sz[x] = 1;
for(auto j : adj[x]) {
if(j == p) continue;
pre_dfs(j, x);
sz[x] += sz[j];
}
}
void hld(int x = 1, int he = 1, int p = 0) {
ptr[tim] = x, st[x] = tim++, head[x] = he;
h[x] = h[p] + 1;
par[x][0] = p;
for(int i = 1; i < Log; i++) par[x][i] = par[par[x][i - 1]][i - 1];
int bs = 0;
for(auto j : adj[x]) {
if(j == p) continue;
if(sz[j] >= sz[bs]) bs = j;
}
fn[x] = tim;
if(bs == 0) return;
hld(bs, he, x);
for(auto j : adj[x]) {
if(j == p || j == bs) continue;
hld(j, j, x);
}
}
int get_par(int x, int y) {
for(int i = 0; i < Log; i++) if((y >> i) & 1) x = par[x][i];
return x;
}
int lca(int x, int y) {
if(h[x] > h[y]) swap(x, y);
y = get_par(y, h[y] - h[x]);
if(x == y) return x;
for(int i = Log - 1; i >= 0; i--) {
if(par[x][i] != par[y][i])
x = par[x][i], y = par[y][i];
}
return par[x][0];
}
void dfs_scc(int x) {
mark[x] = 1;
// cout<<x <<" ";
for(auto j : G[x]) {
if(mark[j]) continue;
dfs_scc(j);
}
topol.push_back(x);
}
void sfd_scc(int x) {
mark[x] = 1;
if(vis[x]) {
cnt_t++;
}
for(auto j : RG[x]) {
if(mark[j]) continue;
sfd_scc(j);
}
}
void kill() {
tim = 0;
path.clear();
for(int i = 1; i <= 4 * n; i++) {
G[i].clear(), RG[i].clear(), G[i + N].clear(), RG[i + N].clear();
adj[i].clear();
mark[i] = 0, mark[i + N] = 0;
type[i][1] = type[i][2] = 0;
val[i][1] = val[i][2] = 0;
}
for(auto i : his) {
G[i].clear(), RG[i].clear(), G[i + N].clear(), RG[i + N].clear();
adj[i].clear();
mark[i] = 0, mark[i + N] = 0;
type[i][1] = type[i][2] = 0;
val[i][1] = val[i][2] = 0;
}
his.clear();
mp.clear();
vis.clear();
topol.clear();
}
int main() {
ios :: sync_with_stdio(0), cin.tie(0);
int q; cin >>q;
while(q--) {
kill();
get_input();
Seg X(1), Y(2);
pre_dfs();
hld();
X.pre(0, n, 1), Y.pre(0, n, 1);
X.build(0, n, 1), Y.build(0, n, 1);
int mx = 0;
for(int j = 0; j < Sz(path); j++) {
int s = path[j].first, t = path[j].second;
if(h[s] < h[t]) swap(s, t);
int lc = lca(s, t);
while(h[head[s]] >= h[lc]) {
//cout<<"^^" <<head[s] <<" " <<s <<" " <<mp[j] <<endl;
X.upd(0, n, st[head[s]], st[s] + 1, mp[j], 1);
Y.upd(0, n, st[head[s]], st[s] + 1, mp[j], 1);
s = par[head[s]][0];
}
if(h[s] >= h[lc]) {
//cout<<"^^" <<lc <<" " <<s <<" " <<mp[j] <<endl;
X.upd(0, n, st[lc], st[s] + 1, mp[j], 1);
Y.upd(0, n, st[lc], st[s] + 1, mp[j], 1);
}
while(h[head[t]] >= h[lc]) {
//cout<<"^^" <<head[t] <<" " <<t <<" " <<mp[j] <<endl;
X.upd(0, n, st[head[t]], st[t] + 1, mp[j], 1);
Y.upd(0, n, st[head[t]], st[t] + 1, mp[j], 1);
t = par[head[t]][0];
}
if(h[t] >= h[lc]) {
//cout<<"^^" <<lc <<" " <<t <<" " <<mp[j] <<endl;
X.upd(0, n, st[lc], st[t] + 1, mp[j], 1);
Y.upd(0, n, st[lc], st[t] + 1, mp[j], 1);
}
mx = max(mx, mp[j]);
}
for(int i = 1; i <= mx; i++) {
if(!mark[i]) dfs_scc(i);
//cout<<endl <<"_____" <<endl;
}
memset(mark, 0, sizeof(mark));
reverse(All(topol));
bool flag = false;
for(auto i : topol) {
if(!mark[i]) {
cnt_t = 0;
sfd_scc(i);
if(cnt_t > 1) {
flag = true;
break;
}
}
}
(flag) ? (cout<<"No" <<endl) : (cout<<"Yes" <<endl);
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
83 ms |
183476 KB |
Output is correct |
2 |
Correct |
82 ms |
183532 KB |
Output is correct |
3 |
Correct |
89 ms |
183584 KB |
Output is correct |
4 |
Correct |
152 ms |
183648 KB |
Output is correct |
5 |
Correct |
219 ms |
183656 KB |
Output is correct |
6 |
Correct |
89 ms |
183612 KB |
Output is correct |
7 |
Correct |
87 ms |
183700 KB |
Output is correct |
8 |
Correct |
99 ms |
183748 KB |
Output is correct |
9 |
Correct |
244 ms |
188676 KB |
Output is correct |
10 |
Correct |
213 ms |
235540 KB |
Output is correct |
11 |
Correct |
173 ms |
183580 KB |
Output is correct |
12 |
Correct |
287 ms |
183596 KB |
Output is correct |
13 |
Correct |
448 ms |
261528 KB |
Output is correct |
14 |
Correct |
475 ms |
263608 KB |
Output is correct |
15 |
Correct |
892 ms |
272556 KB |
Output is correct |
16 |
Correct |
1759 ms |
315244 KB |
Output is correct |
17 |
Correct |
563 ms |
275836 KB |
Output is correct |
18 |
Correct |
564 ms |
274512 KB |
Output is correct |
19 |
Correct |
538 ms |
273876 KB |
Output is correct |
20 |
Correct |
528 ms |
270076 KB |
Output is correct |
21 |
Correct |
607 ms |
277248 KB |
Output is correct |
22 |
Correct |
445 ms |
258224 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
83 ms |
183500 KB |
Output is correct |
2 |
Correct |
86 ms |
183528 KB |
Output is correct |
3 |
Correct |
88 ms |
183628 KB |
Output is correct |
4 |
Correct |
86 ms |
183656 KB |
Output is correct |
5 |
Correct |
86 ms |
183664 KB |
Output is correct |
6 |
Correct |
87 ms |
183648 KB |
Output is correct |
7 |
Correct |
90 ms |
183644 KB |
Output is correct |
8 |
Correct |
86 ms |
183628 KB |
Output is correct |
9 |
Correct |
90 ms |
183656 KB |
Output is correct |
10 |
Correct |
91 ms |
183684 KB |
Output is correct |
11 |
Correct |
89 ms |
183576 KB |
Output is correct |
12 |
Correct |
87 ms |
183688 KB |
Output is correct |
13 |
Correct |
87 ms |
183612 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
83 ms |
183500 KB |
Output is correct |
2 |
Correct |
86 ms |
183528 KB |
Output is correct |
3 |
Correct |
88 ms |
183628 KB |
Output is correct |
4 |
Correct |
86 ms |
183656 KB |
Output is correct |
5 |
Correct |
86 ms |
183664 KB |
Output is correct |
6 |
Correct |
87 ms |
183648 KB |
Output is correct |
7 |
Correct |
90 ms |
183644 KB |
Output is correct |
8 |
Correct |
86 ms |
183628 KB |
Output is correct |
9 |
Correct |
90 ms |
183656 KB |
Output is correct |
10 |
Correct |
91 ms |
183684 KB |
Output is correct |
11 |
Correct |
89 ms |
183576 KB |
Output is correct |
12 |
Correct |
87 ms |
183688 KB |
Output is correct |
13 |
Correct |
87 ms |
183612 KB |
Output is correct |
14 |
Correct |
84 ms |
183512 KB |
Output is correct |
15 |
Correct |
88 ms |
183500 KB |
Output is correct |
16 |
Correct |
92 ms |
183628 KB |
Output is correct |
17 |
Correct |
91 ms |
183704 KB |
Output is correct |
18 |
Correct |
91 ms |
183720 KB |
Output is correct |
19 |
Correct |
85 ms |
183500 KB |
Output is correct |
20 |
Correct |
91 ms |
183608 KB |
Output is correct |
21 |
Correct |
88 ms |
183668 KB |
Output is correct |
22 |
Correct |
97 ms |
183760 KB |
Output is correct |
23 |
Correct |
89 ms |
183508 KB |
Output is correct |
24 |
Correct |
86 ms |
183564 KB |
Output is correct |
25 |
Correct |
89 ms |
183636 KB |
Output is correct |
26 |
Correct |
93 ms |
183648 KB |
Output is correct |
27 |
Correct |
88 ms |
183664 KB |
Output is correct |
28 |
Correct |
92 ms |
183528 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
83 ms |
183500 KB |
Output is correct |
2 |
Correct |
86 ms |
183528 KB |
Output is correct |
3 |
Correct |
88 ms |
183628 KB |
Output is correct |
4 |
Correct |
86 ms |
183656 KB |
Output is correct |
5 |
Correct |
86 ms |
183664 KB |
Output is correct |
6 |
Correct |
87 ms |
183648 KB |
Output is correct |
7 |
Correct |
90 ms |
183644 KB |
Output is correct |
8 |
Correct |
86 ms |
183628 KB |
Output is correct |
9 |
Correct |
90 ms |
183656 KB |
Output is correct |
10 |
Correct |
91 ms |
183684 KB |
Output is correct |
11 |
Correct |
89 ms |
183576 KB |
Output is correct |
12 |
Correct |
87 ms |
183688 KB |
Output is correct |
13 |
Correct |
87 ms |
183612 KB |
Output is correct |
14 |
Correct |
84 ms |
183512 KB |
Output is correct |
15 |
Correct |
88 ms |
183500 KB |
Output is correct |
16 |
Correct |
92 ms |
183628 KB |
Output is correct |
17 |
Correct |
91 ms |
183704 KB |
Output is correct |
18 |
Correct |
91 ms |
183720 KB |
Output is correct |
19 |
Correct |
85 ms |
183500 KB |
Output is correct |
20 |
Correct |
91 ms |
183608 KB |
Output is correct |
21 |
Correct |
88 ms |
183668 KB |
Output is correct |
22 |
Correct |
97 ms |
183760 KB |
Output is correct |
23 |
Correct |
89 ms |
183508 KB |
Output is correct |
24 |
Correct |
86 ms |
183564 KB |
Output is correct |
25 |
Correct |
89 ms |
183636 KB |
Output is correct |
26 |
Correct |
93 ms |
183648 KB |
Output is correct |
27 |
Correct |
88 ms |
183664 KB |
Output is correct |
28 |
Correct |
92 ms |
183528 KB |
Output is correct |
29 |
Correct |
90 ms |
183736 KB |
Output is correct |
30 |
Correct |
90 ms |
183728 KB |
Output is correct |
31 |
Correct |
90 ms |
183748 KB |
Output is correct |
32 |
Correct |
90 ms |
183740 KB |
Output is correct |
33 |
Correct |
89 ms |
183708 KB |
Output is correct |
34 |
Correct |
90 ms |
183656 KB |
Output is correct |
35 |
Correct |
90 ms |
183640 KB |
Output is correct |
36 |
Correct |
96 ms |
183720 KB |
Output is correct |
37 |
Correct |
89 ms |
183732 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
83 ms |
183500 KB |
Output is correct |
2 |
Correct |
86 ms |
183528 KB |
Output is correct |
3 |
Correct |
88 ms |
183628 KB |
Output is correct |
4 |
Correct |
86 ms |
183656 KB |
Output is correct |
5 |
Correct |
86 ms |
183664 KB |
Output is correct |
6 |
Correct |
87 ms |
183648 KB |
Output is correct |
7 |
Correct |
90 ms |
183644 KB |
Output is correct |
8 |
Correct |
86 ms |
183628 KB |
Output is correct |
9 |
Correct |
90 ms |
183656 KB |
Output is correct |
10 |
Correct |
91 ms |
183684 KB |
Output is correct |
11 |
Correct |
89 ms |
183576 KB |
Output is correct |
12 |
Correct |
87 ms |
183688 KB |
Output is correct |
13 |
Correct |
87 ms |
183612 KB |
Output is correct |
14 |
Correct |
84 ms |
183512 KB |
Output is correct |
15 |
Correct |
88 ms |
183500 KB |
Output is correct |
16 |
Correct |
92 ms |
183628 KB |
Output is correct |
17 |
Correct |
91 ms |
183704 KB |
Output is correct |
18 |
Correct |
91 ms |
183720 KB |
Output is correct |
19 |
Correct |
85 ms |
183500 KB |
Output is correct |
20 |
Correct |
91 ms |
183608 KB |
Output is correct |
21 |
Correct |
88 ms |
183668 KB |
Output is correct |
22 |
Correct |
97 ms |
183760 KB |
Output is correct |
23 |
Correct |
89 ms |
183508 KB |
Output is correct |
24 |
Correct |
86 ms |
183564 KB |
Output is correct |
25 |
Correct |
89 ms |
183636 KB |
Output is correct |
26 |
Correct |
93 ms |
183648 KB |
Output is correct |
27 |
Correct |
88 ms |
183664 KB |
Output is correct |
28 |
Correct |
92 ms |
183528 KB |
Output is correct |
29 |
Correct |
90 ms |
183736 KB |
Output is correct |
30 |
Correct |
90 ms |
183728 KB |
Output is correct |
31 |
Correct |
90 ms |
183748 KB |
Output is correct |
32 |
Correct |
90 ms |
183740 KB |
Output is correct |
33 |
Correct |
89 ms |
183708 KB |
Output is correct |
34 |
Correct |
90 ms |
183656 KB |
Output is correct |
35 |
Correct |
90 ms |
183640 KB |
Output is correct |
36 |
Correct |
96 ms |
183720 KB |
Output is correct |
37 |
Correct |
89 ms |
183732 KB |
Output is correct |
38 |
Correct |
228 ms |
188688 KB |
Output is correct |
39 |
Correct |
213 ms |
235536 KB |
Output is correct |
40 |
Correct |
265 ms |
188480 KB |
Output is correct |
41 |
Correct |
277 ms |
188164 KB |
Output is correct |
42 |
Correct |
228 ms |
188508 KB |
Output is correct |
43 |
Correct |
176 ms |
187504 KB |
Output is correct |
44 |
Correct |
132 ms |
184496 KB |
Output is correct |
45 |
Correct |
252 ms |
229564 KB |
Output is correct |
46 |
Correct |
253 ms |
230812 KB |
Output is correct |
47 |
Correct |
240 ms |
239376 KB |
Output is correct |
48 |
Correct |
246 ms |
239260 KB |
Output is correct |
49 |
Correct |
232 ms |
231860 KB |
Output is correct |
50 |
Correct |
238 ms |
232592 KB |
Output is correct |
51 |
Correct |
214 ms |
230708 KB |
Output is correct |
52 |
Correct |
197 ms |
226088 KB |
Output is correct |
53 |
Correct |
133 ms |
187732 KB |
Output is correct |
54 |
Correct |
274 ms |
231668 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
86 ms |
183456 KB |
Output is correct |
2 |
Correct |
83 ms |
183536 KB |
Output is correct |
3 |
Correct |
84 ms |
183464 KB |
Output is correct |
4 |
Correct |
94 ms |
183456 KB |
Output is correct |
5 |
Correct |
190 ms |
183576 KB |
Output is correct |
6 |
Correct |
86 ms |
183608 KB |
Output is correct |
7 |
Correct |
85 ms |
183628 KB |
Output is correct |
8 |
Correct |
84 ms |
183556 KB |
Output is correct |
9 |
Correct |
84 ms |
183532 KB |
Output is correct |
10 |
Correct |
87 ms |
183492 KB |
Output is correct |
11 |
Correct |
94 ms |
183500 KB |
Output is correct |
12 |
Correct |
94 ms |
183660 KB |
Output is correct |
13 |
Correct |
269 ms |
183756 KB |
Output is correct |
14 |
Correct |
294 ms |
183680 KB |
Output is correct |
15 |
Correct |
262 ms |
183616 KB |
Output is correct |
16 |
Correct |
383 ms |
234944 KB |
Output is correct |
17 |
Correct |
1029 ms |
254028 KB |
Output is correct |
18 |
Correct |
1985 ms |
294608 KB |
Output is correct |
19 |
Correct |
521 ms |
239732 KB |
Output is correct |
20 |
Correct |
553 ms |
238344 KB |
Output is correct |
21 |
Correct |
526 ms |
241476 KB |
Output is correct |
22 |
Correct |
926 ms |
253856 KB |
Output is correct |
23 |
Correct |
735 ms |
253008 KB |
Output is correct |
24 |
Correct |
885 ms |
256816 KB |
Output is correct |
25 |
Correct |
817 ms |
255636 KB |
Output is correct |
26 |
Correct |
847 ms |
257732 KB |
Output is correct |
27 |
Correct |
1237 ms |
267236 KB |
Output is correct |
28 |
Correct |
1203 ms |
265472 KB |
Output is correct |
29 |
Correct |
1054 ms |
255084 KB |
Output is correct |
30 |
Correct |
819 ms |
250096 KB |
Output is correct |
31 |
Correct |
771 ms |
249764 KB |
Output is correct |
32 |
Correct |
787 ms |
250832 KB |
Output is correct |
33 |
Correct |
802 ms |
249788 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
83 ms |
183476 KB |
Output is correct |
2 |
Correct |
82 ms |
183532 KB |
Output is correct |
3 |
Correct |
89 ms |
183584 KB |
Output is correct |
4 |
Correct |
152 ms |
183648 KB |
Output is correct |
5 |
Correct |
219 ms |
183656 KB |
Output is correct |
6 |
Correct |
89 ms |
183612 KB |
Output is correct |
7 |
Correct |
87 ms |
183700 KB |
Output is correct |
8 |
Correct |
99 ms |
183748 KB |
Output is correct |
9 |
Correct |
244 ms |
188676 KB |
Output is correct |
10 |
Correct |
213 ms |
235540 KB |
Output is correct |
11 |
Correct |
173 ms |
183580 KB |
Output is correct |
12 |
Correct |
287 ms |
183596 KB |
Output is correct |
13 |
Correct |
448 ms |
261528 KB |
Output is correct |
14 |
Correct |
475 ms |
263608 KB |
Output is correct |
15 |
Correct |
892 ms |
272556 KB |
Output is correct |
16 |
Correct |
1759 ms |
315244 KB |
Output is correct |
17 |
Correct |
563 ms |
275836 KB |
Output is correct |
18 |
Correct |
564 ms |
274512 KB |
Output is correct |
19 |
Correct |
538 ms |
273876 KB |
Output is correct |
20 |
Correct |
528 ms |
270076 KB |
Output is correct |
21 |
Correct |
607 ms |
277248 KB |
Output is correct |
22 |
Correct |
445 ms |
258224 KB |
Output is correct |
23 |
Correct |
83 ms |
183500 KB |
Output is correct |
24 |
Correct |
86 ms |
183528 KB |
Output is correct |
25 |
Correct |
88 ms |
183628 KB |
Output is correct |
26 |
Correct |
86 ms |
183656 KB |
Output is correct |
27 |
Correct |
86 ms |
183664 KB |
Output is correct |
28 |
Correct |
87 ms |
183648 KB |
Output is correct |
29 |
Correct |
90 ms |
183644 KB |
Output is correct |
30 |
Correct |
86 ms |
183628 KB |
Output is correct |
31 |
Correct |
90 ms |
183656 KB |
Output is correct |
32 |
Correct |
91 ms |
183684 KB |
Output is correct |
33 |
Correct |
89 ms |
183576 KB |
Output is correct |
34 |
Correct |
87 ms |
183688 KB |
Output is correct |
35 |
Correct |
87 ms |
183612 KB |
Output is correct |
36 |
Correct |
84 ms |
183512 KB |
Output is correct |
37 |
Correct |
88 ms |
183500 KB |
Output is correct |
38 |
Correct |
92 ms |
183628 KB |
Output is correct |
39 |
Correct |
91 ms |
183704 KB |
Output is correct |
40 |
Correct |
91 ms |
183720 KB |
Output is correct |
41 |
Correct |
85 ms |
183500 KB |
Output is correct |
42 |
Correct |
91 ms |
183608 KB |
Output is correct |
43 |
Correct |
88 ms |
183668 KB |
Output is correct |
44 |
Correct |
97 ms |
183760 KB |
Output is correct |
45 |
Correct |
89 ms |
183508 KB |
Output is correct |
46 |
Correct |
86 ms |
183564 KB |
Output is correct |
47 |
Correct |
89 ms |
183636 KB |
Output is correct |
48 |
Correct |
93 ms |
183648 KB |
Output is correct |
49 |
Correct |
88 ms |
183664 KB |
Output is correct |
50 |
Correct |
92 ms |
183528 KB |
Output is correct |
51 |
Correct |
90 ms |
183736 KB |
Output is correct |
52 |
Correct |
90 ms |
183728 KB |
Output is correct |
53 |
Correct |
90 ms |
183748 KB |
Output is correct |
54 |
Correct |
90 ms |
183740 KB |
Output is correct |
55 |
Correct |
89 ms |
183708 KB |
Output is correct |
56 |
Correct |
90 ms |
183656 KB |
Output is correct |
57 |
Correct |
90 ms |
183640 KB |
Output is correct |
58 |
Correct |
96 ms |
183720 KB |
Output is correct |
59 |
Correct |
89 ms |
183732 KB |
Output is correct |
60 |
Correct |
228 ms |
188688 KB |
Output is correct |
61 |
Correct |
213 ms |
235536 KB |
Output is correct |
62 |
Correct |
265 ms |
188480 KB |
Output is correct |
63 |
Correct |
277 ms |
188164 KB |
Output is correct |
64 |
Correct |
228 ms |
188508 KB |
Output is correct |
65 |
Correct |
176 ms |
187504 KB |
Output is correct |
66 |
Correct |
132 ms |
184496 KB |
Output is correct |
67 |
Correct |
252 ms |
229564 KB |
Output is correct |
68 |
Correct |
253 ms |
230812 KB |
Output is correct |
69 |
Correct |
240 ms |
239376 KB |
Output is correct |
70 |
Correct |
246 ms |
239260 KB |
Output is correct |
71 |
Correct |
232 ms |
231860 KB |
Output is correct |
72 |
Correct |
238 ms |
232592 KB |
Output is correct |
73 |
Correct |
214 ms |
230708 KB |
Output is correct |
74 |
Correct |
197 ms |
226088 KB |
Output is correct |
75 |
Correct |
133 ms |
187732 KB |
Output is correct |
76 |
Correct |
274 ms |
231668 KB |
Output is correct |
77 |
Correct |
86 ms |
183456 KB |
Output is correct |
78 |
Correct |
83 ms |
183536 KB |
Output is correct |
79 |
Correct |
84 ms |
183464 KB |
Output is correct |
80 |
Correct |
94 ms |
183456 KB |
Output is correct |
81 |
Correct |
190 ms |
183576 KB |
Output is correct |
82 |
Correct |
86 ms |
183608 KB |
Output is correct |
83 |
Correct |
85 ms |
183628 KB |
Output is correct |
84 |
Correct |
84 ms |
183556 KB |
Output is correct |
85 |
Correct |
84 ms |
183532 KB |
Output is correct |
86 |
Correct |
87 ms |
183492 KB |
Output is correct |
87 |
Correct |
94 ms |
183500 KB |
Output is correct |
88 |
Correct |
94 ms |
183660 KB |
Output is correct |
89 |
Correct |
269 ms |
183756 KB |
Output is correct |
90 |
Correct |
294 ms |
183680 KB |
Output is correct |
91 |
Correct |
262 ms |
183616 KB |
Output is correct |
92 |
Correct |
383 ms |
234944 KB |
Output is correct |
93 |
Correct |
1029 ms |
254028 KB |
Output is correct |
94 |
Correct |
1985 ms |
294608 KB |
Output is correct |
95 |
Correct |
521 ms |
239732 KB |
Output is correct |
96 |
Correct |
553 ms |
238344 KB |
Output is correct |
97 |
Correct |
526 ms |
241476 KB |
Output is correct |
98 |
Correct |
926 ms |
253856 KB |
Output is correct |
99 |
Correct |
735 ms |
253008 KB |
Output is correct |
100 |
Correct |
885 ms |
256816 KB |
Output is correct |
101 |
Correct |
817 ms |
255636 KB |
Output is correct |
102 |
Correct |
847 ms |
257732 KB |
Output is correct |
103 |
Correct |
1237 ms |
267236 KB |
Output is correct |
104 |
Correct |
1203 ms |
265472 KB |
Output is correct |
105 |
Correct |
1054 ms |
255084 KB |
Output is correct |
106 |
Correct |
819 ms |
250096 KB |
Output is correct |
107 |
Correct |
771 ms |
249764 KB |
Output is correct |
108 |
Correct |
787 ms |
250832 KB |
Output is correct |
109 |
Correct |
802 ms |
249788 KB |
Output is correct |
110 |
Correct |
324 ms |
184708 KB |
Output is correct |
111 |
Correct |
234 ms |
184236 KB |
Output is correct |
112 |
Correct |
1143 ms |
273180 KB |
Output is correct |
113 |
Correct |
561 ms |
252288 KB |
Output is correct |
114 |
Correct |
959 ms |
261700 KB |
Output is correct |
115 |
Correct |
256 ms |
233784 KB |
Output is correct |
116 |
Correct |
693 ms |
250180 KB |
Output is correct |
117 |
Correct |
2833 ms |
313636 KB |
Output is correct |
118 |
Correct |
286 ms |
232564 KB |
Output is correct |
119 |
Correct |
274 ms |
231688 KB |
Output is correct |
120 |
Correct |
125 ms |
189708 KB |
Output is correct |
121 |
Correct |
821 ms |
251956 KB |
Output is correct |
122 |
Correct |
795 ms |
252004 KB |
Output is correct |
123 |
Correct |
568 ms |
256364 KB |
Output is correct |
124 |
Correct |
561 ms |
250912 KB |
Output is correct |
125 |
Correct |
542 ms |
251412 KB |
Output is correct |
126 |
Correct |
1864 ms |
311680 KB |
Output is correct |
127 |
Correct |
833 ms |
277836 KB |
Output is correct |
128 |
Correct |
702 ms |
279340 KB |
Output is correct |
129 |
Correct |
682 ms |
280828 KB |
Output is correct |
130 |
Correct |
667 ms |
278480 KB |
Output is correct |