#include <bits/stdc++.h>
using namespace std;
#define SIZE_N 200005
#define SIZE_M 400005
#define INFL LLONG_MAX/3
using ll=long long;
struct edge{
ll a,b,c;
bool operator<(const edge p)const{
if(c!=p.c)return c<p.c;
if(a!=p.a)return a<p.a;
return b<p.b;
}
bool operator>(const edge p)const{
if(c!=p.c)return c>p.c;
if(a!=p.a)return a>p.a;
return b>p.b;
}
};
struct UnionFind{
int par[SIZE_N];
void init(int n){
for(int i=0;i<n;i++){
par[i]=i;
}
}
int find(int x){
if(x==par[x])return x;
return par[x]=find(par[x]);
}
bool same(int x,int y){
return find(x)==find(y);
}
void unit(int x,int y){
x=find(x);
y=find(y);
if(x==y)return;
par[x]=y;
}
}uf;
ll n,m,q,s[SIZE_N],ans,ma,sum,d[SIZE_N],miv;
edge e[SIZE_M];
pair<ll,ll>mi=make_pair(INFL,-1);
vector<ll>ansrev;
bool con[SIZE_N];
vector<edge>g;
struct all_edge{
ll a,b,par,c;
bool operator<(const all_edge p)const{
if(c!=p.c)return c<p.c;
if(par!=p.par)par<p.par;
if(a!=p.a)return a<p.a;
return b<p.b;
}
bool operator>(const all_edge p)const{
if(c!=p.c)return c>p.c;
if(par!=p.par)par>p.par;
if(a!=p.a)return a>p.a;
return b>p.b;
}
};
ll pa[SIZE_N],toe[SIZE_N];
priority_queue<edge,vector<edge>,greater<edge>>have[SIZE_N];
priority_queue<all_edge,vector<all_edge>,greater<all_edge>>all;
ll find_pa(ll x){
if(x==pa[x])return x;
return pa[x]=find_pa(pa[x]);
}
int main(void){
scanf("%lld%lld%lld",&n,&m,&q);
for(int i=0;i<n;i++){
scanf("%lld",&s[i]);
ma=max(ma,s[i]);
mi=min(mi,make_pair(s[i],ll(i)));
sum+=s[i];
}
miv=mi.second;
for(int i=0;i<m;i++){
ll a,b;
scanf("%lld%lld",&a,&b);
a--,b--;
if(a>b)swap(a,b);
e[i]=edge{a,b,s[a]+s[b]};
}
sort(e,e+m);
uf.init(n);
for(int i=0;i<m;i++){
ll a=e[i].a,b=e[i].b;
if(!uf.same(a,b)){
ans+=e[i].c;
uf.unit(a,b);
g.push_back(e[i]);
}
}
for(auto i:g){
if(i.a==miv)con[i.b]=true;
else if(i.b==miv)con[i.a]=true;
else{
have[i.a].push(edge{i.a,i.b,i.c});
have[i.b].push(edge{i.b,i.a,i.c});
}
}
for(int i=0;i<n;i++){
pa[i]=i;
toe[i]=i;
if(!con[i]&&!have[i].empty()){
edge x=have[i].top();
all.push(all_edge{x.a,x.b,x.a,-(s[miv]+s[x.a])+x.c});
}
}
ll start=(n-2)*mi.first+sum;
ansrev.push_back(start);
while(!all.empty()){
all_edge al=all.top();
ll a=all.top().a,b=all.top().b,c=all.top().c,d=all.top().par;
all.pop();
if(find_pa(a)==find_pa(b)||find_pa(a)!=d)continue;
start+=c;
ansrev.push_back(start);
a=find_pa(a);
b=find_pa(b);
ll x=toe[a],y=toe[b];
if(have[x].size()>have[y].size())swap(x,y);
while(!have[x].empty()){
have[y].push(have[x].top());
have[x].pop();
}
pa[a]=b;
if(con[b])continue;
toe[b]=y;
while(!have[y].empty()&&find_pa(have[y].top().a)==find_pa(have[y].top().b))have[y].pop();
if(!have[y].empty())all.push(all_edge{have[y].top().a,have[y].top().b,b,-(s[miv]+s[b])+have[y].top().c});
}
reverse(ansrev.begin(),ansrev.end());
for(int i=0;i<=q;i++){
if(ansrev.size()<=i)printf("%lld\n",ansrev.back()-sum+ma);
else printf("%lld\n",ansrev[i]-sum+ma);
}
}
Compilation message
guard.cpp: In member function 'bool all_edge::operator<(all_edge) const':
guard.cpp:57:26: warning: statement has no effect [-Wunused-value]
57 | if(par!=p.par)par<p.par;
| ~~~^~~~~~
guard.cpp: In member function 'bool all_edge::operator>(all_edge) const':
guard.cpp:63:26: warning: statement has no effect [-Wunused-value]
63 | if(par!=p.par)par>p.par;
| ~~~^~~~~~
guard.cpp: In function 'int main()':
guard.cpp:123:18: warning: variable 'al' set but not used [-Wunused-but-set-variable]
123 | all_edge al=all.top();
| ^~
guard.cpp:145:25: warning: comparison of integer expressions of different signedness: 'std::vector<long long int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
145 | if(ansrev.size()<=i)printf("%lld\n",ansrev.back()-sum+ma);
| ~~~~~~~~~~~~~^~~
guard.cpp:79:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
79 | scanf("%lld%lld%lld",&n,&m,&q);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
guard.cpp:81:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
81 | scanf("%lld",&s[i]);
| ~~~~~^~~~~~~~~~~~~~
guard.cpp:89:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
89 | scanf("%lld%lld",&a,&b);
| ~~~~~^~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
6484 KB |
Output is correct |
2 |
Correct |
110 ms |
45192 KB |
Output is correct |
3 |
Correct |
105 ms |
45160 KB |
Output is correct |
4 |
Correct |
189 ms |
52264 KB |
Output is correct |
5 |
Correct |
187 ms |
52304 KB |
Output is correct |
6 |
Correct |
192 ms |
52380 KB |
Output is correct |
7 |
Correct |
183 ms |
52288 KB |
Output is correct |
8 |
Correct |
4 ms |
6484 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
6484 KB |
Output is correct |
2 |
Correct |
110 ms |
45192 KB |
Output is correct |
3 |
Correct |
105 ms |
45160 KB |
Output is correct |
4 |
Correct |
189 ms |
52264 KB |
Output is correct |
5 |
Correct |
187 ms |
52304 KB |
Output is correct |
6 |
Correct |
192 ms |
52380 KB |
Output is correct |
7 |
Correct |
183 ms |
52288 KB |
Output is correct |
8 |
Correct |
4 ms |
6484 KB |
Output is correct |
9 |
Correct |
3 ms |
6484 KB |
Output is correct |
10 |
Correct |
351 ms |
51632 KB |
Output is correct |
11 |
Correct |
120 ms |
45148 KB |
Output is correct |
12 |
Correct |
107 ms |
45140 KB |
Output is correct |
13 |
Correct |
112 ms |
45104 KB |
Output is correct |
14 |
Correct |
342 ms |
51784 KB |
Output is correct |
15 |
Correct |
352 ms |
51704 KB |
Output is correct |
16 |
Correct |
349 ms |
51656 KB |
Output is correct |
17 |
Correct |
349 ms |
51680 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
6484 KB |
Output is correct |
2 |
Correct |
110 ms |
45192 KB |
Output is correct |
3 |
Correct |
105 ms |
45160 KB |
Output is correct |
4 |
Correct |
189 ms |
52264 KB |
Output is correct |
5 |
Correct |
187 ms |
52304 KB |
Output is correct |
6 |
Correct |
192 ms |
52380 KB |
Output is correct |
7 |
Correct |
183 ms |
52288 KB |
Output is correct |
8 |
Correct |
4 ms |
6484 KB |
Output is correct |
9 |
Correct |
3 ms |
6484 KB |
Output is correct |
10 |
Correct |
351 ms |
51632 KB |
Output is correct |
11 |
Correct |
120 ms |
45148 KB |
Output is correct |
12 |
Correct |
107 ms |
45140 KB |
Output is correct |
13 |
Correct |
112 ms |
45104 KB |
Output is correct |
14 |
Correct |
342 ms |
51784 KB |
Output is correct |
15 |
Correct |
352 ms |
51704 KB |
Output is correct |
16 |
Correct |
349 ms |
51656 KB |
Output is correct |
17 |
Correct |
349 ms |
51680 KB |
Output is correct |
18 |
Correct |
3 ms |
6612 KB |
Output is correct |
19 |
Correct |
416 ms |
52820 KB |
Output is correct |
20 |
Correct |
371 ms |
52952 KB |
Output is correct |
21 |
Correct |
380 ms |
52616 KB |
Output is correct |
22 |
Correct |
424 ms |
52880 KB |
Output is correct |
23 |
Correct |
354 ms |
53296 KB |
Output is correct |
24 |
Correct |
314 ms |
58424 KB |
Output is correct |
25 |
Correct |
274 ms |
59252 KB |
Output is correct |
26 |
Correct |
242 ms |
61212 KB |
Output is correct |
27 |
Correct |
169 ms |
50744 KB |
Output is correct |
28 |
Correct |
346 ms |
51292 KB |
Output is correct |
29 |
Correct |
327 ms |
51916 KB |
Output is correct |
30 |
Correct |
305 ms |
53336 KB |
Output is correct |
31 |
Correct |
179 ms |
50692 KB |
Output is correct |
32 |
Correct |
343 ms |
52920 KB |
Output is correct |
33 |
Correct |
310 ms |
48016 KB |
Output is correct |
34 |
Correct |
377 ms |
105320 KB |
Output is correct |
35 |
Correct |
333 ms |
98596 KB |
Output is correct |
36 |
Correct |
226 ms |
74836 KB |
Output is correct |
37 |
Correct |
204 ms |
69148 KB |
Output is correct |
38 |
Correct |
277 ms |
46720 KB |
Output is correct |
39 |
Correct |
181 ms |
49828 KB |
Output is correct |
40 |
Correct |
246 ms |
47640 KB |
Output is correct |
41 |
Correct |
205 ms |
45228 KB |
Output is correct |
42 |
Correct |
319 ms |
51372 KB |
Output is correct |
43 |
Correct |
357 ms |
51344 KB |
Output is correct |
44 |
Correct |
406 ms |
52176 KB |
Output is correct |
45 |
Correct |
385 ms |
52060 KB |
Output is correct |
46 |
Correct |
398 ms |
52424 KB |
Output is correct |
47 |
Correct |
410 ms |
52560 KB |
Output is correct |
48 |
Correct |
415 ms |
52496 KB |
Output is correct |
49 |
Correct |
280 ms |
62480 KB |
Output is correct |
50 |
Correct |
337 ms |
48340 KB |
Output is correct |
51 |
Correct |
373 ms |
52776 KB |
Output is correct |
52 |
Correct |
330 ms |
51180 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
6484 KB |
Output is correct |
2 |
Correct |
110 ms |
45192 KB |
Output is correct |
3 |
Correct |
105 ms |
45160 KB |
Output is correct |
4 |
Correct |
189 ms |
52264 KB |
Output is correct |
5 |
Correct |
187 ms |
52304 KB |
Output is correct |
6 |
Correct |
192 ms |
52380 KB |
Output is correct |
7 |
Correct |
183 ms |
52288 KB |
Output is correct |
8 |
Correct |
4 ms |
6484 KB |
Output is correct |
9 |
Correct |
3 ms |
6484 KB |
Output is correct |
10 |
Correct |
351 ms |
51632 KB |
Output is correct |
11 |
Correct |
120 ms |
45148 KB |
Output is correct |
12 |
Correct |
107 ms |
45140 KB |
Output is correct |
13 |
Correct |
112 ms |
45104 KB |
Output is correct |
14 |
Correct |
342 ms |
51784 KB |
Output is correct |
15 |
Correct |
352 ms |
51704 KB |
Output is correct |
16 |
Correct |
349 ms |
51656 KB |
Output is correct |
17 |
Correct |
349 ms |
51680 KB |
Output is correct |
18 |
Correct |
3 ms |
6612 KB |
Output is correct |
19 |
Correct |
416 ms |
52820 KB |
Output is correct |
20 |
Correct |
371 ms |
52952 KB |
Output is correct |
21 |
Correct |
380 ms |
52616 KB |
Output is correct |
22 |
Correct |
424 ms |
52880 KB |
Output is correct |
23 |
Correct |
354 ms |
53296 KB |
Output is correct |
24 |
Correct |
314 ms |
58424 KB |
Output is correct |
25 |
Correct |
274 ms |
59252 KB |
Output is correct |
26 |
Correct |
242 ms |
61212 KB |
Output is correct |
27 |
Correct |
169 ms |
50744 KB |
Output is correct |
28 |
Correct |
346 ms |
51292 KB |
Output is correct |
29 |
Correct |
327 ms |
51916 KB |
Output is correct |
30 |
Correct |
305 ms |
53336 KB |
Output is correct |
31 |
Correct |
179 ms |
50692 KB |
Output is correct |
32 |
Correct |
343 ms |
52920 KB |
Output is correct |
33 |
Correct |
310 ms |
48016 KB |
Output is correct |
34 |
Correct |
377 ms |
105320 KB |
Output is correct |
35 |
Correct |
333 ms |
98596 KB |
Output is correct |
36 |
Correct |
226 ms |
74836 KB |
Output is correct |
37 |
Correct |
204 ms |
69148 KB |
Output is correct |
38 |
Correct |
277 ms |
46720 KB |
Output is correct |
39 |
Correct |
181 ms |
49828 KB |
Output is correct |
40 |
Correct |
246 ms |
47640 KB |
Output is correct |
41 |
Correct |
205 ms |
45228 KB |
Output is correct |
42 |
Correct |
319 ms |
51372 KB |
Output is correct |
43 |
Correct |
357 ms |
51344 KB |
Output is correct |
44 |
Correct |
406 ms |
52176 KB |
Output is correct |
45 |
Correct |
385 ms |
52060 KB |
Output is correct |
46 |
Correct |
398 ms |
52424 KB |
Output is correct |
47 |
Correct |
410 ms |
52560 KB |
Output is correct |
48 |
Correct |
415 ms |
52496 KB |
Output is correct |
49 |
Correct |
280 ms |
62480 KB |
Output is correct |
50 |
Correct |
337 ms |
48340 KB |
Output is correct |
51 |
Correct |
373 ms |
52776 KB |
Output is correct |
52 |
Correct |
330 ms |
51180 KB |
Output is correct |
53 |
Correct |
3 ms |
6612 KB |
Output is correct |
54 |
Correct |
413 ms |
53140 KB |
Output is correct |
55 |
Correct |
373 ms |
53272 KB |
Output is correct |
56 |
Correct |
393 ms |
54036 KB |
Output is correct |
57 |
Correct |
445 ms |
57388 KB |
Output is correct |
58 |
Correct |
384 ms |
57988 KB |
Output is correct |
59 |
Correct |
338 ms |
60052 KB |
Output is correct |
60 |
Correct |
272 ms |
52880 KB |
Output is correct |
61 |
Correct |
325 ms |
66108 KB |
Output is correct |
62 |
Correct |
227 ms |
55472 KB |
Output is correct |
63 |
Correct |
359 ms |
52204 KB |
Output is correct |
64 |
Correct |
341 ms |
54244 KB |
Output is correct |
65 |
Correct |
313 ms |
58080 KB |
Output is correct |
66 |
Correct |
220 ms |
55432 KB |
Output is correct |
67 |
Correct |
434 ms |
54960 KB |
Output is correct |
68 |
Correct |
301 ms |
47996 KB |
Output is correct |
69 |
Correct |
412 ms |
108188 KB |
Output is correct |
70 |
Correct |
337 ms |
101100 KB |
Output is correct |
71 |
Correct |
226 ms |
73100 KB |
Output is correct |
72 |
Correct |
197 ms |
70136 KB |
Output is correct |
73 |
Correct |
276 ms |
46712 KB |
Output is correct |
74 |
Correct |
178 ms |
49780 KB |
Output is correct |
75 |
Correct |
234 ms |
47208 KB |
Output is correct |
76 |
Correct |
199 ms |
45196 KB |
Output is correct |
77 |
Correct |
266 ms |
51196 KB |
Output is correct |
78 |
Correct |
354 ms |
51968 KB |
Output is correct |
79 |
Correct |
459 ms |
57288 KB |
Output is correct |
80 |
Correct |
420 ms |
53316 KB |
Output is correct |
81 |
Correct |
426 ms |
56112 KB |
Output is correct |
82 |
Correct |
454 ms |
56872 KB |
Output is correct |
83 |
Correct |
461 ms |
56628 KB |
Output is correct |
84 |
Correct |
291 ms |
50468 KB |
Output is correct |
85 |
Correct |
316 ms |
48340 KB |
Output is correct |
86 |
Correct |
356 ms |
52464 KB |
Output is correct |
87 |
Correct |
337 ms |
52644 KB |
Output is correct |
88 |
Correct |
498 ms |
69992 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
6484 KB |
Output is correct |
2 |
Correct |
3 ms |
6612 KB |
Output is correct |
3 |
Correct |
3 ms |
6484 KB |
Output is correct |
4 |
Correct |
3 ms |
6584 KB |
Output is correct |
5 |
Correct |
3 ms |
6484 KB |
Output is correct |
6 |
Correct |
3 ms |
6568 KB |
Output is correct |
7 |
Correct |
3 ms |
6612 KB |
Output is correct |
8 |
Correct |
23 ms |
8860 KB |
Output is correct |
9 |
Correct |
20 ms |
8788 KB |
Output is correct |
10 |
Correct |
20 ms |
8612 KB |
Output is correct |
11 |
Correct |
25 ms |
8716 KB |
Output is correct |
12 |
Correct |
20 ms |
8772 KB |
Output is correct |
13 |
Correct |
21 ms |
8780 KB |
Output is correct |
14 |
Correct |
20 ms |
8788 KB |
Output is correct |
15 |
Correct |
20 ms |
8704 KB |
Output is correct |
16 |
Correct |
23 ms |
8788 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
6484 KB |
Output is correct |
2 |
Correct |
3 ms |
6612 KB |
Output is correct |
3 |
Correct |
3 ms |
6484 KB |
Output is correct |
4 |
Correct |
3 ms |
6584 KB |
Output is correct |
5 |
Correct |
3 ms |
6484 KB |
Output is correct |
6 |
Correct |
3 ms |
6568 KB |
Output is correct |
7 |
Correct |
3 ms |
6612 KB |
Output is correct |
8 |
Correct |
23 ms |
8860 KB |
Output is correct |
9 |
Correct |
20 ms |
8788 KB |
Output is correct |
10 |
Correct |
20 ms |
8612 KB |
Output is correct |
11 |
Correct |
25 ms |
8716 KB |
Output is correct |
12 |
Correct |
20 ms |
8772 KB |
Output is correct |
13 |
Correct |
21 ms |
8780 KB |
Output is correct |
14 |
Correct |
20 ms |
8788 KB |
Output is correct |
15 |
Correct |
20 ms |
8704 KB |
Output is correct |
16 |
Correct |
23 ms |
8788 KB |
Output is correct |
17 |
Correct |
27 ms |
9952 KB |
Output is correct |
18 |
Correct |
28 ms |
9972 KB |
Output is correct |
19 |
Correct |
39 ms |
11420 KB |
Output is correct |
20 |
Correct |
69 ms |
13528 KB |
Output is correct |
21 |
Correct |
70 ms |
14688 KB |
Output is correct |
22 |
Correct |
57 ms |
13516 KB |
Output is correct |
23 |
Correct |
105 ms |
18832 KB |
Output is correct |
24 |
Correct |
82 ms |
15028 KB |
Output is correct |
25 |
Correct |
22 ms |
9528 KB |
Output is correct |
26 |
Correct |
52 ms |
12832 KB |
Output is correct |
27 |
Correct |
28 ms |
10400 KB |
Output is correct |
28 |
Correct |
24 ms |
9428 KB |
Output is correct |
29 |
Correct |
22 ms |
9420 KB |
Output is correct |
30 |
Correct |
22 ms |
9392 KB |
Output is correct |
31 |
Correct |
20 ms |
8140 KB |
Output is correct |
32 |
Correct |
20 ms |
8268 KB |
Output is correct |
33 |
Correct |
23 ms |
9556 KB |
Output is correct |
34 |
Correct |
25 ms |
9812 KB |
Output is correct |
35 |
Correct |
42 ms |
12024 KB |
Output is correct |
36 |
Correct |
106 ms |
18800 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
6484 KB |
Output is correct |
2 |
Correct |
110 ms |
45192 KB |
Output is correct |
3 |
Correct |
105 ms |
45160 KB |
Output is correct |
4 |
Correct |
189 ms |
52264 KB |
Output is correct |
5 |
Correct |
187 ms |
52304 KB |
Output is correct |
6 |
Correct |
192 ms |
52380 KB |
Output is correct |
7 |
Correct |
183 ms |
52288 KB |
Output is correct |
8 |
Correct |
4 ms |
6484 KB |
Output is correct |
9 |
Correct |
3 ms |
6484 KB |
Output is correct |
10 |
Correct |
351 ms |
51632 KB |
Output is correct |
11 |
Correct |
120 ms |
45148 KB |
Output is correct |
12 |
Correct |
107 ms |
45140 KB |
Output is correct |
13 |
Correct |
112 ms |
45104 KB |
Output is correct |
14 |
Correct |
342 ms |
51784 KB |
Output is correct |
15 |
Correct |
352 ms |
51704 KB |
Output is correct |
16 |
Correct |
349 ms |
51656 KB |
Output is correct |
17 |
Correct |
349 ms |
51680 KB |
Output is correct |
18 |
Correct |
3 ms |
6612 KB |
Output is correct |
19 |
Correct |
416 ms |
52820 KB |
Output is correct |
20 |
Correct |
371 ms |
52952 KB |
Output is correct |
21 |
Correct |
380 ms |
52616 KB |
Output is correct |
22 |
Correct |
424 ms |
52880 KB |
Output is correct |
23 |
Correct |
354 ms |
53296 KB |
Output is correct |
24 |
Correct |
314 ms |
58424 KB |
Output is correct |
25 |
Correct |
274 ms |
59252 KB |
Output is correct |
26 |
Correct |
242 ms |
61212 KB |
Output is correct |
27 |
Correct |
169 ms |
50744 KB |
Output is correct |
28 |
Correct |
346 ms |
51292 KB |
Output is correct |
29 |
Correct |
327 ms |
51916 KB |
Output is correct |
30 |
Correct |
305 ms |
53336 KB |
Output is correct |
31 |
Correct |
179 ms |
50692 KB |
Output is correct |
32 |
Correct |
343 ms |
52920 KB |
Output is correct |
33 |
Correct |
310 ms |
48016 KB |
Output is correct |
34 |
Correct |
377 ms |
105320 KB |
Output is correct |
35 |
Correct |
333 ms |
98596 KB |
Output is correct |
36 |
Correct |
226 ms |
74836 KB |
Output is correct |
37 |
Correct |
204 ms |
69148 KB |
Output is correct |
38 |
Correct |
277 ms |
46720 KB |
Output is correct |
39 |
Correct |
181 ms |
49828 KB |
Output is correct |
40 |
Correct |
246 ms |
47640 KB |
Output is correct |
41 |
Correct |
205 ms |
45228 KB |
Output is correct |
42 |
Correct |
319 ms |
51372 KB |
Output is correct |
43 |
Correct |
357 ms |
51344 KB |
Output is correct |
44 |
Correct |
406 ms |
52176 KB |
Output is correct |
45 |
Correct |
385 ms |
52060 KB |
Output is correct |
46 |
Correct |
398 ms |
52424 KB |
Output is correct |
47 |
Correct |
410 ms |
52560 KB |
Output is correct |
48 |
Correct |
415 ms |
52496 KB |
Output is correct |
49 |
Correct |
280 ms |
62480 KB |
Output is correct |
50 |
Correct |
337 ms |
48340 KB |
Output is correct |
51 |
Correct |
373 ms |
52776 KB |
Output is correct |
52 |
Correct |
330 ms |
51180 KB |
Output is correct |
53 |
Correct |
3 ms |
6612 KB |
Output is correct |
54 |
Correct |
413 ms |
53140 KB |
Output is correct |
55 |
Correct |
373 ms |
53272 KB |
Output is correct |
56 |
Correct |
393 ms |
54036 KB |
Output is correct |
57 |
Correct |
445 ms |
57388 KB |
Output is correct |
58 |
Correct |
384 ms |
57988 KB |
Output is correct |
59 |
Correct |
338 ms |
60052 KB |
Output is correct |
60 |
Correct |
272 ms |
52880 KB |
Output is correct |
61 |
Correct |
325 ms |
66108 KB |
Output is correct |
62 |
Correct |
227 ms |
55472 KB |
Output is correct |
63 |
Correct |
359 ms |
52204 KB |
Output is correct |
64 |
Correct |
341 ms |
54244 KB |
Output is correct |
65 |
Correct |
313 ms |
58080 KB |
Output is correct |
66 |
Correct |
220 ms |
55432 KB |
Output is correct |
67 |
Correct |
434 ms |
54960 KB |
Output is correct |
68 |
Correct |
301 ms |
47996 KB |
Output is correct |
69 |
Correct |
412 ms |
108188 KB |
Output is correct |
70 |
Correct |
337 ms |
101100 KB |
Output is correct |
71 |
Correct |
226 ms |
73100 KB |
Output is correct |
72 |
Correct |
197 ms |
70136 KB |
Output is correct |
73 |
Correct |
276 ms |
46712 KB |
Output is correct |
74 |
Correct |
178 ms |
49780 KB |
Output is correct |
75 |
Correct |
234 ms |
47208 KB |
Output is correct |
76 |
Correct |
199 ms |
45196 KB |
Output is correct |
77 |
Correct |
266 ms |
51196 KB |
Output is correct |
78 |
Correct |
354 ms |
51968 KB |
Output is correct |
79 |
Correct |
459 ms |
57288 KB |
Output is correct |
80 |
Correct |
420 ms |
53316 KB |
Output is correct |
81 |
Correct |
426 ms |
56112 KB |
Output is correct |
82 |
Correct |
454 ms |
56872 KB |
Output is correct |
83 |
Correct |
461 ms |
56628 KB |
Output is correct |
84 |
Correct |
291 ms |
50468 KB |
Output is correct |
85 |
Correct |
316 ms |
48340 KB |
Output is correct |
86 |
Correct |
356 ms |
52464 KB |
Output is correct |
87 |
Correct |
337 ms |
52644 KB |
Output is correct |
88 |
Correct |
498 ms |
69992 KB |
Output is correct |
89 |
Correct |
3 ms |
6484 KB |
Output is correct |
90 |
Correct |
3 ms |
6612 KB |
Output is correct |
91 |
Correct |
3 ms |
6484 KB |
Output is correct |
92 |
Correct |
3 ms |
6584 KB |
Output is correct |
93 |
Correct |
3 ms |
6484 KB |
Output is correct |
94 |
Correct |
3 ms |
6568 KB |
Output is correct |
95 |
Correct |
3 ms |
6612 KB |
Output is correct |
96 |
Correct |
23 ms |
8860 KB |
Output is correct |
97 |
Correct |
20 ms |
8788 KB |
Output is correct |
98 |
Correct |
20 ms |
8612 KB |
Output is correct |
99 |
Correct |
25 ms |
8716 KB |
Output is correct |
100 |
Correct |
20 ms |
8772 KB |
Output is correct |
101 |
Correct |
21 ms |
8780 KB |
Output is correct |
102 |
Correct |
20 ms |
8788 KB |
Output is correct |
103 |
Correct |
20 ms |
8704 KB |
Output is correct |
104 |
Correct |
23 ms |
8788 KB |
Output is correct |
105 |
Correct |
27 ms |
9952 KB |
Output is correct |
106 |
Correct |
28 ms |
9972 KB |
Output is correct |
107 |
Correct |
39 ms |
11420 KB |
Output is correct |
108 |
Correct |
69 ms |
13528 KB |
Output is correct |
109 |
Correct |
70 ms |
14688 KB |
Output is correct |
110 |
Correct |
57 ms |
13516 KB |
Output is correct |
111 |
Correct |
105 ms |
18832 KB |
Output is correct |
112 |
Correct |
82 ms |
15028 KB |
Output is correct |
113 |
Correct |
22 ms |
9528 KB |
Output is correct |
114 |
Correct |
52 ms |
12832 KB |
Output is correct |
115 |
Correct |
28 ms |
10400 KB |
Output is correct |
116 |
Correct |
24 ms |
9428 KB |
Output is correct |
117 |
Correct |
22 ms |
9420 KB |
Output is correct |
118 |
Correct |
22 ms |
9392 KB |
Output is correct |
119 |
Correct |
20 ms |
8140 KB |
Output is correct |
120 |
Correct |
20 ms |
8268 KB |
Output is correct |
121 |
Correct |
23 ms |
9556 KB |
Output is correct |
122 |
Correct |
25 ms |
9812 KB |
Output is correct |
123 |
Correct |
42 ms |
12024 KB |
Output is correct |
124 |
Correct |
106 ms |
18800 KB |
Output is correct |
125 |
Correct |
420 ms |
55960 KB |
Output is correct |
126 |
Correct |
381 ms |
56204 KB |
Output is correct |
127 |
Correct |
439 ms |
57024 KB |
Output is correct |
128 |
Correct |
432 ms |
59612 KB |
Output is correct |
129 |
Correct |
409 ms |
59080 KB |
Output is correct |
130 |
Correct |
382 ms |
66012 KB |
Output is correct |
131 |
Correct |
328 ms |
62824 KB |
Output is correct |
132 |
Correct |
314 ms |
66112 KB |
Output is correct |
133 |
Correct |
244 ms |
55500 KB |
Output is correct |
134 |
Correct |
380 ms |
54964 KB |
Output is correct |
135 |
Correct |
387 ms |
56480 KB |
Output is correct |
136 |
Correct |
324 ms |
60988 KB |
Output is correct |
137 |
Correct |
231 ms |
55500 KB |
Output is correct |
138 |
Correct |
433 ms |
59780 KB |
Output is correct |
139 |
Correct |
328 ms |
50120 KB |
Output is correct |
140 |
Correct |
412 ms |
111104 KB |
Output is correct |
141 |
Correct |
363 ms |
101604 KB |
Output is correct |
142 |
Correct |
232 ms |
77368 KB |
Output is correct |
143 |
Correct |
235 ms |
71648 KB |
Output is correct |
144 |
Correct |
292 ms |
48608 KB |
Output is correct |
145 |
Correct |
199 ms |
52536 KB |
Output is correct |
146 |
Correct |
284 ms |
49988 KB |
Output is correct |
147 |
Correct |
233 ms |
46444 KB |
Output is correct |
148 |
Correct |
351 ms |
53424 KB |
Output is correct |
149 |
Correct |
433 ms |
54756 KB |
Output is correct |
150 |
Correct |
462 ms |
59824 KB |
Output is correct |
151 |
Correct |
396 ms |
56436 KB |
Output is correct |
152 |
Correct |
455 ms |
60056 KB |
Output is correct |
153 |
Correct |
462 ms |
60836 KB |
Output is correct |
154 |
Correct |
497 ms |
60504 KB |
Output is correct |
155 |
Correct |
300 ms |
61640 KB |
Output is correct |
156 |
Correct |
344 ms |
51232 KB |
Output is correct |
157 |
Correct |
359 ms |
55196 KB |
Output is correct |
158 |
Correct |
356 ms |
54260 KB |
Output is correct |
159 |
Correct |
543 ms |
73148 KB |
Output is correct |