#define DEBUG 0
#include <bits/stdc++.h>
using namespace std;
#if DEBUG
// basic debugging macros
int __i__,__j__;
#define printLine(l) for(__i__=0;__i__<l;__i__++){cout<<"-";}cout<<endl
#define printLine2(l,c) for(__i__=0;__i__<l;__i__++){cout<<c;}cout<<endl
#define printVar(n) cout<<#n<<": "<<n<<endl
#define printArr(a,l) cout<<#a<<": ";for(__i__=0;__i__<l;__i__++){cout<<a[__i__]<<" ";}cout<<endl
#define print2dArr(a,r,c) cout<<#a<<":\n";for(__i__=0;__i__<r;__i__++){for(__j__=0;__j__<c;__j__++){cout<<a[__i__][__j__]<<" ";}cout<<endl;}
#define print2dArr2(a,r,c,l) cout<<#a<<":\n";for(__i__=0;__i__<r;__i__++){for(__j__=0;__j__<c;__j__++){cout<<setw(l)<<setfill(' ')<<a[__i__][__j__]<<" ";}cout<<endl;}
// advanced debugging class
// debug 1,2,'A',"test";
class _Debug {
public:
template<typename T>
_Debug& operator,(T val) {
cout << val << endl;
return *this;
}
};
#define debug _Debug(),
#else
#define printLine(l)
#define printLine2(l,c)
#define printVar(n)
#define printArr(a,l)
#define print2dArr(a,r,c)
#define print2dArr2(a,r,c,l)
#define debug
#endif
// define
#define MAX_VAL 999999999
#define MAX_VAL_2 999999999999999999LL
#define EPS 1e-6
#define mp make_pair
#define pb push_back
// typedef
typedef unsigned int UI;
typedef long long int LLI;
typedef unsigned long long int ULLI;
typedef unsigned short int US;
typedef pair<int,int> pii;
typedef pair<LLI,LLI> plli;
typedef vector<int> vi;
typedef vector<LLI> vlli;
typedef vector<pii> vpii;
typedef vector<plli> vplli;
// ---------- END OF TEMPLATE ----------
int S[120000],T[120000];
vi adjList[120000];
vi adjList2[2500000];
int parent[120000][17],depth[120000],disc[120000],fin[120000],num = 0,siz[120000],heavy[120000];
int chain[120000],head[120000],csize[120000],c = 0;
int doDFS(int u,int p,int d) {
parent[u][0] = p,depth[u] = d,siz[u] = 1,heavy[u] = -1;
for (int v: adjList[u]) {
if (v != p) {
doDFS(v,u,d+1);
siz[u] += siz[v];
if ((heavy[u] == -1) || (siz[heavy[u]] < siz[v])) heavy[u] = v;
}
}
return 0;
}
int doHLD(int u,int p) {
chain[u] = c,disc[u] = num++;
if (csize[c] == 0) head[c] = u;
csize[c]++;
if (heavy[u] != -1) doHLD(heavy[u],u);
for (int v: adjList[u]) {
if ((v != p) && (v != heavy[u])) c++,doHLD(v,u);
}
fin[u] = num;
return 0;
}
int logn;
int lca(int u,int v) {
int i;
if (depth[u] < depth[v]) swap(u,v);
for (i = logn-1; i >= 0; i--) {
if ((parent[u][i] != -1) && (depth[parent[u][i]] >= depth[v])) u = parent[u][i];
}
if (u == v) return u;
for (i = logn-1; i >= 0; i--) {
if (parent[u][i] != parent[v][i]) u = parent[u][i],v = parent[v][i];
}
return parent[u][0];
}
int anc(int u,int v) {
return ((disc[v] >= disc[u]) && (disc[v] < fin[u]));
}
int onPath(int u,int v,int w,int l) {
if (!anc(l,w)) return 0;
return anc(w,u) || anc(w,v);
}
vi tree1[1 << 18],tree2[1 << 18];
int node1[1 << 18],node2[1 << 18];
int update(int s,int e,int ai,int i,int u,int t) {
if ((s > ai) || (e < ai)) return 0;
else if (s == e) {
if (t == 1) tree1[i].pb(u);
else tree2[i].pb(u);
return 0;
}
int mid = (s+e) / 2;
update(s,mid,ai,2*i+1,u,t),update(mid+1,e,ai,2*i+2,u,t);
if (t == 1) tree1[i].pb(u);
else tree2[i].pb(u);
return 0;
}
int build(int s,int e,int i) {
if (s == e) {
node1[i] = num++;
for (int u: tree1[i]) adjList2[u].pb(node1[i]);
node2[i] = num++;
for (int u: tree2[i]) adjList2[node2[i]].pb(u);
return 0;
}
int mid = (s+e) / 2;
build(s,mid,2*i+1),build(mid+1,e,2*i+2);
node1[i] = num++;
for (int u: tree1[i]) adjList2[u].pb(node1[i]);
node2[i] = num++;
for (int u: tree2[i]) adjList2[node2[i]].pb(u);
return 0;
}
int add(int s,int e,int as,int ae,int i,int u,int t) {
if ((s > ae) || (e < as)) return 0;
else if ((s >= as) && (e <= ae)) {
if (t == 1) adjList2[node1[i]].pb(u);
else adjList2[u].pb(node2[i]);
return 0;
}
int mid = (s+e) / 2;
add(s,mid,as,ae,2*i+1,u,t),add(mid+1,e,as,ae,2*i+2,u,t);
return 0;
}
int clear(int s,int e,int i) {
if (s == e) {
tree1[i].clear(),tree2[i].clear();
return 0;
}
int mid = (s+e) / 2;
clear(s,mid,2*i+1),clear(mid+1,e,2*i+2);
tree1[i].clear(),tree2[i].clear();
return 0;
}
int visited[2500000],no = 0;
int doDFS2(int u) {
if (visited[u] != 0) {
if (visited[u] == 1) no = 1;
return 0;
}
visited[u] = 1;
for (int v: adjList2[u]) doDFS2(v);
visited[u] = 2;
return 0;
}
int main() {
int i,j;
int Q,N,M,A,B;
scanf("%d",&Q);
while (Q--) {
scanf("%d",&N);
for (i = 0; i < N-1; i++) {
scanf("%d %d",&A,&B);
A--,B--;
adjList[A].pb(B);
adjList[B].pb(A);
}
scanf("%d",&M);
for (i = 0; i < M; i++) scanf("%d %d",&S[i],&T[i]),S[i]--,T[i]--;
num = 0,doDFS(0,-1,0);
doHLD(0,-1),c++;
for (i = 1; (1 << i) < N; i++) {
for (j = 0; j < N; j++) {
if (parent[j][i-1] != -1) parent[j][i] = parent[parent[j][i-1]][i-1];
else parent[j][i] = -1;
}
}
logn = i;
num = M;
for (i = 0; i < M; i++) {
update(0,N-1,disc[S[i]],0,i,1);
update(0,N-1,disc[T[i]],0,i,2);
}
build(0,N-1,0);
for (i = 0; i < M; i++) {
int l = lca(S[i],T[i]);
for (int o: {S[i],T[i]}) {
int u = o;
while (chain[u] != chain[l]) {
int s = disc[head[chain[u]]],e = disc[u];
if (disc[S[i]] == s) s++;
if (disc[S[i]] == e) e--;
if (s <= e) add(0,N-1,s,e,0,i,1);
s = disc[head[chain[u]]],e = disc[u];
if (disc[T[i]] == s) s++;
if (disc[T[i]] == e) e--;
if (s <= e) add(0,N-1,s,e,0,i,2);
add(0,N-1,s,e,0,i,2);
u = parent[head[chain[u]]][0];
}
int s = disc[l],e = disc[u];
if (disc[S[i]] == s) s++;
if (disc[S[i]] == e) e--;
if (s <= e) add(0,N-1,s,e,0,i,1);
s = disc[l],e = disc[u];
if (disc[T[i]] == s) s++;
if (disc[T[i]] == e) e--;
if (s <= e) add(0,N-1,s,e,0,i,2);
}
}
fill(visited,visited+num,0),no = 0;
for (i = 0; i < num; i++) {
if (visited[i] == 0) doDFS2(i);
}
if (no) printf("No\n");
else printf("Yes\n");
clear(0,N-1,0);
for (i = 0; i < N; i++) adjList[i].clear();
for (i = 0; i < num; i++) adjList2[i].clear();
}
return 0;
}
Compilation message
jail.cpp: In function 'int main()':
jail.cpp:176:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
176 | scanf("%d",&Q);
| ~~~~~^~~~~~~~~
jail.cpp:178:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
178 | scanf("%d",&N);
| ~~~~~^~~~~~~~~
jail.cpp:180:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
180 | scanf("%d %d",&A,&B);
| ~~~~~^~~~~~~~~~~~~~~
jail.cpp:185:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
185 | scanf("%d",&M);
| ~~~~~^~~~~~~~~
jail.cpp:186:38: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
186 | for (i = 0; i < M; i++) scanf("%d %d",&S[i],&T[i]),S[i]--,T[i]--;
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
34 ms |
74108 KB |
Output is correct |
2 |
Correct |
35 ms |
74156 KB |
Output is correct |
3 |
Correct |
34 ms |
74192 KB |
Output is correct |
4 |
Correct |
49 ms |
74244 KB |
Output is correct |
5 |
Correct |
67 ms |
74268 KB |
Output is correct |
6 |
Correct |
36 ms |
74188 KB |
Output is correct |
7 |
Correct |
37 ms |
74300 KB |
Output is correct |
8 |
Correct |
39 ms |
74344 KB |
Output is correct |
9 |
Correct |
89 ms |
77068 KB |
Output is correct |
10 |
Correct |
96 ms |
102312 KB |
Output is correct |
11 |
Correct |
48 ms |
74316 KB |
Output is correct |
12 |
Correct |
101 ms |
74284 KB |
Output is correct |
13 |
Correct |
298 ms |
139424 KB |
Output is correct |
14 |
Correct |
309 ms |
139612 KB |
Output is correct |
15 |
Correct |
594 ms |
144112 KB |
Output is correct |
16 |
Correct |
1295 ms |
189392 KB |
Output is correct |
17 |
Correct |
324 ms |
147020 KB |
Output is correct |
18 |
Correct |
433 ms |
167960 KB |
Output is correct |
19 |
Correct |
319 ms |
144212 KB |
Output is correct |
20 |
Correct |
324 ms |
144336 KB |
Output is correct |
21 |
Correct |
400 ms |
149528 KB |
Output is correct |
22 |
Correct |
288 ms |
140068 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
35 ms |
74196 KB |
Output is correct |
2 |
Correct |
35 ms |
74132 KB |
Output is correct |
3 |
Correct |
37 ms |
74180 KB |
Output is correct |
4 |
Correct |
38 ms |
74268 KB |
Output is correct |
5 |
Correct |
41 ms |
74140 KB |
Output is correct |
6 |
Correct |
38 ms |
74264 KB |
Output is correct |
7 |
Correct |
42 ms |
74216 KB |
Output is correct |
8 |
Correct |
36 ms |
74268 KB |
Output is correct |
9 |
Correct |
36 ms |
74232 KB |
Output is correct |
10 |
Correct |
37 ms |
74284 KB |
Output is correct |
11 |
Correct |
35 ms |
74196 KB |
Output is correct |
12 |
Correct |
37 ms |
74268 KB |
Output is correct |
13 |
Correct |
38 ms |
74140 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
35 ms |
74196 KB |
Output is correct |
2 |
Correct |
35 ms |
74132 KB |
Output is correct |
3 |
Correct |
37 ms |
74180 KB |
Output is correct |
4 |
Correct |
38 ms |
74268 KB |
Output is correct |
5 |
Correct |
41 ms |
74140 KB |
Output is correct |
6 |
Correct |
38 ms |
74264 KB |
Output is correct |
7 |
Correct |
42 ms |
74216 KB |
Output is correct |
8 |
Correct |
36 ms |
74268 KB |
Output is correct |
9 |
Correct |
36 ms |
74232 KB |
Output is correct |
10 |
Correct |
37 ms |
74284 KB |
Output is correct |
11 |
Correct |
35 ms |
74196 KB |
Output is correct |
12 |
Correct |
37 ms |
74268 KB |
Output is correct |
13 |
Correct |
38 ms |
74140 KB |
Output is correct |
14 |
Correct |
35 ms |
74136 KB |
Output is correct |
15 |
Correct |
38 ms |
74148 KB |
Output is correct |
16 |
Correct |
37 ms |
74268 KB |
Output is correct |
17 |
Correct |
39 ms |
74252 KB |
Output is correct |
18 |
Correct |
37 ms |
74292 KB |
Output is correct |
19 |
Correct |
36 ms |
74084 KB |
Output is correct |
20 |
Correct |
38 ms |
74296 KB |
Output is correct |
21 |
Correct |
37 ms |
74196 KB |
Output is correct |
22 |
Correct |
38 ms |
74208 KB |
Output is correct |
23 |
Correct |
37 ms |
74108 KB |
Output is correct |
24 |
Correct |
36 ms |
74328 KB |
Output is correct |
25 |
Correct |
40 ms |
74280 KB |
Output is correct |
26 |
Correct |
36 ms |
74260 KB |
Output is correct |
27 |
Correct |
38 ms |
74188 KB |
Output is correct |
28 |
Correct |
35 ms |
74164 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
35 ms |
74196 KB |
Output is correct |
2 |
Correct |
35 ms |
74132 KB |
Output is correct |
3 |
Correct |
37 ms |
74180 KB |
Output is correct |
4 |
Correct |
38 ms |
74268 KB |
Output is correct |
5 |
Correct |
41 ms |
74140 KB |
Output is correct |
6 |
Correct |
38 ms |
74264 KB |
Output is correct |
7 |
Correct |
42 ms |
74216 KB |
Output is correct |
8 |
Correct |
36 ms |
74268 KB |
Output is correct |
9 |
Correct |
36 ms |
74232 KB |
Output is correct |
10 |
Correct |
37 ms |
74284 KB |
Output is correct |
11 |
Correct |
35 ms |
74196 KB |
Output is correct |
12 |
Correct |
37 ms |
74268 KB |
Output is correct |
13 |
Correct |
38 ms |
74140 KB |
Output is correct |
14 |
Correct |
35 ms |
74136 KB |
Output is correct |
15 |
Correct |
38 ms |
74148 KB |
Output is correct |
16 |
Correct |
37 ms |
74268 KB |
Output is correct |
17 |
Correct |
39 ms |
74252 KB |
Output is correct |
18 |
Correct |
37 ms |
74292 KB |
Output is correct |
19 |
Correct |
36 ms |
74084 KB |
Output is correct |
20 |
Correct |
38 ms |
74296 KB |
Output is correct |
21 |
Correct |
37 ms |
74196 KB |
Output is correct |
22 |
Correct |
38 ms |
74208 KB |
Output is correct |
23 |
Correct |
37 ms |
74108 KB |
Output is correct |
24 |
Correct |
36 ms |
74328 KB |
Output is correct |
25 |
Correct |
40 ms |
74280 KB |
Output is correct |
26 |
Correct |
36 ms |
74260 KB |
Output is correct |
27 |
Correct |
38 ms |
74188 KB |
Output is correct |
28 |
Correct |
35 ms |
74164 KB |
Output is correct |
29 |
Correct |
40 ms |
74312 KB |
Output is correct |
30 |
Correct |
38 ms |
74380 KB |
Output is correct |
31 |
Correct |
39 ms |
74340 KB |
Output is correct |
32 |
Correct |
38 ms |
74264 KB |
Output is correct |
33 |
Correct |
39 ms |
74272 KB |
Output is correct |
34 |
Correct |
43 ms |
74204 KB |
Output is correct |
35 |
Correct |
48 ms |
74268 KB |
Output is correct |
36 |
Correct |
39 ms |
74260 KB |
Output is correct |
37 |
Correct |
37 ms |
74268 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
35 ms |
74196 KB |
Output is correct |
2 |
Correct |
35 ms |
74132 KB |
Output is correct |
3 |
Correct |
37 ms |
74180 KB |
Output is correct |
4 |
Correct |
38 ms |
74268 KB |
Output is correct |
5 |
Correct |
41 ms |
74140 KB |
Output is correct |
6 |
Correct |
38 ms |
74264 KB |
Output is correct |
7 |
Correct |
42 ms |
74216 KB |
Output is correct |
8 |
Correct |
36 ms |
74268 KB |
Output is correct |
9 |
Correct |
36 ms |
74232 KB |
Output is correct |
10 |
Correct |
37 ms |
74284 KB |
Output is correct |
11 |
Correct |
35 ms |
74196 KB |
Output is correct |
12 |
Correct |
37 ms |
74268 KB |
Output is correct |
13 |
Correct |
38 ms |
74140 KB |
Output is correct |
14 |
Correct |
35 ms |
74136 KB |
Output is correct |
15 |
Correct |
38 ms |
74148 KB |
Output is correct |
16 |
Correct |
37 ms |
74268 KB |
Output is correct |
17 |
Correct |
39 ms |
74252 KB |
Output is correct |
18 |
Correct |
37 ms |
74292 KB |
Output is correct |
19 |
Correct |
36 ms |
74084 KB |
Output is correct |
20 |
Correct |
38 ms |
74296 KB |
Output is correct |
21 |
Correct |
37 ms |
74196 KB |
Output is correct |
22 |
Correct |
38 ms |
74208 KB |
Output is correct |
23 |
Correct |
37 ms |
74108 KB |
Output is correct |
24 |
Correct |
36 ms |
74328 KB |
Output is correct |
25 |
Correct |
40 ms |
74280 KB |
Output is correct |
26 |
Correct |
36 ms |
74260 KB |
Output is correct |
27 |
Correct |
38 ms |
74188 KB |
Output is correct |
28 |
Correct |
35 ms |
74164 KB |
Output is correct |
29 |
Correct |
40 ms |
74312 KB |
Output is correct |
30 |
Correct |
38 ms |
74380 KB |
Output is correct |
31 |
Correct |
39 ms |
74340 KB |
Output is correct |
32 |
Correct |
38 ms |
74264 KB |
Output is correct |
33 |
Correct |
39 ms |
74272 KB |
Output is correct |
34 |
Correct |
43 ms |
74204 KB |
Output is correct |
35 |
Correct |
48 ms |
74268 KB |
Output is correct |
36 |
Correct |
39 ms |
74260 KB |
Output is correct |
37 |
Correct |
37 ms |
74268 KB |
Output is correct |
38 |
Correct |
95 ms |
77028 KB |
Output is correct |
39 |
Correct |
96 ms |
102376 KB |
Output is correct |
40 |
Correct |
137 ms |
77324 KB |
Output is correct |
41 |
Correct |
123 ms |
77432 KB |
Output is correct |
42 |
Correct |
100 ms |
77764 KB |
Output is correct |
43 |
Correct |
71 ms |
76012 KB |
Output is correct |
44 |
Correct |
69 ms |
74820 KB |
Output is correct |
45 |
Correct |
118 ms |
93820 KB |
Output is correct |
46 |
Correct |
120 ms |
93912 KB |
Output is correct |
47 |
Correct |
100 ms |
98300 KB |
Output is correct |
48 |
Correct |
103 ms |
98252 KB |
Output is correct |
49 |
Correct |
115 ms |
94024 KB |
Output is correct |
50 |
Correct |
119 ms |
94032 KB |
Output is correct |
51 |
Correct |
97 ms |
94808 KB |
Output is correct |
52 |
Correct |
96 ms |
94840 KB |
Output is correct |
53 |
Correct |
62 ms |
76132 KB |
Output is correct |
54 |
Correct |
134 ms |
93772 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
36 ms |
74196 KB |
Output is correct |
2 |
Correct |
37 ms |
74276 KB |
Output is correct |
3 |
Correct |
37 ms |
74188 KB |
Output is correct |
4 |
Correct |
35 ms |
74184 KB |
Output is correct |
5 |
Correct |
49 ms |
74172 KB |
Output is correct |
6 |
Correct |
37 ms |
74184 KB |
Output is correct |
7 |
Correct |
39 ms |
74152 KB |
Output is correct |
8 |
Correct |
36 ms |
74204 KB |
Output is correct |
9 |
Correct |
37 ms |
74200 KB |
Output is correct |
10 |
Correct |
36 ms |
74212 KB |
Output is correct |
11 |
Correct |
35 ms |
74196 KB |
Output is correct |
12 |
Correct |
41 ms |
74356 KB |
Output is correct |
13 |
Correct |
94 ms |
74512 KB |
Output is correct |
14 |
Correct |
120 ms |
74732 KB |
Output is correct |
15 |
Correct |
106 ms |
74576 KB |
Output is correct |
16 |
Correct |
238 ms |
104056 KB |
Output is correct |
17 |
Correct |
928 ms |
144468 KB |
Output is correct |
18 |
Correct |
1700 ms |
191324 KB |
Output is correct |
19 |
Correct |
367 ms |
113408 KB |
Output is correct |
20 |
Correct |
371 ms |
113232 KB |
Output is correct |
21 |
Correct |
371 ms |
113276 KB |
Output is correct |
22 |
Correct |
776 ms |
138548 KB |
Output is correct |
23 |
Correct |
639 ms |
137692 KB |
Output is correct |
24 |
Correct |
640 ms |
138036 KB |
Output is correct |
25 |
Correct |
645 ms |
137996 KB |
Output is correct |
26 |
Correct |
645 ms |
137992 KB |
Output is correct |
27 |
Correct |
997 ms |
164036 KB |
Output is correct |
28 |
Correct |
1006 ms |
172532 KB |
Output is correct |
29 |
Correct |
1004 ms |
166560 KB |
Output is correct |
30 |
Correct |
602 ms |
136260 KB |
Output is correct |
31 |
Correct |
594 ms |
137356 KB |
Output is correct |
32 |
Correct |
569 ms |
135504 KB |
Output is correct |
33 |
Correct |
578 ms |
138452 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
34 ms |
74108 KB |
Output is correct |
2 |
Correct |
35 ms |
74156 KB |
Output is correct |
3 |
Correct |
34 ms |
74192 KB |
Output is correct |
4 |
Correct |
49 ms |
74244 KB |
Output is correct |
5 |
Correct |
67 ms |
74268 KB |
Output is correct |
6 |
Correct |
36 ms |
74188 KB |
Output is correct |
7 |
Correct |
37 ms |
74300 KB |
Output is correct |
8 |
Correct |
39 ms |
74344 KB |
Output is correct |
9 |
Correct |
89 ms |
77068 KB |
Output is correct |
10 |
Correct |
96 ms |
102312 KB |
Output is correct |
11 |
Correct |
48 ms |
74316 KB |
Output is correct |
12 |
Correct |
101 ms |
74284 KB |
Output is correct |
13 |
Correct |
298 ms |
139424 KB |
Output is correct |
14 |
Correct |
309 ms |
139612 KB |
Output is correct |
15 |
Correct |
594 ms |
144112 KB |
Output is correct |
16 |
Correct |
1295 ms |
189392 KB |
Output is correct |
17 |
Correct |
324 ms |
147020 KB |
Output is correct |
18 |
Correct |
433 ms |
167960 KB |
Output is correct |
19 |
Correct |
319 ms |
144212 KB |
Output is correct |
20 |
Correct |
324 ms |
144336 KB |
Output is correct |
21 |
Correct |
400 ms |
149528 KB |
Output is correct |
22 |
Correct |
288 ms |
140068 KB |
Output is correct |
23 |
Correct |
35 ms |
74196 KB |
Output is correct |
24 |
Correct |
35 ms |
74132 KB |
Output is correct |
25 |
Correct |
37 ms |
74180 KB |
Output is correct |
26 |
Correct |
38 ms |
74268 KB |
Output is correct |
27 |
Correct |
41 ms |
74140 KB |
Output is correct |
28 |
Correct |
38 ms |
74264 KB |
Output is correct |
29 |
Correct |
42 ms |
74216 KB |
Output is correct |
30 |
Correct |
36 ms |
74268 KB |
Output is correct |
31 |
Correct |
36 ms |
74232 KB |
Output is correct |
32 |
Correct |
37 ms |
74284 KB |
Output is correct |
33 |
Correct |
35 ms |
74196 KB |
Output is correct |
34 |
Correct |
37 ms |
74268 KB |
Output is correct |
35 |
Correct |
38 ms |
74140 KB |
Output is correct |
36 |
Correct |
35 ms |
74136 KB |
Output is correct |
37 |
Correct |
38 ms |
74148 KB |
Output is correct |
38 |
Correct |
37 ms |
74268 KB |
Output is correct |
39 |
Correct |
39 ms |
74252 KB |
Output is correct |
40 |
Correct |
37 ms |
74292 KB |
Output is correct |
41 |
Correct |
36 ms |
74084 KB |
Output is correct |
42 |
Correct |
38 ms |
74296 KB |
Output is correct |
43 |
Correct |
37 ms |
74196 KB |
Output is correct |
44 |
Correct |
38 ms |
74208 KB |
Output is correct |
45 |
Correct |
37 ms |
74108 KB |
Output is correct |
46 |
Correct |
36 ms |
74328 KB |
Output is correct |
47 |
Correct |
40 ms |
74280 KB |
Output is correct |
48 |
Correct |
36 ms |
74260 KB |
Output is correct |
49 |
Correct |
38 ms |
74188 KB |
Output is correct |
50 |
Correct |
35 ms |
74164 KB |
Output is correct |
51 |
Correct |
40 ms |
74312 KB |
Output is correct |
52 |
Correct |
38 ms |
74380 KB |
Output is correct |
53 |
Correct |
39 ms |
74340 KB |
Output is correct |
54 |
Correct |
38 ms |
74264 KB |
Output is correct |
55 |
Correct |
39 ms |
74272 KB |
Output is correct |
56 |
Correct |
43 ms |
74204 KB |
Output is correct |
57 |
Correct |
48 ms |
74268 KB |
Output is correct |
58 |
Correct |
39 ms |
74260 KB |
Output is correct |
59 |
Correct |
37 ms |
74268 KB |
Output is correct |
60 |
Correct |
95 ms |
77028 KB |
Output is correct |
61 |
Correct |
96 ms |
102376 KB |
Output is correct |
62 |
Correct |
137 ms |
77324 KB |
Output is correct |
63 |
Correct |
123 ms |
77432 KB |
Output is correct |
64 |
Correct |
100 ms |
77764 KB |
Output is correct |
65 |
Correct |
71 ms |
76012 KB |
Output is correct |
66 |
Correct |
69 ms |
74820 KB |
Output is correct |
67 |
Correct |
118 ms |
93820 KB |
Output is correct |
68 |
Correct |
120 ms |
93912 KB |
Output is correct |
69 |
Correct |
100 ms |
98300 KB |
Output is correct |
70 |
Correct |
103 ms |
98252 KB |
Output is correct |
71 |
Correct |
115 ms |
94024 KB |
Output is correct |
72 |
Correct |
119 ms |
94032 KB |
Output is correct |
73 |
Correct |
97 ms |
94808 KB |
Output is correct |
74 |
Correct |
96 ms |
94840 KB |
Output is correct |
75 |
Correct |
62 ms |
76132 KB |
Output is correct |
76 |
Correct |
134 ms |
93772 KB |
Output is correct |
77 |
Correct |
36 ms |
74196 KB |
Output is correct |
78 |
Correct |
37 ms |
74276 KB |
Output is correct |
79 |
Correct |
37 ms |
74188 KB |
Output is correct |
80 |
Correct |
35 ms |
74184 KB |
Output is correct |
81 |
Correct |
49 ms |
74172 KB |
Output is correct |
82 |
Correct |
37 ms |
74184 KB |
Output is correct |
83 |
Correct |
39 ms |
74152 KB |
Output is correct |
84 |
Correct |
36 ms |
74204 KB |
Output is correct |
85 |
Correct |
37 ms |
74200 KB |
Output is correct |
86 |
Correct |
36 ms |
74212 KB |
Output is correct |
87 |
Correct |
35 ms |
74196 KB |
Output is correct |
88 |
Correct |
41 ms |
74356 KB |
Output is correct |
89 |
Correct |
94 ms |
74512 KB |
Output is correct |
90 |
Correct |
120 ms |
74732 KB |
Output is correct |
91 |
Correct |
106 ms |
74576 KB |
Output is correct |
92 |
Correct |
238 ms |
104056 KB |
Output is correct |
93 |
Correct |
928 ms |
144468 KB |
Output is correct |
94 |
Correct |
1700 ms |
191324 KB |
Output is correct |
95 |
Correct |
367 ms |
113408 KB |
Output is correct |
96 |
Correct |
371 ms |
113232 KB |
Output is correct |
97 |
Correct |
371 ms |
113276 KB |
Output is correct |
98 |
Correct |
776 ms |
138548 KB |
Output is correct |
99 |
Correct |
639 ms |
137692 KB |
Output is correct |
100 |
Correct |
640 ms |
138036 KB |
Output is correct |
101 |
Correct |
645 ms |
137996 KB |
Output is correct |
102 |
Correct |
645 ms |
137992 KB |
Output is correct |
103 |
Correct |
997 ms |
164036 KB |
Output is correct |
104 |
Correct |
1006 ms |
172532 KB |
Output is correct |
105 |
Correct |
1004 ms |
166560 KB |
Output is correct |
106 |
Correct |
602 ms |
136260 KB |
Output is correct |
107 |
Correct |
594 ms |
137356 KB |
Output is correct |
108 |
Correct |
569 ms |
135504 KB |
Output is correct |
109 |
Correct |
578 ms |
138452 KB |
Output is correct |
110 |
Correct |
120 ms |
74796 KB |
Output is correct |
111 |
Correct |
82 ms |
74592 KB |
Output is correct |
112 |
Correct |
728 ms |
146664 KB |
Output is correct |
113 |
Correct |
307 ms |
117360 KB |
Output is correct |
114 |
Correct |
575 ms |
139496 KB |
Output is correct |
115 |
Correct |
123 ms |
98572 KB |
Output is correct |
116 |
Correct |
538 ms |
131116 KB |
Output is correct |
117 |
Correct |
2195 ms |
199044 KB |
Output is correct |
118 |
Correct |
142 ms |
94516 KB |
Output is correct |
119 |
Correct |
146 ms |
94508 KB |
Output is correct |
120 |
Correct |
68 ms |
78972 KB |
Output is correct |
121 |
Correct |
628 ms |
131300 KB |
Output is correct |
122 |
Correct |
629 ms |
131180 KB |
Output is correct |
123 |
Correct |
346 ms |
121244 KB |
Output is correct |
124 |
Correct |
339 ms |
121348 KB |
Output is correct |
125 |
Correct |
399 ms |
123440 KB |
Output is correct |
126 |
Correct |
1314 ms |
190056 KB |
Output is correct |
127 |
Correct |
593 ms |
154020 KB |
Output is correct |
128 |
Correct |
463 ms |
155608 KB |
Output is correct |
129 |
Correct |
463 ms |
153216 KB |
Output is correct |
130 |
Correct |
480 ms |
155364 KB |
Output is correct |