# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
713576 |
2023-03-22T14:21:03 Z |
mraron |
Jail (JOI22_jail) |
C++14 |
|
1755 ms |
310416 KB |
#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<cassert>
#include<cassert>
#include<unordered_map>
#include<unordered_set>
#include<functional>
#include<queue>
#include<stack>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<sstream>
#include<iomanip>
#include<cstdio>
#include<cstdlib>
#include<numeric>
#include<random>
#include<chrono>
#include<bitset>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define eb emplace_back
#define xx first
#define yy second
#define sz(x) (int)(x).size()
#define gc getchar
#define IO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define mp make_pair
#define ins insert
#ifndef ONLINE_JUDGE
# define LOG(x) (cerr << #x << " = " << (x) << endl)
#else
# define LOG(x) ((void)0)
#endif
using ll = long long;
using ull = unsigned long long ;
using ld = long double ;
using str = string;
using ordered_set=tree<pair<int,int>, null_type, less<pair<int,int>>, rb_tree_tag, tree_order_statistics_node_update>;
const double PI=acos(-1);
const ll INF = 1LL<<62;
const ll MINF = -(1LL<<62);
template<typename T> T getint() {
T val=0;
char c;
bool neg=false;
while((c=gc()) && !(c>='0' && c<='9')) {
neg|=c=='-';
}
do {
val=(val*10)+c-'0';
} while((c=gc()) && (c>='0' && c<='9'));
return val*(neg?-1:1);
}
//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); uniform_int_distribution<int>(0, n-1)(rng)
template<int L=20>
struct lca {
int n, lg;
vector<int> par, lvl, ssz;
vector<array<int,L>> dp;
vector<vector<int>> adj;
lca(int n) : n(n), lg(ceil(log2(n))), par(n, -1), lvl(n), ssz(n), dp(n), adj(n) {}
void add_edge(int x, int y) {
adj[x].pb(y);
adj[y].pb(x);
}
void dfs(int x) {
ssz[x]=1;
for(auto i:adj[x]) {
if(!ssz[i]) {
par[i]=x;
lvl[i]=lvl[x]+1;
dfs(i);
ssz[x]+=ssz[i];
}
}
}
void init(int root=0) {
dfs(root);
for(int i=1;i<n;++i) {
fill(all(dp[i]), -1);
}
for(int i=1;i<n;++i) {
dp[i][0]=par[i];
}
for(int j=1;j<lg;++j) {
for(int i=1;i<n;++i) {
if(dp[i][j-1]!=-1) {
dp[i][j]=dp[dp[i][j-1]][j-1];
}
}
}
}
int query(int p, int q) {
if(p==q) return p;
if(lvl[p]>lvl[q]) swap(p,q);
for(int i=lg-1;i>=0;i--) {
if(dp[q][i]!=-1 && lvl[p]<=lvl[dp[q][i]]) q=dp[q][i];
}
if(p==q) return p;
for(int i=lg-1;i>=0;i--) {
if(dp[q][i]!=-1 && dp[q][i]!=dp[p][i]) {
p=dp[p][i];
q=dp[q][i];
}
}
return dp[p][0];
}
pair<int,int> query2(int& a, int& b) {
int p=a, q=b;
if(lvl[p]>lvl[q]){
swap(p,q);
swap(a,b);
}
for(int i=lg-1;i>=0;i--) {
if(dp[q][i]!=-1 && lvl[p]<lvl[dp[q][i]]) q=dp[q][i];
}
if(lvl[p]!=lvl[q]) {
if(p==par[q]) return {q,q};
q=par[q];
}
assert(lvl[p]==lvl[q]);
for(int i=lg-1;i>=0;i--) {
if(dp[q][i]!=-1 && dp[q][i]!=dp[p][i]) {
p=dp[p][i];
q=dp[q][i];
}
}
return {p,q};
}
int kth(int p, int k) {
for(int i=0;i<lg;++i) {
if(k&(1<<i)) {
p=dp[p][i];
}
}
return p;
}
int dist(int a, int b) {
int l=query(a,b);
return lvl[a]+lvl[b]-2*lvl[l];
}
};
const int LG=17;
int n,m;
//~ vector<int> ord;
void dfs(int x, int& cnt, vector<int>& indeg, vector<vector<int>>& adj, vector<bool>& volt) {
cnt++;
volt[x]=1;
//~ if(x<m) ord.push_back(x);
for(auto i:adj[x]) {
indeg[i]--;
if(indeg[i]==0) dfs(i, cnt, indeg, adj, volt);
}
}
int main() {
IO;
int T, csind=0;
cin>>T;
while(T--) {
csind++;
cin>>n;
lca<LG> l(n+1);
for(int i=1;i<n;++i) {
int a,b;
cin>>a>>b;
//~ a=i;
//~ b=i+1;
l.add_edge(a, b);
}
l.init(1);
cin>>m;
vector<pair<int,int>> lst(m);
for(int i=0;i<m;++i) {
cin>>lst[i].xx>>lst[i].yy;
}
vector<array<pair<int,int>,LG>> idx(n+1);
int nxt=m;
for(int i=1;i<=n;++i) {
for(int j=0;j<LG;++j) {
idx[i][j].xx=nxt++;
idx[i][j].yy=nxt++;
}
}
vector<vector<int>> adj(nxt);
vector<int> indeg(nxt);
auto add_edge=[&](int a, int b, bool rev=false) {
if(rev) swap(a,b);
indeg[b]++;
adj[a].pb(b);
//~ cerr<<a<<" "<<b<<"\n";
};
for(int i=1;i<=n;++i) {
for(int j=1;j<LG;++j) {
if(l.dp[i][j-1]!=-1) add_edge(idx[l.dp[i][j-1]][j-1].xx, idx[i][j].xx);
add_edge(idx[i][j-1].xx, idx[i][j].xx);
if(l.dp[i][j-1]!=-1) add_edge(idx[l.dp[i][j-1]][j-1].yy, idx[i][j].yy, true);
add_edge(idx[i][j-1].yy, idx[i][j].yy, true);
}
}
//~ LOG("here");
for(int i=0;i<m;++i) {
int from=lst[i].xx, to=lst[i].yy;
//~ cerr<<i<<" "<<idx[from][0].yy<<"\n";
add_edge(i, idx[from][0].xx);
add_edge(idx[to][0].yy, i);
int os=l.query(from, to);
if(os!=from) {
from=l.par[from];
}else {
from=l.query2(from, to).yy;
}
os=l.query(from, to);
for(int j=LG-1;j>=0;j--) {
if(l.dp[from][j]!=-1 && l.lvl[l.dp[from][j]]>=l.lvl[os]) {
add_edge(idx[from][j].xx, i);
from=l.dp[from][j];
}
}
for(int j=LG-1;j>=0;j--) {
if(l.dp[to][j]!=-1 && l.lvl[l.dp[to][j]]>=l.lvl[os]) {
add_edge(idx[to][j].xx, i);
to=l.dp[to][j];
}
}
add_edge(idx[os][0].xx, i);
from=lst[i].xx; to=lst[i].yy;
os=l.query(from, to);
if(os!=to) {
to=l.par[to];
}else {
to=l.query2(to, from).yy;
}
//~ cerr<<from<<" "<<to<<"??\n";
os=l.query(from, to);
for(int j=LG-1;j>=0;j--) {
if(l.dp[from][j]!=-1 && l.lvl[l.dp[from][j]]>=l.lvl[os]) {
add_edge(idx[from][j].yy, i, true);
from=l.dp[from][j];
}
}
for(int j=LG-1;j>=0;j--) {
if(l.dp[to][j]!=-1 && l.lvl[l.dp[to][j]]>=l.lvl[os]) {
add_edge(idx[to][j].yy, i, true);
to=l.dp[to][j];
}
}
add_edge(idx[os][0].yy, i, true);
}
vector<bool> volt(nxt);
int cnt=0;
for(int i=0;i<nxt;++i) {
if(indeg[i]==0 && !volt[i]) dfs(i, cnt, indeg, adj, volt);
}
//~ for(auto i:ord) cerr<<i<<" ";cerr<<"\n";
//~ LOG(cnt);
cout<<(cnt==nxt?"Yes":"No")<<"\n";
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
140 ms |
564 KB |
Output is correct |
5 |
Correct |
299 ms |
1440 KB |
Output is correct |
6 |
Correct |
15 ms |
928 KB |
Output is correct |
7 |
Correct |
14 ms |
928 KB |
Output is correct |
8 |
Correct |
15 ms |
960 KB |
Output is correct |
9 |
Correct |
705 ms |
15176 KB |
Output is correct |
10 |
Correct |
1277 ms |
270924 KB |
Output is correct |
11 |
Correct |
56 ms |
468 KB |
Output is correct |
12 |
Correct |
327 ms |
1588 KB |
Output is correct |
13 |
Correct |
1371 ms |
276956 KB |
Output is correct |
14 |
Correct |
1087 ms |
276940 KB |
Output is correct |
15 |
Correct |
1425 ms |
278636 KB |
Output is correct |
16 |
Correct |
1755 ms |
290348 KB |
Output is correct |
17 |
Correct |
1447 ms |
310416 KB |
Output is correct |
18 |
Correct |
1390 ms |
294464 KB |
Output is correct |
19 |
Correct |
1413 ms |
292252 KB |
Output is correct |
20 |
Correct |
1257 ms |
292236 KB |
Output is correct |
21 |
Correct |
915 ms |
280328 KB |
Output is correct |
22 |
Correct |
1045 ms |
277380 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
15 ms |
888 KB |
Output is correct |
4 |
Correct |
14 ms |
896 KB |
Output is correct |
5 |
Correct |
14 ms |
900 KB |
Output is correct |
6 |
Correct |
13 ms |
920 KB |
Output is correct |
7 |
Correct |
17 ms |
916 KB |
Output is correct |
8 |
Correct |
17 ms |
908 KB |
Output is correct |
9 |
Correct |
14 ms |
916 KB |
Output is correct |
10 |
Correct |
13 ms |
920 KB |
Output is correct |
11 |
Correct |
12 ms |
852 KB |
Output is correct |
12 |
Correct |
6 ms |
900 KB |
Output is correct |
13 |
Correct |
7 ms |
900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
15 ms |
888 KB |
Output is correct |
4 |
Correct |
14 ms |
896 KB |
Output is correct |
5 |
Correct |
14 ms |
900 KB |
Output is correct |
6 |
Correct |
13 ms |
920 KB |
Output is correct |
7 |
Correct |
17 ms |
916 KB |
Output is correct |
8 |
Correct |
17 ms |
908 KB |
Output is correct |
9 |
Correct |
14 ms |
916 KB |
Output is correct |
10 |
Correct |
13 ms |
920 KB |
Output is correct |
11 |
Correct |
12 ms |
852 KB |
Output is correct |
12 |
Correct |
6 ms |
900 KB |
Output is correct |
13 |
Correct |
7 ms |
900 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
324 KB |
Output is correct |
16 |
Correct |
17 ms |
908 KB |
Output is correct |
17 |
Correct |
13 ms |
912 KB |
Output is correct |
18 |
Correct |
14 ms |
908 KB |
Output is correct |
19 |
Correct |
2 ms |
340 KB |
Output is correct |
20 |
Correct |
14 ms |
924 KB |
Output is correct |
21 |
Correct |
15 ms |
908 KB |
Output is correct |
22 |
Correct |
12 ms |
908 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
2 ms |
596 KB |
Output is correct |
25 |
Correct |
15 ms |
1048 KB |
Output is correct |
26 |
Correct |
3 ms |
852 KB |
Output is correct |
27 |
Correct |
14 ms |
908 KB |
Output is correct |
28 |
Correct |
2 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
15 ms |
888 KB |
Output is correct |
4 |
Correct |
14 ms |
896 KB |
Output is correct |
5 |
Correct |
14 ms |
900 KB |
Output is correct |
6 |
Correct |
13 ms |
920 KB |
Output is correct |
7 |
Correct |
17 ms |
916 KB |
Output is correct |
8 |
Correct |
17 ms |
908 KB |
Output is correct |
9 |
Correct |
14 ms |
916 KB |
Output is correct |
10 |
Correct |
13 ms |
920 KB |
Output is correct |
11 |
Correct |
12 ms |
852 KB |
Output is correct |
12 |
Correct |
6 ms |
900 KB |
Output is correct |
13 |
Correct |
7 ms |
900 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
324 KB |
Output is correct |
16 |
Correct |
17 ms |
908 KB |
Output is correct |
17 |
Correct |
13 ms |
912 KB |
Output is correct |
18 |
Correct |
14 ms |
908 KB |
Output is correct |
19 |
Correct |
2 ms |
340 KB |
Output is correct |
20 |
Correct |
14 ms |
924 KB |
Output is correct |
21 |
Correct |
15 ms |
908 KB |
Output is correct |
22 |
Correct |
12 ms |
908 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
2 ms |
596 KB |
Output is correct |
25 |
Correct |
15 ms |
1048 KB |
Output is correct |
26 |
Correct |
3 ms |
852 KB |
Output is correct |
27 |
Correct |
14 ms |
908 KB |
Output is correct |
28 |
Correct |
2 ms |
340 KB |
Output is correct |
29 |
Correct |
15 ms |
956 KB |
Output is correct |
30 |
Correct |
14 ms |
904 KB |
Output is correct |
31 |
Correct |
15 ms |
944 KB |
Output is correct |
32 |
Correct |
17 ms |
936 KB |
Output is correct |
33 |
Correct |
14 ms |
908 KB |
Output is correct |
34 |
Correct |
12 ms |
836 KB |
Output is correct |
35 |
Correct |
15 ms |
808 KB |
Output is correct |
36 |
Correct |
10 ms |
804 KB |
Output is correct |
37 |
Correct |
8 ms |
816 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
15 ms |
888 KB |
Output is correct |
4 |
Correct |
14 ms |
896 KB |
Output is correct |
5 |
Correct |
14 ms |
900 KB |
Output is correct |
6 |
Correct |
13 ms |
920 KB |
Output is correct |
7 |
Correct |
17 ms |
916 KB |
Output is correct |
8 |
Correct |
17 ms |
908 KB |
Output is correct |
9 |
Correct |
14 ms |
916 KB |
Output is correct |
10 |
Correct |
13 ms |
920 KB |
Output is correct |
11 |
Correct |
12 ms |
852 KB |
Output is correct |
12 |
Correct |
6 ms |
900 KB |
Output is correct |
13 |
Correct |
7 ms |
900 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
324 KB |
Output is correct |
16 |
Correct |
17 ms |
908 KB |
Output is correct |
17 |
Correct |
13 ms |
912 KB |
Output is correct |
18 |
Correct |
14 ms |
908 KB |
Output is correct |
19 |
Correct |
2 ms |
340 KB |
Output is correct |
20 |
Correct |
14 ms |
924 KB |
Output is correct |
21 |
Correct |
15 ms |
908 KB |
Output is correct |
22 |
Correct |
12 ms |
908 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
2 ms |
596 KB |
Output is correct |
25 |
Correct |
15 ms |
1048 KB |
Output is correct |
26 |
Correct |
3 ms |
852 KB |
Output is correct |
27 |
Correct |
14 ms |
908 KB |
Output is correct |
28 |
Correct |
2 ms |
340 KB |
Output is correct |
29 |
Correct |
15 ms |
956 KB |
Output is correct |
30 |
Correct |
14 ms |
904 KB |
Output is correct |
31 |
Correct |
15 ms |
944 KB |
Output is correct |
32 |
Correct |
17 ms |
936 KB |
Output is correct |
33 |
Correct |
14 ms |
908 KB |
Output is correct |
34 |
Correct |
12 ms |
836 KB |
Output is correct |
35 |
Correct |
15 ms |
808 KB |
Output is correct |
36 |
Correct |
10 ms |
804 KB |
Output is correct |
37 |
Correct |
8 ms |
816 KB |
Output is correct |
38 |
Correct |
667 ms |
15300 KB |
Output is correct |
39 |
Correct |
1267 ms |
270872 KB |
Output is correct |
40 |
Correct |
464 ms |
14932 KB |
Output is correct |
41 |
Correct |
407 ms |
14988 KB |
Output is correct |
42 |
Correct |
368 ms |
14880 KB |
Output is correct |
43 |
Correct |
568 ms |
15052 KB |
Output is correct |
44 |
Correct |
58 ms |
2840 KB |
Output is correct |
45 |
Correct |
595 ms |
268524 KB |
Output is correct |
46 |
Correct |
600 ms |
268576 KB |
Output is correct |
47 |
Correct |
919 ms |
268808 KB |
Output is correct |
48 |
Correct |
967 ms |
268780 KB |
Output is correct |
49 |
Correct |
506 ms |
271192 KB |
Output is correct |
50 |
Correct |
552 ms |
271060 KB |
Output is correct |
51 |
Correct |
688 ms |
271584 KB |
Output is correct |
52 |
Correct |
676 ms |
271668 KB |
Output is correct |
53 |
Correct |
109 ms |
18840 KB |
Output is correct |
54 |
Correct |
941 ms |
268736 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
56 ms |
372 KB |
Output is correct |
6 |
Correct |
6 ms |
908 KB |
Output is correct |
7 |
Correct |
8 ms |
912 KB |
Output is correct |
8 |
Correct |
2 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
580 KB |
Output is correct |
11 |
Correct |
2 ms |
340 KB |
Output is correct |
12 |
Correct |
10 ms |
800 KB |
Output is correct |
13 |
Correct |
170 ms |
1068 KB |
Output is correct |
14 |
Correct |
319 ms |
1524 KB |
Output is correct |
15 |
Correct |
267 ms |
1212 KB |
Output is correct |
16 |
Correct |
698 ms |
269384 KB |
Output is correct |
17 |
Correct |
703 ms |
276516 KB |
Output is correct |
18 |
Correct |
820 ms |
284888 KB |
Output is correct |
19 |
Correct |
641 ms |
270852 KB |
Output is correct |
20 |
Correct |
677 ms |
270844 KB |
Output is correct |
21 |
Correct |
668 ms |
270708 KB |
Output is correct |
22 |
Correct |
758 ms |
276408 KB |
Output is correct |
23 |
Correct |
667 ms |
276192 KB |
Output is correct |
24 |
Correct |
807 ms |
276224 KB |
Output is correct |
25 |
Correct |
755 ms |
276384 KB |
Output is correct |
26 |
Correct |
799 ms |
276276 KB |
Output is correct |
27 |
Correct |
671 ms |
294236 KB |
Output is correct |
28 |
Correct |
554 ms |
281408 KB |
Output is correct |
29 |
Correct |
574 ms |
281244 KB |
Output is correct |
30 |
Correct |
681 ms |
283336 KB |
Output is correct |
31 |
Correct |
545 ms |
274000 KB |
Output is correct |
32 |
Correct |
706 ms |
281416 KB |
Output is correct |
33 |
Correct |
562 ms |
273940 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
140 ms |
564 KB |
Output is correct |
5 |
Correct |
299 ms |
1440 KB |
Output is correct |
6 |
Correct |
15 ms |
928 KB |
Output is correct |
7 |
Correct |
14 ms |
928 KB |
Output is correct |
8 |
Correct |
15 ms |
960 KB |
Output is correct |
9 |
Correct |
705 ms |
15176 KB |
Output is correct |
10 |
Correct |
1277 ms |
270924 KB |
Output is correct |
11 |
Correct |
56 ms |
468 KB |
Output is correct |
12 |
Correct |
327 ms |
1588 KB |
Output is correct |
13 |
Correct |
1371 ms |
276956 KB |
Output is correct |
14 |
Correct |
1087 ms |
276940 KB |
Output is correct |
15 |
Correct |
1425 ms |
278636 KB |
Output is correct |
16 |
Correct |
1755 ms |
290348 KB |
Output is correct |
17 |
Correct |
1447 ms |
310416 KB |
Output is correct |
18 |
Correct |
1390 ms |
294464 KB |
Output is correct |
19 |
Correct |
1413 ms |
292252 KB |
Output is correct |
20 |
Correct |
1257 ms |
292236 KB |
Output is correct |
21 |
Correct |
915 ms |
280328 KB |
Output is correct |
22 |
Correct |
1045 ms |
277380 KB |
Output is correct |
23 |
Correct |
0 ms |
212 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
15 ms |
888 KB |
Output is correct |
26 |
Correct |
14 ms |
896 KB |
Output is correct |
27 |
Correct |
14 ms |
900 KB |
Output is correct |
28 |
Correct |
13 ms |
920 KB |
Output is correct |
29 |
Correct |
17 ms |
916 KB |
Output is correct |
30 |
Correct |
17 ms |
908 KB |
Output is correct |
31 |
Correct |
14 ms |
916 KB |
Output is correct |
32 |
Correct |
13 ms |
920 KB |
Output is correct |
33 |
Correct |
12 ms |
852 KB |
Output is correct |
34 |
Correct |
6 ms |
900 KB |
Output is correct |
35 |
Correct |
7 ms |
900 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
324 KB |
Output is correct |
38 |
Correct |
17 ms |
908 KB |
Output is correct |
39 |
Correct |
13 ms |
912 KB |
Output is correct |
40 |
Correct |
14 ms |
908 KB |
Output is correct |
41 |
Correct |
2 ms |
340 KB |
Output is correct |
42 |
Correct |
14 ms |
924 KB |
Output is correct |
43 |
Correct |
15 ms |
908 KB |
Output is correct |
44 |
Correct |
12 ms |
908 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
46 |
Correct |
2 ms |
596 KB |
Output is correct |
47 |
Correct |
15 ms |
1048 KB |
Output is correct |
48 |
Correct |
3 ms |
852 KB |
Output is correct |
49 |
Correct |
14 ms |
908 KB |
Output is correct |
50 |
Correct |
2 ms |
340 KB |
Output is correct |
51 |
Correct |
15 ms |
956 KB |
Output is correct |
52 |
Correct |
14 ms |
904 KB |
Output is correct |
53 |
Correct |
15 ms |
944 KB |
Output is correct |
54 |
Correct |
17 ms |
936 KB |
Output is correct |
55 |
Correct |
14 ms |
908 KB |
Output is correct |
56 |
Correct |
12 ms |
836 KB |
Output is correct |
57 |
Correct |
15 ms |
808 KB |
Output is correct |
58 |
Correct |
10 ms |
804 KB |
Output is correct |
59 |
Correct |
8 ms |
816 KB |
Output is correct |
60 |
Correct |
667 ms |
15300 KB |
Output is correct |
61 |
Correct |
1267 ms |
270872 KB |
Output is correct |
62 |
Correct |
464 ms |
14932 KB |
Output is correct |
63 |
Correct |
407 ms |
14988 KB |
Output is correct |
64 |
Correct |
368 ms |
14880 KB |
Output is correct |
65 |
Correct |
568 ms |
15052 KB |
Output is correct |
66 |
Correct |
58 ms |
2840 KB |
Output is correct |
67 |
Correct |
595 ms |
268524 KB |
Output is correct |
68 |
Correct |
600 ms |
268576 KB |
Output is correct |
69 |
Correct |
919 ms |
268808 KB |
Output is correct |
70 |
Correct |
967 ms |
268780 KB |
Output is correct |
71 |
Correct |
506 ms |
271192 KB |
Output is correct |
72 |
Correct |
552 ms |
271060 KB |
Output is correct |
73 |
Correct |
688 ms |
271584 KB |
Output is correct |
74 |
Correct |
676 ms |
271668 KB |
Output is correct |
75 |
Correct |
109 ms |
18840 KB |
Output is correct |
76 |
Correct |
941 ms |
268736 KB |
Output is correct |
77 |
Correct |
0 ms |
212 KB |
Output is correct |
78 |
Correct |
1 ms |
212 KB |
Output is correct |
79 |
Correct |
1 ms |
212 KB |
Output is correct |
80 |
Correct |
0 ms |
212 KB |
Output is correct |
81 |
Correct |
56 ms |
372 KB |
Output is correct |
82 |
Correct |
6 ms |
908 KB |
Output is correct |
83 |
Correct |
8 ms |
912 KB |
Output is correct |
84 |
Correct |
2 ms |
340 KB |
Output is correct |
85 |
Correct |
1 ms |
340 KB |
Output is correct |
86 |
Correct |
1 ms |
580 KB |
Output is correct |
87 |
Correct |
2 ms |
340 KB |
Output is correct |
88 |
Correct |
10 ms |
800 KB |
Output is correct |
89 |
Correct |
170 ms |
1068 KB |
Output is correct |
90 |
Correct |
319 ms |
1524 KB |
Output is correct |
91 |
Correct |
267 ms |
1212 KB |
Output is correct |
92 |
Correct |
698 ms |
269384 KB |
Output is correct |
93 |
Correct |
703 ms |
276516 KB |
Output is correct |
94 |
Correct |
820 ms |
284888 KB |
Output is correct |
95 |
Correct |
641 ms |
270852 KB |
Output is correct |
96 |
Correct |
677 ms |
270844 KB |
Output is correct |
97 |
Correct |
668 ms |
270708 KB |
Output is correct |
98 |
Correct |
758 ms |
276408 KB |
Output is correct |
99 |
Correct |
667 ms |
276192 KB |
Output is correct |
100 |
Correct |
807 ms |
276224 KB |
Output is correct |
101 |
Correct |
755 ms |
276384 KB |
Output is correct |
102 |
Correct |
799 ms |
276276 KB |
Output is correct |
103 |
Correct |
671 ms |
294236 KB |
Output is correct |
104 |
Correct |
554 ms |
281408 KB |
Output is correct |
105 |
Correct |
574 ms |
281244 KB |
Output is correct |
106 |
Correct |
681 ms |
283336 KB |
Output is correct |
107 |
Correct |
545 ms |
274000 KB |
Output is correct |
108 |
Correct |
706 ms |
281416 KB |
Output is correct |
109 |
Correct |
562 ms |
273940 KB |
Output is correct |
110 |
Correct |
323 ms |
1960 KB |
Output is correct |
111 |
Correct |
267 ms |
1320 KB |
Output is correct |
112 |
Correct |
1146 ms |
281432 KB |
Output is correct |
113 |
Correct |
1117 ms |
272844 KB |
Output is correct |
114 |
Correct |
840 ms |
278400 KB |
Output is correct |
115 |
Correct |
339 ms |
267264 KB |
Output is correct |
116 |
Correct |
1040 ms |
276252 KB |
Output is correct |
117 |
Correct |
1537 ms |
286520 KB |
Output is correct |
118 |
Correct |
935 ms |
268692 KB |
Output is correct |
119 |
Correct |
888 ms |
268676 KB |
Output is correct |
120 |
Correct |
77 ms |
23300 KB |
Output is correct |
121 |
Correct |
1110 ms |
277108 KB |
Output is correct |
122 |
Correct |
1116 ms |
276896 KB |
Output is correct |
123 |
Correct |
1305 ms |
273252 KB |
Output is correct |
124 |
Correct |
990 ms |
273156 KB |
Output is correct |
125 |
Correct |
1376 ms |
273788 KB |
Output is correct |
126 |
Correct |
1574 ms |
291588 KB |
Output is correct |
127 |
Correct |
1147 ms |
283156 KB |
Output is correct |
128 |
Correct |
961 ms |
282880 KB |
Output is correct |
129 |
Correct |
1267 ms |
306064 KB |
Output is correct |
130 |
Correct |
1068 ms |
283260 KB |
Output is correct |