#include <bits/stdc++.h>
#define ll long long
#define rep(i,m,n) for(int i=(m); i<=(n); i++)
#define reb(i,m,n) for(int i=(m); i>=(n); i--)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define MP make_pair
#define fs first
#define se second
#define bit(msk, i) ((msk >> i) & 1)
#define iter(id, v) for(auto id : v)
#define pb push_back
#define SZ(v) (ll)v.size()
#define ALL(v) v.begin(),v.end()
using namespace std;
mt19937_64 rd(chrono :: steady_clock :: now ().time_since_epoch().count());
ll Rand (ll l, ll r) { return uniform_int_distribution<ll> (l, r) (rd); }
const int N = 2e5 + 7;
const int Mod = 1e9 + 7;
const int INF = 1e9;
const ll BASE = 137;
const int szBL = 320;
int n, m, Q;
vector<int> ke[N];
pii qr[N];
int high[N], nC[N], pa[N], time_dfs;
int ein[N], Head[N];
int num_Ver = 0;
vector<int> ke2[N << 3];
int num[N << 3], low[N << 3 ], del[N << 3], time_dfs2 = 0;///aware
stack<int> st;
bool Ans;
//pii rr[N << 3];
struct Segment_Tree_st {
int m;
int st[N << 2], lab[N << 2];
void build (int id, int l, int r, int typ) {
++num_Ver;
lab[id] = num_Ver;
// cout << l <<","<<r<<","<<typ<<" "<<num_Ver<<"\n";
if (l == r) {
return;
}
int mid = l + r >> 1;
build (id << 1, l, mid, typ);
build (id << 1 | 1, mid + 1, r, typ);
if (typ == 0)
ke2[lab[id << 1]].pb(lab[id]), ke2[lab[id << 1 | 1]].pb(lab[id]);
else
ke2[lab[id]].pb(lab[id << 1]), ke2[lab[id]].pb(lab[id << 1 | 1]);
}
int get (int id, int l, int r, int pos) {
if (l > pos || r < pos) return -1;
if (l == r) return lab[id];
int mid = l + r >> 1;
return max(get (id << 1, l, mid, pos), get (id << 1 | 1, mid + 1, r, pos));
}
void add_edge (int id, int l, int r, int u, int v, int clab, int typ) {
if (l > v || r < u) return;
if (l >= u && r <= v) {
if (typ == 0) {
ke2[lab[id]].pb(clab);
// cout << lab[id]<< " "<<clab<<" b\n";
}
else {
ke2[clab].pb(lab[id]);
// cout << clab<<" "<<lab[id]<<" c\n";
}
return;
}
int mid = l + r >> 1;
add_edge (id << 1, l, mid, u, v, clab, typ);
add_edge (id << 1 | 1, mid + 1, r, u, v, clab, typ);
}
void add_edge1 (int u, int v, int clab, int st, int ed, int typ) {
if (typ == 0) {
if (u == ein[st]) ++u;
if (v == ein[st]) --v;
}
else {
if (u == ein[ed]) ++u;
if (v == ein[ed]) --v;
}
// cout << u <<" "<<v<<" "<<ein[st]<<" "<<typ<<" hihi\n";
add_edge (1, 1, m, u, v, clab, typ);
}
int get (int pos) {
return get (1, 1, m, pos);
}
void init (int n, int typ) {
m = n;
build (1, 1, m, typ);
}
}STs, STe;
void pdfs (int u, int p) {
high[u] = high[p] + 1;
pa[u] = p;
nC[u] = 1;
iter (&v, ke[u]) if (v != p) {
pdfs (v, u);
nC[u] += nC[v];
}
}
void hld (int u, int p) {
ein[u] = ++time_dfs;
Head[u] = p;
int mxV = -1;
iter (&v, ke[u]) if (v != pa[u] && (mxV == -1 || nC[v] > nC[mxV])) mxV = v;
if (mxV != -1) hld(mxV, p);
iter (&v, ke[u]) {
if (v == pa[u] || v == mxV) continue;
hld(v, v);
}
}
void query (int st, int ed) {
int u = st, v = ed, labs = STs.get(ein[st]), labe = STe.get(ein[ed]);
ke2[labe].pb(labs);
// cout << labe << " "<<labs<<" a\n";
// return;
for (; Head[u] != Head[v]; v = pa[Head[v]]) {
if (high[Head[u]] > high[Head[v]]) swap(u, v);
STs.add_edge1 (ein[Head[v]], ein[v], labe, st, ed, 0);
STe.add_edge1 (ein[Head[v]], ein[v], labs, st, ed, 1);
}
if (high[u] > high[v]) swap(u, v);
STs.add_edge1 (ein[u], ein[v], labe, st, ed, 0);
STe.add_edge1 (ein[u], ein[v], labs, st, ed, 1);
}
void dfs (int u) {
num[u] = low[u] = ++time_dfs2;
st.push(u);
iter (&v, ke2[u]) {
if (del[v]) continue;
if (!num[v]) {
dfs(v);
low[u] = min(low[u], low[v]);
}
else low[u] = min(low[u], num[v]);
}
if (num[u] == low[u]) {
int v;
int num_del = 0;
do {
v = st.top();
st.pop();
del[v] = 1;
// cout << v<<"\n";
++num_del;
}while (v != u);
if (num_del > 1) {
Ans = 0;
// exit(0);
}
}
}
void solution () {
rep (i, 1, num_Ver) vector<int> ().swap(ke[i]), vector<int> ().swap(ke2[i]), num[i] = low[i] = del[i] = 0;
time_dfs = time_dfs2 = 0, Ans = 1, num_Ver = 0;
cin >> n;
rep (i, 1, n - 1) {
int u, v;
cin >> u >> v;
ke[u].pb(v);
ke[v].pb(u);
}
pdfs(1, 0);
hld (1, 1);
STs.init(n, 0);
STe.init(n, 1);
cin >> m;
rep (i, 1, m) {
cin >> qr[i].fs >> qr[i].se;
query (qr[i].fs, qr[i].se);
}
rep (i, 1, m) {
}
// cout << num_Ver<<"\n";
rep (i, 1, num_Ver) {
// cout << i <<" "<<SZ(ke2[i])<<"\n";
// iter (&v, ke2[i]) cout <<i<<" "<<v<<"\n";
if (!num[i]) dfs(i);
}
if (Ans) cout << "Yes\n";
else cout << "No\n";
}
#define file(name) freopen(name".inp","r",stdin); \
freopen(name".out","w",stdout);
int main () {
// file("c");
ios_base :: sync_with_stdio(false); cin.tie(0); cout.tie(0);
int num_Test = 1;
cin >> num_Test;
while (num_Test--)
solution();
}
/*
no bug challenge +4
mình có muốn dùng mảng này không?
4 5
1 3
4 1
1 2
3 2
2 1
return->break
*/
Compilation message
jail.cpp: In member function 'void Segment_Tree_st::build(int, int, int, int)':
jail.cpp:57:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
57 | int mid = l + r >> 1;
| ~~^~~
jail.cpp: In member function 'int Segment_Tree_st::get(int, int, int, int)':
jail.cpp:69:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
69 | int mid = l + r >> 1;
| ~~^~~
jail.cpp: In member function 'void Segment_Tree_st::add_edge(int, int, int, int, int, int, int)':
jail.cpp:86:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
86 | int mid = l + r >> 1;
| ~~^~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
43352 KB |
Output is correct |
2 |
Correct |
15 ms |
43352 KB |
Output is correct |
3 |
Correct |
14 ms |
43356 KB |
Output is correct |
4 |
Correct |
37 ms |
43352 KB |
Output is correct |
5 |
Correct |
46 ms |
43356 KB |
Output is correct |
6 |
Correct |
16 ms |
43356 KB |
Output is correct |
7 |
Correct |
15 ms |
43608 KB |
Output is correct |
8 |
Correct |
17 ms |
43612 KB |
Output is correct |
9 |
Correct |
65 ms |
45232 KB |
Output is correct |
10 |
Correct |
73 ms |
76116 KB |
Output is correct |
11 |
Correct |
22 ms |
43612 KB |
Output is correct |
12 |
Correct |
78 ms |
44428 KB |
Output is correct |
13 |
Correct |
115 ms |
82256 KB |
Output is correct |
14 |
Correct |
118 ms |
83536 KB |
Output is correct |
15 |
Correct |
251 ms |
95568 KB |
Output is correct |
16 |
Correct |
439 ms |
124012 KB |
Output is correct |
17 |
Correct |
155 ms |
90272 KB |
Output is correct |
18 |
Correct |
130 ms |
83540 KB |
Output is correct |
19 |
Correct |
150 ms |
88504 KB |
Output is correct |
20 |
Correct |
140 ms |
88656 KB |
Output is correct |
21 |
Correct |
168 ms |
90964 KB |
Output is correct |
22 |
Correct |
98 ms |
82008 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
43356 KB |
Output is correct |
2 |
Correct |
14 ms |
43316 KB |
Output is correct |
3 |
Correct |
15 ms |
43356 KB |
Output is correct |
4 |
Correct |
19 ms |
43356 KB |
Output is correct |
5 |
Correct |
16 ms |
43352 KB |
Output is correct |
6 |
Correct |
14 ms |
43356 KB |
Output is correct |
7 |
Correct |
14 ms |
43460 KB |
Output is correct |
8 |
Correct |
14 ms |
43356 KB |
Output is correct |
9 |
Correct |
15 ms |
43504 KB |
Output is correct |
10 |
Correct |
14 ms |
43356 KB |
Output is correct |
11 |
Correct |
16 ms |
43356 KB |
Output is correct |
12 |
Correct |
15 ms |
43468 KB |
Output is correct |
13 |
Correct |
16 ms |
43592 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
43356 KB |
Output is correct |
2 |
Correct |
14 ms |
43316 KB |
Output is correct |
3 |
Correct |
15 ms |
43356 KB |
Output is correct |
4 |
Correct |
19 ms |
43356 KB |
Output is correct |
5 |
Correct |
16 ms |
43352 KB |
Output is correct |
6 |
Correct |
14 ms |
43356 KB |
Output is correct |
7 |
Correct |
14 ms |
43460 KB |
Output is correct |
8 |
Correct |
14 ms |
43356 KB |
Output is correct |
9 |
Correct |
15 ms |
43504 KB |
Output is correct |
10 |
Correct |
14 ms |
43356 KB |
Output is correct |
11 |
Correct |
16 ms |
43356 KB |
Output is correct |
12 |
Correct |
15 ms |
43468 KB |
Output is correct |
13 |
Correct |
16 ms |
43592 KB |
Output is correct |
14 |
Correct |
16 ms |
43356 KB |
Output is correct |
15 |
Correct |
14 ms |
43528 KB |
Output is correct |
16 |
Correct |
19 ms |
43612 KB |
Output is correct |
17 |
Correct |
15 ms |
43356 KB |
Output is correct |
18 |
Correct |
17 ms |
43532 KB |
Output is correct |
19 |
Correct |
16 ms |
43608 KB |
Output is correct |
20 |
Correct |
15 ms |
43356 KB |
Output is correct |
21 |
Correct |
16 ms |
43420 KB |
Output is correct |
22 |
Correct |
18 ms |
43352 KB |
Output is correct |
23 |
Correct |
15 ms |
43344 KB |
Output is correct |
24 |
Correct |
13 ms |
43356 KB |
Output is correct |
25 |
Correct |
15 ms |
43356 KB |
Output is correct |
26 |
Correct |
15 ms |
43532 KB |
Output is correct |
27 |
Correct |
17 ms |
43352 KB |
Output is correct |
28 |
Correct |
17 ms |
43356 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
43356 KB |
Output is correct |
2 |
Correct |
14 ms |
43316 KB |
Output is correct |
3 |
Correct |
15 ms |
43356 KB |
Output is correct |
4 |
Correct |
19 ms |
43356 KB |
Output is correct |
5 |
Correct |
16 ms |
43352 KB |
Output is correct |
6 |
Correct |
14 ms |
43356 KB |
Output is correct |
7 |
Correct |
14 ms |
43460 KB |
Output is correct |
8 |
Correct |
14 ms |
43356 KB |
Output is correct |
9 |
Correct |
15 ms |
43504 KB |
Output is correct |
10 |
Correct |
14 ms |
43356 KB |
Output is correct |
11 |
Correct |
16 ms |
43356 KB |
Output is correct |
12 |
Correct |
15 ms |
43468 KB |
Output is correct |
13 |
Correct |
16 ms |
43592 KB |
Output is correct |
14 |
Correct |
16 ms |
43356 KB |
Output is correct |
15 |
Correct |
14 ms |
43528 KB |
Output is correct |
16 |
Correct |
19 ms |
43612 KB |
Output is correct |
17 |
Correct |
15 ms |
43356 KB |
Output is correct |
18 |
Correct |
17 ms |
43532 KB |
Output is correct |
19 |
Correct |
16 ms |
43608 KB |
Output is correct |
20 |
Correct |
15 ms |
43356 KB |
Output is correct |
21 |
Correct |
16 ms |
43420 KB |
Output is correct |
22 |
Correct |
18 ms |
43352 KB |
Output is correct |
23 |
Correct |
15 ms |
43344 KB |
Output is correct |
24 |
Correct |
13 ms |
43356 KB |
Output is correct |
25 |
Correct |
15 ms |
43356 KB |
Output is correct |
26 |
Correct |
15 ms |
43532 KB |
Output is correct |
27 |
Correct |
17 ms |
43352 KB |
Output is correct |
28 |
Correct |
17 ms |
43356 KB |
Output is correct |
29 |
Correct |
16 ms |
43612 KB |
Output is correct |
30 |
Correct |
17 ms |
43608 KB |
Output is correct |
31 |
Correct |
16 ms |
43460 KB |
Output is correct |
32 |
Correct |
17 ms |
43356 KB |
Output is correct |
33 |
Correct |
16 ms |
43356 KB |
Output is correct |
34 |
Correct |
18 ms |
43556 KB |
Output is correct |
35 |
Correct |
17 ms |
43356 KB |
Output is correct |
36 |
Correct |
15 ms |
43612 KB |
Output is correct |
37 |
Correct |
15 ms |
43588 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
43356 KB |
Output is correct |
2 |
Correct |
14 ms |
43316 KB |
Output is correct |
3 |
Correct |
15 ms |
43356 KB |
Output is correct |
4 |
Correct |
19 ms |
43356 KB |
Output is correct |
5 |
Correct |
16 ms |
43352 KB |
Output is correct |
6 |
Correct |
14 ms |
43356 KB |
Output is correct |
7 |
Correct |
14 ms |
43460 KB |
Output is correct |
8 |
Correct |
14 ms |
43356 KB |
Output is correct |
9 |
Correct |
15 ms |
43504 KB |
Output is correct |
10 |
Correct |
14 ms |
43356 KB |
Output is correct |
11 |
Correct |
16 ms |
43356 KB |
Output is correct |
12 |
Correct |
15 ms |
43468 KB |
Output is correct |
13 |
Correct |
16 ms |
43592 KB |
Output is correct |
14 |
Correct |
16 ms |
43356 KB |
Output is correct |
15 |
Correct |
14 ms |
43528 KB |
Output is correct |
16 |
Correct |
19 ms |
43612 KB |
Output is correct |
17 |
Correct |
15 ms |
43356 KB |
Output is correct |
18 |
Correct |
17 ms |
43532 KB |
Output is correct |
19 |
Correct |
16 ms |
43608 KB |
Output is correct |
20 |
Correct |
15 ms |
43356 KB |
Output is correct |
21 |
Correct |
16 ms |
43420 KB |
Output is correct |
22 |
Correct |
18 ms |
43352 KB |
Output is correct |
23 |
Correct |
15 ms |
43344 KB |
Output is correct |
24 |
Correct |
13 ms |
43356 KB |
Output is correct |
25 |
Correct |
15 ms |
43356 KB |
Output is correct |
26 |
Correct |
15 ms |
43532 KB |
Output is correct |
27 |
Correct |
17 ms |
43352 KB |
Output is correct |
28 |
Correct |
17 ms |
43356 KB |
Output is correct |
29 |
Correct |
16 ms |
43612 KB |
Output is correct |
30 |
Correct |
17 ms |
43608 KB |
Output is correct |
31 |
Correct |
16 ms |
43460 KB |
Output is correct |
32 |
Correct |
17 ms |
43356 KB |
Output is correct |
33 |
Correct |
16 ms |
43356 KB |
Output is correct |
34 |
Correct |
18 ms |
43556 KB |
Output is correct |
35 |
Correct |
17 ms |
43356 KB |
Output is correct |
36 |
Correct |
15 ms |
43612 KB |
Output is correct |
37 |
Correct |
15 ms |
43588 KB |
Output is correct |
38 |
Correct |
74 ms |
45392 KB |
Output is correct |
39 |
Correct |
70 ms |
76108 KB |
Output is correct |
40 |
Correct |
79 ms |
46160 KB |
Output is correct |
41 |
Correct |
81 ms |
45908 KB |
Output is correct |
42 |
Correct |
68 ms |
45908 KB |
Output is correct |
43 |
Correct |
64 ms |
46080 KB |
Output is correct |
44 |
Correct |
33 ms |
44040 KB |
Output is correct |
45 |
Correct |
80 ms |
69988 KB |
Output is correct |
46 |
Correct |
87 ms |
69972 KB |
Output is correct |
47 |
Correct |
88 ms |
73812 KB |
Output is correct |
48 |
Correct |
74 ms |
73808 KB |
Output is correct |
49 |
Correct |
75 ms |
70224 KB |
Output is correct |
50 |
Correct |
90 ms |
70184 KB |
Output is correct |
51 |
Correct |
73 ms |
71252 KB |
Output is correct |
52 |
Correct |
68 ms |
71200 KB |
Output is correct |
53 |
Correct |
31 ms |
45656 KB |
Output is correct |
54 |
Correct |
84 ms |
69968 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
43356 KB |
Output is correct |
2 |
Correct |
12 ms |
43356 KB |
Output is correct |
3 |
Correct |
14 ms |
43352 KB |
Output is correct |
4 |
Correct |
15 ms |
43536 KB |
Output is correct |
5 |
Correct |
22 ms |
43548 KB |
Output is correct |
6 |
Correct |
15 ms |
43356 KB |
Output is correct |
7 |
Correct |
14 ms |
43356 KB |
Output is correct |
8 |
Correct |
14 ms |
43356 KB |
Output is correct |
9 |
Correct |
14 ms |
43468 KB |
Output is correct |
10 |
Correct |
14 ms |
43356 KB |
Output is correct |
11 |
Correct |
13 ms |
43544 KB |
Output is correct |
12 |
Correct |
16 ms |
43356 KB |
Output is correct |
13 |
Correct |
51 ms |
43568 KB |
Output is correct |
14 |
Correct |
73 ms |
43352 KB |
Output is correct |
15 |
Correct |
59 ms |
43352 KB |
Output is correct |
16 |
Correct |
128 ms |
70176 KB |
Output is correct |
17 |
Correct |
336 ms |
84560 KB |
Output is correct |
18 |
Correct |
594 ms |
107208 KB |
Output is correct |
19 |
Correct |
167 ms |
73300 KB |
Output is correct |
20 |
Correct |
172 ms |
73192 KB |
Output is correct |
21 |
Correct |
192 ms |
73296 KB |
Output is correct |
22 |
Correct |
329 ms |
80848 KB |
Output is correct |
23 |
Correct |
220 ms |
79992 KB |
Output is correct |
24 |
Correct |
256 ms |
79720 KB |
Output is correct |
25 |
Correct |
229 ms |
79568 KB |
Output is correct |
26 |
Correct |
238 ms |
79920 KB |
Output is correct |
27 |
Correct |
277 ms |
82116 KB |
Output is correct |
28 |
Correct |
309 ms |
96612 KB |
Output is correct |
29 |
Correct |
290 ms |
86216 KB |
Output is correct |
30 |
Correct |
222 ms |
80096 KB |
Output is correct |
31 |
Correct |
207 ms |
85456 KB |
Output is correct |
32 |
Correct |
212 ms |
80332 KB |
Output is correct |
33 |
Correct |
212 ms |
85964 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
43352 KB |
Output is correct |
2 |
Correct |
15 ms |
43352 KB |
Output is correct |
3 |
Correct |
14 ms |
43356 KB |
Output is correct |
4 |
Correct |
37 ms |
43352 KB |
Output is correct |
5 |
Correct |
46 ms |
43356 KB |
Output is correct |
6 |
Correct |
16 ms |
43356 KB |
Output is correct |
7 |
Correct |
15 ms |
43608 KB |
Output is correct |
8 |
Correct |
17 ms |
43612 KB |
Output is correct |
9 |
Correct |
65 ms |
45232 KB |
Output is correct |
10 |
Correct |
73 ms |
76116 KB |
Output is correct |
11 |
Correct |
22 ms |
43612 KB |
Output is correct |
12 |
Correct |
78 ms |
44428 KB |
Output is correct |
13 |
Correct |
115 ms |
82256 KB |
Output is correct |
14 |
Correct |
118 ms |
83536 KB |
Output is correct |
15 |
Correct |
251 ms |
95568 KB |
Output is correct |
16 |
Correct |
439 ms |
124012 KB |
Output is correct |
17 |
Correct |
155 ms |
90272 KB |
Output is correct |
18 |
Correct |
130 ms |
83540 KB |
Output is correct |
19 |
Correct |
150 ms |
88504 KB |
Output is correct |
20 |
Correct |
140 ms |
88656 KB |
Output is correct |
21 |
Correct |
168 ms |
90964 KB |
Output is correct |
22 |
Correct |
98 ms |
82008 KB |
Output is correct |
23 |
Correct |
14 ms |
43356 KB |
Output is correct |
24 |
Correct |
14 ms |
43316 KB |
Output is correct |
25 |
Correct |
15 ms |
43356 KB |
Output is correct |
26 |
Correct |
19 ms |
43356 KB |
Output is correct |
27 |
Correct |
16 ms |
43352 KB |
Output is correct |
28 |
Correct |
14 ms |
43356 KB |
Output is correct |
29 |
Correct |
14 ms |
43460 KB |
Output is correct |
30 |
Correct |
14 ms |
43356 KB |
Output is correct |
31 |
Correct |
15 ms |
43504 KB |
Output is correct |
32 |
Correct |
14 ms |
43356 KB |
Output is correct |
33 |
Correct |
16 ms |
43356 KB |
Output is correct |
34 |
Correct |
15 ms |
43468 KB |
Output is correct |
35 |
Correct |
16 ms |
43592 KB |
Output is correct |
36 |
Correct |
16 ms |
43356 KB |
Output is correct |
37 |
Correct |
14 ms |
43528 KB |
Output is correct |
38 |
Correct |
19 ms |
43612 KB |
Output is correct |
39 |
Correct |
15 ms |
43356 KB |
Output is correct |
40 |
Correct |
17 ms |
43532 KB |
Output is correct |
41 |
Correct |
16 ms |
43608 KB |
Output is correct |
42 |
Correct |
15 ms |
43356 KB |
Output is correct |
43 |
Correct |
16 ms |
43420 KB |
Output is correct |
44 |
Correct |
18 ms |
43352 KB |
Output is correct |
45 |
Correct |
15 ms |
43344 KB |
Output is correct |
46 |
Correct |
13 ms |
43356 KB |
Output is correct |
47 |
Correct |
15 ms |
43356 KB |
Output is correct |
48 |
Correct |
15 ms |
43532 KB |
Output is correct |
49 |
Correct |
17 ms |
43352 KB |
Output is correct |
50 |
Correct |
17 ms |
43356 KB |
Output is correct |
51 |
Correct |
16 ms |
43612 KB |
Output is correct |
52 |
Correct |
17 ms |
43608 KB |
Output is correct |
53 |
Correct |
16 ms |
43460 KB |
Output is correct |
54 |
Correct |
17 ms |
43356 KB |
Output is correct |
55 |
Correct |
16 ms |
43356 KB |
Output is correct |
56 |
Correct |
18 ms |
43556 KB |
Output is correct |
57 |
Correct |
17 ms |
43356 KB |
Output is correct |
58 |
Correct |
15 ms |
43612 KB |
Output is correct |
59 |
Correct |
15 ms |
43588 KB |
Output is correct |
60 |
Correct |
74 ms |
45392 KB |
Output is correct |
61 |
Correct |
70 ms |
76108 KB |
Output is correct |
62 |
Correct |
79 ms |
46160 KB |
Output is correct |
63 |
Correct |
81 ms |
45908 KB |
Output is correct |
64 |
Correct |
68 ms |
45908 KB |
Output is correct |
65 |
Correct |
64 ms |
46080 KB |
Output is correct |
66 |
Correct |
33 ms |
44040 KB |
Output is correct |
67 |
Correct |
80 ms |
69988 KB |
Output is correct |
68 |
Correct |
87 ms |
69972 KB |
Output is correct |
69 |
Correct |
88 ms |
73812 KB |
Output is correct |
70 |
Correct |
74 ms |
73808 KB |
Output is correct |
71 |
Correct |
75 ms |
70224 KB |
Output is correct |
72 |
Correct |
90 ms |
70184 KB |
Output is correct |
73 |
Correct |
73 ms |
71252 KB |
Output is correct |
74 |
Correct |
68 ms |
71200 KB |
Output is correct |
75 |
Correct |
31 ms |
45656 KB |
Output is correct |
76 |
Correct |
84 ms |
69968 KB |
Output is correct |
77 |
Correct |
14 ms |
43356 KB |
Output is correct |
78 |
Correct |
12 ms |
43356 KB |
Output is correct |
79 |
Correct |
14 ms |
43352 KB |
Output is correct |
80 |
Correct |
15 ms |
43536 KB |
Output is correct |
81 |
Correct |
22 ms |
43548 KB |
Output is correct |
82 |
Correct |
15 ms |
43356 KB |
Output is correct |
83 |
Correct |
14 ms |
43356 KB |
Output is correct |
84 |
Correct |
14 ms |
43356 KB |
Output is correct |
85 |
Correct |
14 ms |
43468 KB |
Output is correct |
86 |
Correct |
14 ms |
43356 KB |
Output is correct |
87 |
Correct |
13 ms |
43544 KB |
Output is correct |
88 |
Correct |
16 ms |
43356 KB |
Output is correct |
89 |
Correct |
51 ms |
43568 KB |
Output is correct |
90 |
Correct |
73 ms |
43352 KB |
Output is correct |
91 |
Correct |
59 ms |
43352 KB |
Output is correct |
92 |
Correct |
128 ms |
70176 KB |
Output is correct |
93 |
Correct |
336 ms |
84560 KB |
Output is correct |
94 |
Correct |
594 ms |
107208 KB |
Output is correct |
95 |
Correct |
167 ms |
73300 KB |
Output is correct |
96 |
Correct |
172 ms |
73192 KB |
Output is correct |
97 |
Correct |
192 ms |
73296 KB |
Output is correct |
98 |
Correct |
329 ms |
80848 KB |
Output is correct |
99 |
Correct |
220 ms |
79992 KB |
Output is correct |
100 |
Correct |
256 ms |
79720 KB |
Output is correct |
101 |
Correct |
229 ms |
79568 KB |
Output is correct |
102 |
Correct |
238 ms |
79920 KB |
Output is correct |
103 |
Correct |
277 ms |
82116 KB |
Output is correct |
104 |
Correct |
309 ms |
96612 KB |
Output is correct |
105 |
Correct |
290 ms |
86216 KB |
Output is correct |
106 |
Correct |
222 ms |
80096 KB |
Output is correct |
107 |
Correct |
207 ms |
85456 KB |
Output is correct |
108 |
Correct |
212 ms |
80332 KB |
Output is correct |
109 |
Correct |
212 ms |
85964 KB |
Output is correct |
110 |
Correct |
76 ms |
44332 KB |
Output is correct |
111 |
Correct |
48 ms |
44124 KB |
Output is correct |
112 |
Correct |
276 ms |
95316 KB |
Output is correct |
113 |
Correct |
155 ms |
77648 KB |
Output is correct |
114 |
Correct |
235 ms |
84684 KB |
Output is correct |
115 |
Correct |
75 ms |
70088 KB |
Output is correct |
116 |
Correct |
170 ms |
73296 KB |
Output is correct |
117 |
Correct |
835 ms |
119236 KB |
Output is correct |
118 |
Correct |
89 ms |
70224 KB |
Output is correct |
119 |
Correct |
91 ms |
70228 KB |
Output is correct |
120 |
Correct |
27 ms |
46168 KB |
Output is correct |
121 |
Correct |
237 ms |
74916 KB |
Output is correct |
122 |
Correct |
218 ms |
74936 KB |
Output is correct |
123 |
Correct |
152 ms |
79696 KB |
Output is correct |
124 |
Correct |
165 ms |
79956 KB |
Output is correct |
125 |
Correct |
163 ms |
80468 KB |
Output is correct |
126 |
Correct |
460 ms |
120660 KB |
Output is correct |
127 |
Correct |
243 ms |
93480 KB |
Output is correct |
128 |
Correct |
182 ms |
91812 KB |
Output is correct |
129 |
Correct |
186 ms |
89896 KB |
Output is correct |
130 |
Correct |
188 ms |
91404 KB |
Output is correct |