# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
567855 |
2022-05-24T09:29:40 Z |
joshjms |
Jail (JOI22_jail) |
C++17 |
|
2318 ms |
507148 KB |
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#define int long long
#define ld long double
#define pb push_back
#define fi first
#define se second
#define debug(x) cout << #x << " => " << x << "\n";
const long long mod = 1e9 + 7;
int n, a[120005], b[120005], m, s[120005], t[120005];
vector <int> g[120005];
int par[120005][20], in[120005], out[120005], tmr;
int node[120005][20][2], nodes;
vector <int> dirGraph[4800005];
pair <int,int> range[4800005];
int vis[4800005], flag;
void init() {
cin >> n;
for(int i = 1; i < n; i++)
cin >> a[i] >> b[i];
cin >> m;
for(int i = 1; i <= m; i++)
cin >> s[i] >> t[i];
for(int i = 1; i <= n; i++) {
g[i].clear();
in[i] = out[i] = 0;
for(int j = 0; j < 20; j++) par[i][j] = 0;
}
for(int i = 1; i < n; i++) {
g[a[i]].pb(b[i]);
g[b[i]].pb(a[i]);
}
in[0] = -1;
out[0] = 1e18;
tmr = 0;
for(int i = 1; i <= 40 * n; i++) {
dirGraph[i].clear();
vis[i] = 0;
}
for(int i = 1; i <= n; i++) {
for(int j = 0; j < 20; j++) {
node[i][j][0] = node[i][j][1] = 0;
}
}
nodes = 0;
}
void dfs(int v, int p) {
par[v][0] = v;
par[v][1] = p;
for(int i = 2; i < 18; i++)
par[v][i] = par[par[par[v][i - 1]][1]][i - 1];
in[v] = ++tmr;
for(auto c : g[v]) if(c != p)
dfs(c, v);
out[v] = ++tmr;
}
void findCycle(int v) {
vis[v] = 1;
// cout << "[" << v << "][" << range[v].fi << " " << range[v].se << "]" << (v % 2 ? "[S]" : "[T]") << "\n";
for(auto c : dirGraph[v]) {
if(vis[c] == 1) {flag = 1; return;}
if(vis[c] == 0) findCycle(c);
}
vis[v] = 2;
}
void solve () {
dfs(1, 0);
// for(int i = 1; i <= n; i++) {
// for(int j = 0; j < 18; j++) {
// cout << par[i][j] << " ";
// }
// cout << "\n";
// }
nodes = 0;
for(int i = 1; i <= n; i++) {
node[i][0][0] = ++nodes;
node[i][0][1] = ++nodes;
range[node[i][0][0]] = range[node[i][0][1]] = {i, i};
}
for(int i = 1; i <= m; i++) {
dirGraph[node[s[i]][0][0]].pb(node[t[i]][0][1]);
}
auto showNode = [&](int i, int j) {
cout << "[" << i << " " << par[i][j] << "]\n";
return;
};
for(int i = 1; i <= n; i++) {
for(int j = 1; j < 18; j++) {
node[i][j][0] = ++nodes;
node[i][j][1] = ++nodes;
}
}
for(int i = 1; i <= n; i++) {
for(int j = 1; j < 18; j++) {
range[node[i][j][0]] = range[node[i][j][1]] = {i, par[i][j]};
// showNode(i, j);
// cout << "child: \n";
// showNode(i, j - 1);
// showNode(par[par[i][j - 1]][1], j - 1);
// cout << "\n";
// cout << "[" << i << " " << j << "] => " << node[i][j][0] << ", " << node[i][j][1] << "\n";
dirGraph[node[i][j][0]].pb(node[i][j - 1][0]);
if(dirGraph[node[i][j][0]].back() == 0) dirGraph[node[i][j][0]].pop_back();
dirGraph[node[i][j][0]].pb(node[par[par[i][j - 1]][1]][j - 1][0]);
if(dirGraph[node[i][j][0]].back() == 0) dirGraph[node[i][j][0]].pop_back();
dirGraph[node[i][j - 1][1]].pb(node[i][j][1]);
if(dirGraph[node[i][j - 1][1]].back() == 0) dirGraph[node[i][j - 1][1]].pop_back();
dirGraph[node[par[par[i][j - 1]][1]][j - 1][1]].pb(node[i][j][1]);
if(dirGraph[node[i][j - 1][1]].back() == 0) dirGraph[node[i][j - 1][1]].pop_back();
}
}
auto lca = [&](int u, int v) {
if(in[u] <= in[v] && out[u] >= out[v]) return u;
if(in[v] <= in[u] && out[v] >= out[u]) return v;
for(int i = 17; i >= 1; i--) {
while(!(in[par[u][i]] <= in[v] && out[par[u][i]] >= out[v])) {
u = par[u][i];
}
}
return par[u][1];
};
for(int i = 1; i <= m; i++) {
int LCA = lca(s[i], t[i]);
// debug(s[i]);
// debug(t[i]);
// debug(LCA);
if(LCA == s[i]) {
int u, v;
u = t[i], v = s[i];
for(int j = 17; j >= 0; j--) {
while(true) {
if(in[par[u][j]] <= in[v] && out[par[u][j]] >= out[v]) break;
// cout << "[" << u << " -> " << par[u][j] << "]\n";
dirGraph[node[s[i]][0][0]].pb(node[u][j][0]);
u = par[par[u][j]][1];
}
}
u = par[t[i]][1], v = par[s[i]][1];
for(int j = 17; j >= 0; j--) {
while(true) {
if(in[par[u][j]] <= in[v] && out[par[u][j]] >= out[v]) break;
// cout << "[" << u << " -> " << par[u][j] << "]\n";
dirGraph[node[u][j][1]].pb(node[s[i]][0][0]);
u = par[par[u][j]][1];
}
}
}
else if(LCA == t[i]) {
int u, v;
u = par[s[i]][1], v = par[t[i]][1];
for(int j = 17; j >= 0; j--) {
while(true) {
if(in[par[u][j]] <= in[v] && out[par[u][j]] >= out[v]) break;
// cout << "[" << u << " -> " << par[u][j] << "]\n";
dirGraph[node[s[i]][0][0]].pb(node[u][j][0]);
u = par[par[u][j]][1];
}
}
u = s[i], v = t[i];
for(int j = 17; j >= 0; j--) {
while(true) {
if(in[par[u][j]] <= in[v] && out[par[u][j]] >= out[v]) break;
// cout << "[" << u << " -> " << par[u][j] << "]\n";
dirGraph[node[u][j][1]].pb(node[s[i]][0][0]);
u = par[par[u][j]][1];
}
}
}
else {
int u, v;
u = par[s[i]][1], v = par[LCA][1];
for(int j = 17; j >= 0; j--) {
while(true) {
if(in[par[u][j]] <= in[v] && out[par[u][j]] >= out[v]) break;
dirGraph[node[s[i]][0][0]].pb(node[u][j][0]);
u = par[par[u][j]][1];
}
}
u = t[i], v = par[LCA][1];
for(int j = 17; j >= 0; j--) {
while(true) {
if(in[par[u][j]] <= in[v] && out[par[u][j]] >= out[v]) break;
dirGraph[node[s[i]][0][0]].pb(node[u][j][0]);
u = par[par[u][j]][1];
}
}
u = par[t[i]][1], v = par[LCA][1];
for(int j = 17; j >= 0; j--) {
while(true) {
if(in[par[u][j]] <= in[v] && out[par[u][j]] >= out[v]) break;
dirGraph[node[u][j][1]].pb(node[s[i]][0][0]);
u = par[par[u][j]][1];
}
}
u = s[i], v = par[LCA][1];
for(int j = 17; j >= 0; j--) {
while(true) {
if(in[par[u][j]] <= in[v] && out[par[u][j]] >= out[v]) break;
dirGraph[node[u][j][1]].pb(node[s[i]][0][0]);
u = par[par[u][j]][1];
}
}
}
}
// int u = 2;
// while(u != 1) {cout << u << " "; u = par[u][1];}
// cout << "\n";
// u = 12;
// while(u != 1) {cout << u << " "; u = par[u][1];}
// cout << "\n";
flag = 0;
// for(auto c : dirGraph[node[1][0][0]])
// cout << c << " ";
// cout << "\n";
for(int j = 17; j >= 0; j--) {
for(int i = 1; i <= n; i++) {
if(vis[node[i][0][0]] == 0) {
findCycle(node[i][j][0]);
if(flag) break;
}
}
}
if(flag) cout << "No\n";
else cout << "Yes\n";
}
signed main () {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int tc; cin >> tc;
while(tc--) {
init ();
solve ();
}
}
Compilation message
jail.cpp: In function 'void solve()':
jail.cpp:114:10: warning: variable 'showNode' set but not used [-Wunused-but-set-variable]
114 | auto showNode = [&](int i, int j) {
| ^~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
56 ms |
115924 KB |
Output is correct |
2 |
Correct |
53 ms |
115924 KB |
Output is correct |
3 |
Correct |
54 ms |
115860 KB |
Output is correct |
4 |
Correct |
129 ms |
124872 KB |
Output is correct |
5 |
Correct |
192 ms |
133412 KB |
Output is correct |
6 |
Correct |
65 ms |
117228 KB |
Output is correct |
7 |
Correct |
66 ms |
117184 KB |
Output is correct |
8 |
Correct |
81 ms |
117276 KB |
Output is correct |
9 |
Correct |
454 ms |
141896 KB |
Output is correct |
10 |
Correct |
1002 ms |
421004 KB |
Output is correct |
11 |
Correct |
85 ms |
120260 KB |
Output is correct |
12 |
Correct |
219 ms |
133672 KB |
Output is correct |
13 |
Correct |
1412 ms |
435832 KB |
Output is correct |
14 |
Correct |
1216 ms |
436120 KB |
Output is correct |
15 |
Correct |
1787 ms |
457396 KB |
Output is correct |
16 |
Correct |
2318 ms |
507148 KB |
Output is correct |
17 |
Correct |
1300 ms |
467116 KB |
Output is correct |
18 |
Correct |
1241 ms |
433976 KB |
Output is correct |
19 |
Correct |
1265 ms |
443680 KB |
Output is correct |
20 |
Correct |
1276 ms |
451856 KB |
Output is correct |
21 |
Correct |
1539 ms |
462824 KB |
Output is correct |
22 |
Correct |
1054 ms |
427024 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
58 ms |
115920 KB |
Output is correct |
2 |
Correct |
62 ms |
115856 KB |
Output is correct |
3 |
Correct |
68 ms |
117340 KB |
Output is correct |
4 |
Correct |
62 ms |
117204 KB |
Output is correct |
5 |
Correct |
72 ms |
117244 KB |
Output is correct |
6 |
Correct |
65 ms |
117228 KB |
Output is correct |
7 |
Correct |
78 ms |
117276 KB |
Output is correct |
8 |
Correct |
64 ms |
117148 KB |
Output is correct |
9 |
Correct |
70 ms |
117132 KB |
Output is correct |
10 |
Correct |
69 ms |
117248 KB |
Output is correct |
11 |
Correct |
73 ms |
117156 KB |
Output is correct |
12 |
Correct |
60 ms |
117188 KB |
Output is correct |
13 |
Correct |
60 ms |
117172 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
58 ms |
115920 KB |
Output is correct |
2 |
Correct |
62 ms |
115856 KB |
Output is correct |
3 |
Correct |
68 ms |
117340 KB |
Output is correct |
4 |
Correct |
62 ms |
117204 KB |
Output is correct |
5 |
Correct |
72 ms |
117244 KB |
Output is correct |
6 |
Correct |
65 ms |
117228 KB |
Output is correct |
7 |
Correct |
78 ms |
117276 KB |
Output is correct |
8 |
Correct |
64 ms |
117148 KB |
Output is correct |
9 |
Correct |
70 ms |
117132 KB |
Output is correct |
10 |
Correct |
69 ms |
117248 KB |
Output is correct |
11 |
Correct |
73 ms |
117156 KB |
Output is correct |
12 |
Correct |
60 ms |
117188 KB |
Output is correct |
13 |
Correct |
60 ms |
117172 KB |
Output is correct |
14 |
Correct |
62 ms |
115920 KB |
Output is correct |
15 |
Correct |
62 ms |
115864 KB |
Output is correct |
16 |
Correct |
63 ms |
117164 KB |
Output is correct |
17 |
Correct |
61 ms |
117768 KB |
Output is correct |
18 |
Correct |
63 ms |
117200 KB |
Output is correct |
19 |
Correct |
57 ms |
115916 KB |
Output is correct |
20 |
Correct |
65 ms |
117160 KB |
Output is correct |
21 |
Correct |
67 ms |
117268 KB |
Output is correct |
22 |
Correct |
66 ms |
117640 KB |
Output is correct |
23 |
Correct |
64 ms |
115944 KB |
Output is correct |
24 |
Correct |
59 ms |
116208 KB |
Output is correct |
25 |
Correct |
64 ms |
117148 KB |
Output is correct |
26 |
Correct |
57 ms |
116536 KB |
Output is correct |
27 |
Correct |
61 ms |
117692 KB |
Output is correct |
28 |
Correct |
62 ms |
116020 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
58 ms |
115920 KB |
Output is correct |
2 |
Correct |
62 ms |
115856 KB |
Output is correct |
3 |
Correct |
68 ms |
117340 KB |
Output is correct |
4 |
Correct |
62 ms |
117204 KB |
Output is correct |
5 |
Correct |
72 ms |
117244 KB |
Output is correct |
6 |
Correct |
65 ms |
117228 KB |
Output is correct |
7 |
Correct |
78 ms |
117276 KB |
Output is correct |
8 |
Correct |
64 ms |
117148 KB |
Output is correct |
9 |
Correct |
70 ms |
117132 KB |
Output is correct |
10 |
Correct |
69 ms |
117248 KB |
Output is correct |
11 |
Correct |
73 ms |
117156 KB |
Output is correct |
12 |
Correct |
60 ms |
117188 KB |
Output is correct |
13 |
Correct |
60 ms |
117172 KB |
Output is correct |
14 |
Correct |
62 ms |
115920 KB |
Output is correct |
15 |
Correct |
62 ms |
115864 KB |
Output is correct |
16 |
Correct |
63 ms |
117164 KB |
Output is correct |
17 |
Correct |
61 ms |
117768 KB |
Output is correct |
18 |
Correct |
63 ms |
117200 KB |
Output is correct |
19 |
Correct |
57 ms |
115916 KB |
Output is correct |
20 |
Correct |
65 ms |
117160 KB |
Output is correct |
21 |
Correct |
67 ms |
117268 KB |
Output is correct |
22 |
Correct |
66 ms |
117640 KB |
Output is correct |
23 |
Correct |
64 ms |
115944 KB |
Output is correct |
24 |
Correct |
59 ms |
116208 KB |
Output is correct |
25 |
Correct |
64 ms |
117148 KB |
Output is correct |
26 |
Correct |
57 ms |
116536 KB |
Output is correct |
27 |
Correct |
61 ms |
117692 KB |
Output is correct |
28 |
Correct |
62 ms |
116020 KB |
Output is correct |
29 |
Correct |
64 ms |
117216 KB |
Output is correct |
30 |
Correct |
63 ms |
117704 KB |
Output is correct |
31 |
Correct |
66 ms |
117284 KB |
Output is correct |
32 |
Correct |
72 ms |
117224 KB |
Output is correct |
33 |
Correct |
65 ms |
117196 KB |
Output is correct |
34 |
Correct |
67 ms |
117016 KB |
Output is correct |
35 |
Correct |
64 ms |
117112 KB |
Output is correct |
36 |
Correct |
60 ms |
117028 KB |
Output is correct |
37 |
Correct |
59 ms |
116812 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
58 ms |
115920 KB |
Output is correct |
2 |
Correct |
62 ms |
115856 KB |
Output is correct |
3 |
Correct |
68 ms |
117340 KB |
Output is correct |
4 |
Correct |
62 ms |
117204 KB |
Output is correct |
5 |
Correct |
72 ms |
117244 KB |
Output is correct |
6 |
Correct |
65 ms |
117228 KB |
Output is correct |
7 |
Correct |
78 ms |
117276 KB |
Output is correct |
8 |
Correct |
64 ms |
117148 KB |
Output is correct |
9 |
Correct |
70 ms |
117132 KB |
Output is correct |
10 |
Correct |
69 ms |
117248 KB |
Output is correct |
11 |
Correct |
73 ms |
117156 KB |
Output is correct |
12 |
Correct |
60 ms |
117188 KB |
Output is correct |
13 |
Correct |
60 ms |
117172 KB |
Output is correct |
14 |
Correct |
62 ms |
115920 KB |
Output is correct |
15 |
Correct |
62 ms |
115864 KB |
Output is correct |
16 |
Correct |
63 ms |
117164 KB |
Output is correct |
17 |
Correct |
61 ms |
117768 KB |
Output is correct |
18 |
Correct |
63 ms |
117200 KB |
Output is correct |
19 |
Correct |
57 ms |
115916 KB |
Output is correct |
20 |
Correct |
65 ms |
117160 KB |
Output is correct |
21 |
Correct |
67 ms |
117268 KB |
Output is correct |
22 |
Correct |
66 ms |
117640 KB |
Output is correct |
23 |
Correct |
64 ms |
115944 KB |
Output is correct |
24 |
Correct |
59 ms |
116208 KB |
Output is correct |
25 |
Correct |
64 ms |
117148 KB |
Output is correct |
26 |
Correct |
57 ms |
116536 KB |
Output is correct |
27 |
Correct |
61 ms |
117692 KB |
Output is correct |
28 |
Correct |
62 ms |
116020 KB |
Output is correct |
29 |
Correct |
64 ms |
117216 KB |
Output is correct |
30 |
Correct |
63 ms |
117704 KB |
Output is correct |
31 |
Correct |
66 ms |
117284 KB |
Output is correct |
32 |
Correct |
72 ms |
117224 KB |
Output is correct |
33 |
Correct |
65 ms |
117196 KB |
Output is correct |
34 |
Correct |
67 ms |
117016 KB |
Output is correct |
35 |
Correct |
64 ms |
117112 KB |
Output is correct |
36 |
Correct |
60 ms |
117028 KB |
Output is correct |
37 |
Correct |
59 ms |
116812 KB |
Output is correct |
38 |
Correct |
467 ms |
141104 KB |
Output is correct |
39 |
Correct |
952 ms |
420796 KB |
Output is correct |
40 |
Correct |
351 ms |
152644 KB |
Output is correct |
41 |
Correct |
341 ms |
149320 KB |
Output is correct |
42 |
Correct |
311 ms |
150368 KB |
Output is correct |
43 |
Correct |
404 ms |
143540 KB |
Output is correct |
44 |
Correct |
93 ms |
122920 KB |
Output is correct |
45 |
Correct |
731 ms |
431232 KB |
Output is correct |
46 |
Correct |
957 ms |
431156 KB |
Output is correct |
47 |
Correct |
830 ms |
429992 KB |
Output is correct |
48 |
Correct |
864 ms |
430064 KB |
Output is correct |
49 |
Correct |
710 ms |
432784 KB |
Output is correct |
50 |
Correct |
721 ms |
432652 KB |
Output is correct |
51 |
Correct |
846 ms |
431976 KB |
Output is correct |
52 |
Correct |
746 ms |
432816 KB |
Output is correct |
53 |
Correct |
153 ms |
140808 KB |
Output is correct |
54 |
Correct |
901 ms |
432480 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
60 ms |
115828 KB |
Output is correct |
2 |
Correct |
61 ms |
115980 KB |
Output is correct |
3 |
Correct |
54 ms |
115904 KB |
Output is correct |
4 |
Correct |
55 ms |
115804 KB |
Output is correct |
5 |
Correct |
83 ms |
120316 KB |
Output is correct |
6 |
Correct |
58 ms |
117208 KB |
Output is correct |
7 |
Correct |
60 ms |
117160 KB |
Output is correct |
8 |
Correct |
54 ms |
116028 KB |
Output is correct |
9 |
Correct |
57 ms |
115900 KB |
Output is correct |
10 |
Correct |
60 ms |
116264 KB |
Output is correct |
11 |
Correct |
56 ms |
116052 KB |
Output is correct |
12 |
Correct |
59 ms |
116944 KB |
Output is correct |
13 |
Correct |
143 ms |
124808 KB |
Output is correct |
14 |
Correct |
206 ms |
133320 KB |
Output is correct |
15 |
Correct |
173 ms |
133500 KB |
Output is correct |
16 |
Correct |
794 ms |
432776 KB |
Output is correct |
17 |
Correct |
1094 ms |
441612 KB |
Output is correct |
18 |
Correct |
1374 ms |
460156 KB |
Output is correct |
19 |
Correct |
946 ms |
434052 KB |
Output is correct |
20 |
Correct |
805 ms |
432900 KB |
Output is correct |
21 |
Correct |
935 ms |
433112 KB |
Output is correct |
22 |
Correct |
989 ms |
441204 KB |
Output is correct |
23 |
Correct |
909 ms |
440364 KB |
Output is correct |
24 |
Correct |
1026 ms |
438672 KB |
Output is correct |
25 |
Correct |
929 ms |
439120 KB |
Output is correct |
26 |
Correct |
1002 ms |
440780 KB |
Output is correct |
27 |
Correct |
924 ms |
451500 KB |
Output is correct |
28 |
Correct |
927 ms |
452524 KB |
Output is correct |
29 |
Correct |
877 ms |
448852 KB |
Output is correct |
30 |
Correct |
860 ms |
440864 KB |
Output is correct |
31 |
Correct |
863 ms |
441464 KB |
Output is correct |
32 |
Correct |
823 ms |
439440 KB |
Output is correct |
33 |
Correct |
863 ms |
440120 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
56 ms |
115924 KB |
Output is correct |
2 |
Correct |
53 ms |
115924 KB |
Output is correct |
3 |
Correct |
54 ms |
115860 KB |
Output is correct |
4 |
Correct |
129 ms |
124872 KB |
Output is correct |
5 |
Correct |
192 ms |
133412 KB |
Output is correct |
6 |
Correct |
65 ms |
117228 KB |
Output is correct |
7 |
Correct |
66 ms |
117184 KB |
Output is correct |
8 |
Correct |
81 ms |
117276 KB |
Output is correct |
9 |
Correct |
454 ms |
141896 KB |
Output is correct |
10 |
Correct |
1002 ms |
421004 KB |
Output is correct |
11 |
Correct |
85 ms |
120260 KB |
Output is correct |
12 |
Correct |
219 ms |
133672 KB |
Output is correct |
13 |
Correct |
1412 ms |
435832 KB |
Output is correct |
14 |
Correct |
1216 ms |
436120 KB |
Output is correct |
15 |
Correct |
1787 ms |
457396 KB |
Output is correct |
16 |
Correct |
2318 ms |
507148 KB |
Output is correct |
17 |
Correct |
1300 ms |
467116 KB |
Output is correct |
18 |
Correct |
1241 ms |
433976 KB |
Output is correct |
19 |
Correct |
1265 ms |
443680 KB |
Output is correct |
20 |
Correct |
1276 ms |
451856 KB |
Output is correct |
21 |
Correct |
1539 ms |
462824 KB |
Output is correct |
22 |
Correct |
1054 ms |
427024 KB |
Output is correct |
23 |
Correct |
58 ms |
115920 KB |
Output is correct |
24 |
Correct |
62 ms |
115856 KB |
Output is correct |
25 |
Correct |
68 ms |
117340 KB |
Output is correct |
26 |
Correct |
62 ms |
117204 KB |
Output is correct |
27 |
Correct |
72 ms |
117244 KB |
Output is correct |
28 |
Correct |
65 ms |
117228 KB |
Output is correct |
29 |
Correct |
78 ms |
117276 KB |
Output is correct |
30 |
Correct |
64 ms |
117148 KB |
Output is correct |
31 |
Correct |
70 ms |
117132 KB |
Output is correct |
32 |
Correct |
69 ms |
117248 KB |
Output is correct |
33 |
Correct |
73 ms |
117156 KB |
Output is correct |
34 |
Correct |
60 ms |
117188 KB |
Output is correct |
35 |
Correct |
60 ms |
117172 KB |
Output is correct |
36 |
Correct |
62 ms |
115920 KB |
Output is correct |
37 |
Correct |
62 ms |
115864 KB |
Output is correct |
38 |
Correct |
63 ms |
117164 KB |
Output is correct |
39 |
Correct |
61 ms |
117768 KB |
Output is correct |
40 |
Correct |
63 ms |
117200 KB |
Output is correct |
41 |
Correct |
57 ms |
115916 KB |
Output is correct |
42 |
Correct |
65 ms |
117160 KB |
Output is correct |
43 |
Correct |
67 ms |
117268 KB |
Output is correct |
44 |
Correct |
66 ms |
117640 KB |
Output is correct |
45 |
Correct |
64 ms |
115944 KB |
Output is correct |
46 |
Correct |
59 ms |
116208 KB |
Output is correct |
47 |
Correct |
64 ms |
117148 KB |
Output is correct |
48 |
Correct |
57 ms |
116536 KB |
Output is correct |
49 |
Correct |
61 ms |
117692 KB |
Output is correct |
50 |
Correct |
62 ms |
116020 KB |
Output is correct |
51 |
Correct |
64 ms |
117216 KB |
Output is correct |
52 |
Correct |
63 ms |
117704 KB |
Output is correct |
53 |
Correct |
66 ms |
117284 KB |
Output is correct |
54 |
Correct |
72 ms |
117224 KB |
Output is correct |
55 |
Correct |
65 ms |
117196 KB |
Output is correct |
56 |
Correct |
67 ms |
117016 KB |
Output is correct |
57 |
Correct |
64 ms |
117112 KB |
Output is correct |
58 |
Correct |
60 ms |
117028 KB |
Output is correct |
59 |
Correct |
59 ms |
116812 KB |
Output is correct |
60 |
Correct |
467 ms |
141104 KB |
Output is correct |
61 |
Correct |
952 ms |
420796 KB |
Output is correct |
62 |
Correct |
351 ms |
152644 KB |
Output is correct |
63 |
Correct |
341 ms |
149320 KB |
Output is correct |
64 |
Correct |
311 ms |
150368 KB |
Output is correct |
65 |
Correct |
404 ms |
143540 KB |
Output is correct |
66 |
Correct |
93 ms |
122920 KB |
Output is correct |
67 |
Correct |
731 ms |
431232 KB |
Output is correct |
68 |
Correct |
957 ms |
431156 KB |
Output is correct |
69 |
Correct |
830 ms |
429992 KB |
Output is correct |
70 |
Correct |
864 ms |
430064 KB |
Output is correct |
71 |
Correct |
710 ms |
432784 KB |
Output is correct |
72 |
Correct |
721 ms |
432652 KB |
Output is correct |
73 |
Correct |
846 ms |
431976 KB |
Output is correct |
74 |
Correct |
746 ms |
432816 KB |
Output is correct |
75 |
Correct |
153 ms |
140808 KB |
Output is correct |
76 |
Correct |
901 ms |
432480 KB |
Output is correct |
77 |
Correct |
60 ms |
115828 KB |
Output is correct |
78 |
Correct |
61 ms |
115980 KB |
Output is correct |
79 |
Correct |
54 ms |
115904 KB |
Output is correct |
80 |
Correct |
55 ms |
115804 KB |
Output is correct |
81 |
Correct |
83 ms |
120316 KB |
Output is correct |
82 |
Correct |
58 ms |
117208 KB |
Output is correct |
83 |
Correct |
60 ms |
117160 KB |
Output is correct |
84 |
Correct |
54 ms |
116028 KB |
Output is correct |
85 |
Correct |
57 ms |
115900 KB |
Output is correct |
86 |
Correct |
60 ms |
116264 KB |
Output is correct |
87 |
Correct |
56 ms |
116052 KB |
Output is correct |
88 |
Correct |
59 ms |
116944 KB |
Output is correct |
89 |
Correct |
143 ms |
124808 KB |
Output is correct |
90 |
Correct |
206 ms |
133320 KB |
Output is correct |
91 |
Correct |
173 ms |
133500 KB |
Output is correct |
92 |
Correct |
794 ms |
432776 KB |
Output is correct |
93 |
Correct |
1094 ms |
441612 KB |
Output is correct |
94 |
Correct |
1374 ms |
460156 KB |
Output is correct |
95 |
Correct |
946 ms |
434052 KB |
Output is correct |
96 |
Correct |
805 ms |
432900 KB |
Output is correct |
97 |
Correct |
935 ms |
433112 KB |
Output is correct |
98 |
Correct |
989 ms |
441204 KB |
Output is correct |
99 |
Correct |
909 ms |
440364 KB |
Output is correct |
100 |
Correct |
1026 ms |
438672 KB |
Output is correct |
101 |
Correct |
929 ms |
439120 KB |
Output is correct |
102 |
Correct |
1002 ms |
440780 KB |
Output is correct |
103 |
Correct |
924 ms |
451500 KB |
Output is correct |
104 |
Correct |
927 ms |
452524 KB |
Output is correct |
105 |
Correct |
877 ms |
448852 KB |
Output is correct |
106 |
Correct |
860 ms |
440864 KB |
Output is correct |
107 |
Correct |
863 ms |
441464 KB |
Output is correct |
108 |
Correct |
823 ms |
439440 KB |
Output is correct |
109 |
Correct |
863 ms |
440120 KB |
Output is correct |
110 |
Correct |
217 ms |
133700 KB |
Output is correct |
111 |
Correct |
171 ms |
133272 KB |
Output is correct |
112 |
Correct |
1560 ms |
464944 KB |
Output is correct |
113 |
Correct |
1022 ms |
436284 KB |
Output is correct |
114 |
Correct |
1261 ms |
455308 KB |
Output is correct |
115 |
Correct |
613 ms |
431052 KB |
Output is correct |
116 |
Correct |
1002 ms |
439296 KB |
Output is correct |
117 |
Correct |
1468 ms |
464584 KB |
Output is correct |
118 |
Correct |
901 ms |
432472 KB |
Output is correct |
119 |
Correct |
824 ms |
432404 KB |
Output is correct |
120 |
Correct |
129 ms |
142776 KB |
Output is correct |
121 |
Correct |
1201 ms |
440088 KB |
Output is correct |
122 |
Correct |
1309 ms |
440004 KB |
Output is correct |
123 |
Correct |
1150 ms |
437380 KB |
Output is correct |
124 |
Correct |
1185 ms |
437280 KB |
Output is correct |
125 |
Correct |
1078 ms |
438360 KB |
Output is correct |
126 |
Correct |
2060 ms |
499460 KB |
Output is correct |
127 |
Correct |
1485 ms |
466164 KB |
Output is correct |
128 |
Correct |
1312 ms |
466456 KB |
Output is correct |
129 |
Correct |
1400 ms |
452024 KB |
Output is correct |
130 |
Correct |
1407 ms |
462528 KB |
Output is correct |