Submission #440243

# Submission time Handle Problem Language Result Execution time Memory
440243 2021-07-01T19:38:46 Z DanerZein Fountain Parks (IOI21_parks) C++17
70 / 100
518 ms 51108 KB
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
const int MAX_N=2e5+10;
vector<vi> G;
int pa[MAX_N],tam[MAX_N];
bool vis[MAX_N];
vector<ii> ox[MAX_N],oy[MAX_N];
void init(int n){
  for(int i=0;i<n;i++){
    pa[i]=i; tam[i]=1;
  }
}
int findset(int i){
  if(pa[i]==i) return i;
  return pa[i]=findset(pa[i]);
}
bool issameset(int i,int j){
  return findset(i)==findset(j);
}
void unionset(int i,int j){
  if(!issameset(i,j)){
    int u=findset(i),v=findset(j);
    pa[u]=v;
    tam[v]+=tam[u];
  }
}
bool orden(iii a,iii b){
  if(a.second.second==b.second.second){
    return a.second.first<b.second.first;
  }
  return a.second.second<b.second.second;
}
int construct_roads(std::vector<int> x, std::vector<int> y) {
  int n=x.size();
  G.clear(); G.resize(n+1);
  for(int i=0;i<MAX_N;i++){
    ox[i].clear(); oy[i].clear();
  }
  memset(vis,0,sizeof vis);

  init(n);
  for(int i=0;i<n;i++){
    ox[x[i]].push_back(ii(y[i],i));
    oy[y[i]].push_back(ii(x[i],i));
  }
  for(int i=0;i<MAX_N;i++){
    sort(ox[i].begin(),ox[i].end());
    sort(oy[i].begin(),oy[i].end());
  }
  vector<int> ru,rv,ra,rb;
  if(n==1){
    build(ru,rv,ra,rb);
    return 1;
  }
  int id=-1;
  for(int i=0;i<MAX_N;i++){
    int a,b;
    for(int j=0;j<ox[i].size();j++){
      a=ox[i][j+1].second; b=ox[i][j].second;
      if(j+1!=ox[i].size() && ox[i][j+1].first-ox[i][j].first==2 && !issameset(a,b)){
	unionset(a,b);
	G[a].push_back(b);
	G[b].push_back(a);
      }
    }
    for(int j=0;j<oy[i].size();j++){
      if(id==-1){
	id=oy[i][j].second;
      }
      a=oy[i][j+1].second; b=oy[i][j].second;
      if(j+1!=oy[i].size() && oy[i][j+1].first-oy[i][j].first==2 && !issameset(a,b)){
	unionset(a,b);
	G[a].push_back(b);
	G[b].push_back(a);
      }
    }
  }
  if(tam[findset(0)]!=n) return 0;
  /*for(int i=0;i<n;i++){
    if(G[i].size()==1){
      id=i; break;
    }
  }*/
  queue<int> q; q.push(id);
  set<ii> ban; vis[id]=1;
  while(!q.empty()){
    int u; u=q.front();
    q.pop();
    int c=0;
    for(auto &v:G[u]){
      if(!vis[v]) c++;
    }
    while(c!=0){
      int id=-1;
      for(auto &v:G[u]){
	if(vis[v]) continue;
	id=v;
	int mid;
	if(x[u]==x[v]){
	  mid=(y[u]+y[v])/2;
	  if(ban.find(ii(x[u]+1,mid))!=ban.end() || ban.find(ii(x[u]-1,mid))!=ban.end()){
	    id=v; break;
	  }
	}
	else{
	  mid=(x[u]+x[v])/2;
	  if(ban.find(ii(mid,y[u]+1))!=ban.end() || ban.find(ii(mid,y[u]-1))!=ban.end()){
	    id=v; break;
	  }
	}
      }
      if(id==-1) break;
      vis[id]=1;
      int a,b,mid;
      if(x[u]==x[id]){
	mid=(y[u]+y[id])/2;
	if(ban.find(ii(x[u]-1,mid))==ban.end()){
	  a=x[u]-1; b=mid;
	}
	else{
	  a=x[u]+1; b=mid;
	}
      }
      else{
	mid=(x[u]+x[id])/2;
	if(ban.find(ii(mid,y[u]-1))==ban.end()){
	  a=mid; b=y[u]-1;
	}
	else{
	  a=mid; b=y[u]+1;

	}
      }
      ban.insert(ii(a,b));
      ru.push_back(u); rv.push_back(id);
      ra.push_back(a); rb.push_back(b);
      q.push(id);
      c--;
    }
  }
  build(ru,rv,ra,rb);
  return 1;
}

Compilation message

parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:62:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   62 |     for(int j=0;j<ox[i].size();j++){
      |                 ~^~~~~~~~~~~~~
parks.cpp:64:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   64 |       if(j+1!=ox[i].size() && ox[i][j+1].first-ox[i][j].first==2 && !issameset(a,b)){
      |          ~~~^~~~~~~~~~~~~~
parks.cpp:70:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   70 |     for(int j=0;j<oy[i].size();j++){
      |                 ~^~~~~~~~~~~~~
parks.cpp:75:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   75 |       if(j+1!=oy[i].size() && oy[i][j+1].first-oy[i][j].first==2 && !issameset(a,b)){
      |          ~~~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 8 ms 9804 KB Output is correct
2 Correct 7 ms 9880 KB Output is correct
3 Correct 8 ms 9804 KB Output is correct
4 Correct 7 ms 9804 KB Output is correct
5 Correct 9 ms 9804 KB Output is correct
6 Correct 8 ms 9804 KB Output is correct
7 Correct 9 ms 9804 KB Output is correct
8 Correct 8 ms 9804 KB Output is correct
9 Correct 194 ms 32388 KB Output is correct
10 Correct 19 ms 12236 KB Output is correct
11 Correct 76 ms 21904 KB Output is correct
12 Correct 26 ms 13300 KB Output is correct
13 Correct 27 ms 15020 KB Output is correct
14 Correct 10 ms 9932 KB Output is correct
15 Correct 9 ms 10060 KB Output is correct
16 Correct 174 ms 32416 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 9804 KB Output is correct
2 Correct 7 ms 9880 KB Output is correct
3 Correct 8 ms 9804 KB Output is correct
4 Correct 7 ms 9804 KB Output is correct
5 Correct 9 ms 9804 KB Output is correct
6 Correct 8 ms 9804 KB Output is correct
7 Correct 9 ms 9804 KB Output is correct
8 Correct 8 ms 9804 KB Output is correct
9 Correct 194 ms 32388 KB Output is correct
10 Correct 19 ms 12236 KB Output is correct
11 Correct 76 ms 21904 KB Output is correct
12 Correct 26 ms 13300 KB Output is correct
13 Correct 27 ms 15020 KB Output is correct
14 Correct 10 ms 9932 KB Output is correct
15 Correct 9 ms 10060 KB Output is correct
16 Correct 174 ms 32416 KB Output is correct
17 Correct 10 ms 9804 KB Output is correct
18 Correct 8 ms 9804 KB Output is correct
19 Correct 9 ms 9896 KB Output is correct
20 Correct 8 ms 9804 KB Output is correct
21 Correct 8 ms 9804 KB Output is correct
22 Correct 8 ms 9804 KB Output is correct
23 Correct 400 ms 49236 KB Output is correct
24 Correct 8 ms 9804 KB Output is correct
25 Correct 10 ms 10052 KB Output is correct
26 Correct 10 ms 10316 KB Output is correct
27 Correct 13 ms 10188 KB Output is correct
28 Correct 139 ms 25752 KB Output is correct
29 Correct 217 ms 33368 KB Output is correct
30 Correct 311 ms 41528 KB Output is correct
31 Correct 473 ms 49332 KB Output is correct
32 Correct 8 ms 9804 KB Output is correct
33 Correct 8 ms 9856 KB Output is correct
34 Correct 9 ms 9852 KB Output is correct
35 Correct 8 ms 9888 KB Output is correct
36 Correct 7 ms 9804 KB Output is correct
37 Correct 8 ms 9804 KB Output is correct
38 Correct 8 ms 9816 KB Output is correct
39 Correct 8 ms 9804 KB Output is correct
40 Correct 8 ms 9860 KB Output is correct
41 Correct 8 ms 9804 KB Output is correct
42 Correct 8 ms 9804 KB Output is correct
43 Correct 8 ms 10052 KB Output is correct
44 Correct 10 ms 10216 KB Output is correct
45 Correct 185 ms 30132 KB Output is correct
46 Correct 295 ms 40000 KB Output is correct
47 Correct 265 ms 40064 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 9804 KB Output is correct
2 Correct 7 ms 9880 KB Output is correct
3 Correct 8 ms 9804 KB Output is correct
4 Correct 7 ms 9804 KB Output is correct
5 Correct 9 ms 9804 KB Output is correct
6 Correct 8 ms 9804 KB Output is correct
7 Correct 9 ms 9804 KB Output is correct
8 Correct 8 ms 9804 KB Output is correct
9 Correct 194 ms 32388 KB Output is correct
10 Correct 19 ms 12236 KB Output is correct
11 Correct 76 ms 21904 KB Output is correct
12 Correct 26 ms 13300 KB Output is correct
13 Correct 27 ms 15020 KB Output is correct
14 Correct 10 ms 9932 KB Output is correct
15 Correct 9 ms 10060 KB Output is correct
16 Correct 174 ms 32416 KB Output is correct
17 Correct 10 ms 9804 KB Output is correct
18 Correct 8 ms 9804 KB Output is correct
19 Correct 9 ms 9896 KB Output is correct
20 Correct 8 ms 9804 KB Output is correct
21 Correct 8 ms 9804 KB Output is correct
22 Correct 8 ms 9804 KB Output is correct
23 Correct 400 ms 49236 KB Output is correct
24 Correct 8 ms 9804 KB Output is correct
25 Correct 10 ms 10052 KB Output is correct
26 Correct 10 ms 10316 KB Output is correct
27 Correct 13 ms 10188 KB Output is correct
28 Correct 139 ms 25752 KB Output is correct
29 Correct 217 ms 33368 KB Output is correct
30 Correct 311 ms 41528 KB Output is correct
31 Correct 473 ms 49332 KB Output is correct
32 Correct 8 ms 9804 KB Output is correct
33 Correct 8 ms 9856 KB Output is correct
34 Correct 9 ms 9852 KB Output is correct
35 Correct 8 ms 9888 KB Output is correct
36 Correct 7 ms 9804 KB Output is correct
37 Correct 8 ms 9804 KB Output is correct
38 Correct 8 ms 9816 KB Output is correct
39 Correct 8 ms 9804 KB Output is correct
40 Correct 8 ms 9860 KB Output is correct
41 Correct 8 ms 9804 KB Output is correct
42 Correct 8 ms 9804 KB Output is correct
43 Correct 8 ms 10052 KB Output is correct
44 Correct 10 ms 10216 KB Output is correct
45 Correct 185 ms 30132 KB Output is correct
46 Correct 295 ms 40000 KB Output is correct
47 Correct 265 ms 40064 KB Output is correct
48 Correct 8 ms 9804 KB Output is correct
49 Correct 8 ms 9804 KB Output is correct
50 Correct 8 ms 9804 KB Output is correct
51 Correct 9 ms 9824 KB Output is correct
52 Correct 9 ms 9932 KB Output is correct
53 Correct 9 ms 9804 KB Output is correct
54 Correct 8 ms 9804 KB Output is correct
55 Correct 386 ms 49504 KB Output is correct
56 Correct 8 ms 9804 KB Output is correct
57 Correct 11 ms 10208 KB Output is correct
58 Correct 17 ms 11160 KB Output is correct
59 Correct 14 ms 10912 KB Output is correct
60 Correct 182 ms 29660 KB Output is correct
61 Correct 299 ms 36892 KB Output is correct
62 Correct 356 ms 42504 KB Output is correct
63 Correct 397 ms 49512 KB Output is correct
64 Correct 8 ms 9888 KB Output is correct
65 Correct 9 ms 9804 KB Output is correct
66 Correct 7 ms 9804 KB Output is correct
67 Correct 398 ms 49240 KB Output is correct
68 Correct 509 ms 49260 KB Output is correct
69 Correct 416 ms 49168 KB Output is correct
70 Correct 10 ms 10316 KB Output is correct
71 Correct 17 ms 10700 KB Output is correct
72 Correct 184 ms 29836 KB Output is correct
73 Correct 300 ms 39584 KB Output is correct
74 Correct 398 ms 49684 KB Output is correct
75 Correct 516 ms 49280 KB Output is correct
76 Correct 399 ms 49276 KB Output is correct
77 Correct 11 ms 10316 KB Output is correct
78 Correct 13 ms 10788 KB Output is correct
79 Correct 196 ms 29612 KB Output is correct
80 Correct 298 ms 39428 KB Output is correct
81 Correct 409 ms 49572 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 9804 KB Output is correct
2 Correct 7 ms 9880 KB Output is correct
3 Correct 8 ms 9804 KB Output is correct
4 Correct 7 ms 9804 KB Output is correct
5 Correct 9 ms 9804 KB Output is correct
6 Correct 8 ms 9804 KB Output is correct
7 Correct 9 ms 9804 KB Output is correct
8 Correct 8 ms 9804 KB Output is correct
9 Correct 194 ms 32388 KB Output is correct
10 Correct 19 ms 12236 KB Output is correct
11 Correct 76 ms 21904 KB Output is correct
12 Correct 26 ms 13300 KB Output is correct
13 Correct 27 ms 15020 KB Output is correct
14 Correct 10 ms 9932 KB Output is correct
15 Correct 9 ms 10060 KB Output is correct
16 Correct 174 ms 32416 KB Output is correct
17 Correct 9 ms 9816 KB Output is correct
18 Correct 8 ms 9804 KB Output is correct
19 Correct 10 ms 9804 KB Output is correct
20 Correct 488 ms 50656 KB Output is correct
21 Correct 406 ms 49432 KB Output is correct
22 Correct 432 ms 49740 KB Output is correct
23 Correct 302 ms 43304 KB Output is correct
24 Correct 85 ms 23236 KB Output is correct
25 Correct 134 ms 29072 KB Output is correct
26 Correct 130 ms 29060 KB Output is correct
27 Correct 384 ms 47964 KB Output is correct
28 Correct 392 ms 47996 KB Output is correct
29 Correct 414 ms 48060 KB Output is correct
30 Correct 399 ms 47960 KB Output is correct
31 Correct 8 ms 9804 KB Output is correct
32 Correct 31 ms 12972 KB Output is correct
33 Correct 95 ms 20800 KB Output is correct
34 Correct 517 ms 50660 KB Output is correct
35 Correct 16 ms 10828 KB Output is correct
36 Correct 44 ms 14884 KB Output is correct
37 Correct 73 ms 20068 KB Output is correct
38 Correct 176 ms 25344 KB Output is correct
39 Correct 228 ms 31484 KB Output is correct
40 Correct 300 ms 37612 KB Output is correct
41 Correct 408 ms 43380 KB Output is correct
42 Correct 475 ms 48788 KB Output is correct
43 Correct 9 ms 9848 KB Output is correct
44 Correct 9 ms 9804 KB Output is correct
45 Correct 8 ms 9804 KB Output is correct
46 Correct 9 ms 9804 KB Output is correct
47 Correct 8 ms 9804 KB Output is correct
48 Correct 8 ms 9816 KB Output is correct
49 Correct 8 ms 9804 KB Output is correct
50 Correct 8 ms 9804 KB Output is correct
51 Correct 9 ms 9804 KB Output is correct
52 Correct 8 ms 9804 KB Output is correct
53 Correct 9 ms 9804 KB Output is correct
54 Correct 9 ms 10096 KB Output is correct
55 Correct 10 ms 10188 KB Output is correct
56 Correct 181 ms 30132 KB Output is correct
57 Correct 301 ms 39924 KB Output is correct
58 Correct 271 ms 39992 KB Output is correct
59 Correct 9 ms 9804 KB Output is correct
60 Correct 8 ms 9804 KB Output is correct
61 Correct 9 ms 9920 KB Output is correct
62 Correct 387 ms 49248 KB Output is correct
63 Correct 398 ms 49248 KB Output is correct
64 Correct 409 ms 49140 KB Output is correct
65 Correct 11 ms 10316 KB Output is correct
66 Correct 14 ms 10648 KB Output is correct
67 Correct 189 ms 29744 KB Output is correct
68 Correct 322 ms 39636 KB Output is correct
69 Correct 518 ms 49656 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 9804 KB Output is correct
2 Correct 7 ms 9880 KB Output is correct
3 Correct 8 ms 9804 KB Output is correct
4 Correct 7 ms 9804 KB Output is correct
5 Correct 9 ms 9804 KB Output is correct
6 Correct 8 ms 9804 KB Output is correct
7 Correct 9 ms 9804 KB Output is correct
8 Correct 8 ms 9804 KB Output is correct
9 Correct 194 ms 32388 KB Output is correct
10 Correct 19 ms 12236 KB Output is correct
11 Correct 76 ms 21904 KB Output is correct
12 Correct 26 ms 13300 KB Output is correct
13 Correct 27 ms 15020 KB Output is correct
14 Correct 10 ms 9932 KB Output is correct
15 Correct 9 ms 10060 KB Output is correct
16 Correct 174 ms 32416 KB Output is correct
17 Correct 442 ms 49052 KB Output is correct
18 Correct 432 ms 49080 KB Output is correct
19 Correct 500 ms 49356 KB Output is correct
20 Correct 428 ms 46848 KB Output is correct
21 Correct 411 ms 44588 KB Output is correct
22 Correct 8 ms 9804 KB Output is correct
23 Correct 65 ms 16252 KB Output is correct
24 Correct 21 ms 11852 KB Output is correct
25 Correct 63 ms 16912 KB Output is correct
26 Correct 93 ms 22040 KB Output is correct
27 Correct 223 ms 29728 KB Output is correct
28 Correct 250 ms 34552 KB Output is correct
29 Correct 347 ms 39320 KB Output is correct
30 Correct 374 ms 43928 KB Output is correct
31 Correct 468 ms 48664 KB Output is correct
32 Correct 413 ms 49380 KB Output is correct
33 Correct 397 ms 49204 KB Output is correct
34 Correct 12 ms 10316 KB Output is correct
35 Correct 14 ms 10828 KB Output is correct
36 Correct 215 ms 29616 KB Output is correct
37 Correct 294 ms 39496 KB Output is correct
38 Correct 426 ms 49552 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 9804 KB Output is correct
2 Correct 7 ms 9880 KB Output is correct
3 Correct 8 ms 9804 KB Output is correct
4 Correct 7 ms 9804 KB Output is correct
5 Correct 9 ms 9804 KB Output is correct
6 Correct 8 ms 9804 KB Output is correct
7 Correct 9 ms 9804 KB Output is correct
8 Correct 8 ms 9804 KB Output is correct
9 Correct 194 ms 32388 KB Output is correct
10 Correct 19 ms 12236 KB Output is correct
11 Correct 76 ms 21904 KB Output is correct
12 Correct 26 ms 13300 KB Output is correct
13 Correct 27 ms 15020 KB Output is correct
14 Correct 10 ms 9932 KB Output is correct
15 Correct 9 ms 10060 KB Output is correct
16 Correct 174 ms 32416 KB Output is correct
17 Correct 10 ms 9804 KB Output is correct
18 Correct 8 ms 9804 KB Output is correct
19 Correct 9 ms 9896 KB Output is correct
20 Correct 8 ms 9804 KB Output is correct
21 Correct 8 ms 9804 KB Output is correct
22 Correct 8 ms 9804 KB Output is correct
23 Correct 400 ms 49236 KB Output is correct
24 Correct 8 ms 9804 KB Output is correct
25 Correct 10 ms 10052 KB Output is correct
26 Correct 10 ms 10316 KB Output is correct
27 Correct 13 ms 10188 KB Output is correct
28 Correct 139 ms 25752 KB Output is correct
29 Correct 217 ms 33368 KB Output is correct
30 Correct 311 ms 41528 KB Output is correct
31 Correct 473 ms 49332 KB Output is correct
32 Correct 8 ms 9804 KB Output is correct
33 Correct 8 ms 9856 KB Output is correct
34 Correct 9 ms 9852 KB Output is correct
35 Correct 8 ms 9888 KB Output is correct
36 Correct 7 ms 9804 KB Output is correct
37 Correct 8 ms 9804 KB Output is correct
38 Correct 8 ms 9816 KB Output is correct
39 Correct 8 ms 9804 KB Output is correct
40 Correct 8 ms 9860 KB Output is correct
41 Correct 8 ms 9804 KB Output is correct
42 Correct 8 ms 9804 KB Output is correct
43 Correct 8 ms 10052 KB Output is correct
44 Correct 10 ms 10216 KB Output is correct
45 Correct 185 ms 30132 KB Output is correct
46 Correct 295 ms 40000 KB Output is correct
47 Correct 265 ms 40064 KB Output is correct
48 Correct 8 ms 9804 KB Output is correct
49 Correct 8 ms 9804 KB Output is correct
50 Correct 8 ms 9804 KB Output is correct
51 Correct 9 ms 9824 KB Output is correct
52 Correct 9 ms 9932 KB Output is correct
53 Correct 9 ms 9804 KB Output is correct
54 Correct 8 ms 9804 KB Output is correct
55 Correct 386 ms 49504 KB Output is correct
56 Correct 8 ms 9804 KB Output is correct
57 Correct 11 ms 10208 KB Output is correct
58 Correct 17 ms 11160 KB Output is correct
59 Correct 14 ms 10912 KB Output is correct
60 Correct 182 ms 29660 KB Output is correct
61 Correct 299 ms 36892 KB Output is correct
62 Correct 356 ms 42504 KB Output is correct
63 Correct 397 ms 49512 KB Output is correct
64 Correct 8 ms 9888 KB Output is correct
65 Correct 9 ms 9804 KB Output is correct
66 Correct 7 ms 9804 KB Output is correct
67 Correct 398 ms 49240 KB Output is correct
68 Correct 509 ms 49260 KB Output is correct
69 Correct 416 ms 49168 KB Output is correct
70 Correct 10 ms 10316 KB Output is correct
71 Correct 17 ms 10700 KB Output is correct
72 Correct 184 ms 29836 KB Output is correct
73 Correct 300 ms 39584 KB Output is correct
74 Correct 398 ms 49684 KB Output is correct
75 Correct 516 ms 49280 KB Output is correct
76 Correct 399 ms 49276 KB Output is correct
77 Correct 11 ms 10316 KB Output is correct
78 Correct 13 ms 10788 KB Output is correct
79 Correct 196 ms 29612 KB Output is correct
80 Correct 298 ms 39428 KB Output is correct
81 Correct 409 ms 49572 KB Output is correct
82 Correct 9 ms 9816 KB Output is correct
83 Correct 8 ms 9804 KB Output is correct
84 Correct 10 ms 9804 KB Output is correct
85 Correct 488 ms 50656 KB Output is correct
86 Correct 406 ms 49432 KB Output is correct
87 Correct 432 ms 49740 KB Output is correct
88 Correct 302 ms 43304 KB Output is correct
89 Correct 85 ms 23236 KB Output is correct
90 Correct 134 ms 29072 KB Output is correct
91 Correct 130 ms 29060 KB Output is correct
92 Correct 384 ms 47964 KB Output is correct
93 Correct 392 ms 47996 KB Output is correct
94 Correct 414 ms 48060 KB Output is correct
95 Correct 399 ms 47960 KB Output is correct
96 Correct 8 ms 9804 KB Output is correct
97 Correct 31 ms 12972 KB Output is correct
98 Correct 95 ms 20800 KB Output is correct
99 Correct 517 ms 50660 KB Output is correct
100 Correct 16 ms 10828 KB Output is correct
101 Correct 44 ms 14884 KB Output is correct
102 Correct 73 ms 20068 KB Output is correct
103 Correct 176 ms 25344 KB Output is correct
104 Correct 228 ms 31484 KB Output is correct
105 Correct 300 ms 37612 KB Output is correct
106 Correct 408 ms 43380 KB Output is correct
107 Correct 475 ms 48788 KB Output is correct
108 Correct 9 ms 9848 KB Output is correct
109 Correct 9 ms 9804 KB Output is correct
110 Correct 8 ms 9804 KB Output is correct
111 Correct 9 ms 9804 KB Output is correct
112 Correct 8 ms 9804 KB Output is correct
113 Correct 8 ms 9816 KB Output is correct
114 Correct 8 ms 9804 KB Output is correct
115 Correct 8 ms 9804 KB Output is correct
116 Correct 9 ms 9804 KB Output is correct
117 Correct 8 ms 9804 KB Output is correct
118 Correct 9 ms 9804 KB Output is correct
119 Correct 9 ms 10096 KB Output is correct
120 Correct 10 ms 10188 KB Output is correct
121 Correct 181 ms 30132 KB Output is correct
122 Correct 301 ms 39924 KB Output is correct
123 Correct 271 ms 39992 KB Output is correct
124 Correct 9 ms 9804 KB Output is correct
125 Correct 8 ms 9804 KB Output is correct
126 Correct 9 ms 9920 KB Output is correct
127 Correct 387 ms 49248 KB Output is correct
128 Correct 398 ms 49248 KB Output is correct
129 Correct 409 ms 49140 KB Output is correct
130 Correct 11 ms 10316 KB Output is correct
131 Correct 14 ms 10648 KB Output is correct
132 Correct 189 ms 29744 KB Output is correct
133 Correct 322 ms 39636 KB Output is correct
134 Correct 518 ms 49656 KB Output is correct
135 Correct 442 ms 49052 KB Output is correct
136 Correct 432 ms 49080 KB Output is correct
137 Correct 500 ms 49356 KB Output is correct
138 Correct 428 ms 46848 KB Output is correct
139 Correct 411 ms 44588 KB Output is correct
140 Correct 8 ms 9804 KB Output is correct
141 Correct 65 ms 16252 KB Output is correct
142 Correct 21 ms 11852 KB Output is correct
143 Correct 63 ms 16912 KB Output is correct
144 Correct 93 ms 22040 KB Output is correct
145 Correct 223 ms 29728 KB Output is correct
146 Correct 250 ms 34552 KB Output is correct
147 Correct 347 ms 39320 KB Output is correct
148 Correct 374 ms 43928 KB Output is correct
149 Correct 468 ms 48664 KB Output is correct
150 Correct 413 ms 49380 KB Output is correct
151 Correct 397 ms 49204 KB Output is correct
152 Correct 12 ms 10316 KB Output is correct
153 Correct 14 ms 10828 KB Output is correct
154 Correct 215 ms 29616 KB Output is correct
155 Correct 294 ms 39496 KB Output is correct
156 Correct 426 ms 49552 KB Output is correct
157 Correct 9 ms 9804 KB Output is correct
158 Correct 8 ms 9804 KB Output is correct
159 Correct 8 ms 9804 KB Output is correct
160 Correct 8 ms 9804 KB Output is correct
161 Correct 461 ms 47956 KB Output is correct
162 Correct 476 ms 50584 KB Output is correct
163 Correct 462 ms 51036 KB Output is correct
164 Correct 465 ms 51108 KB Output is correct
165 Correct 393 ms 50752 KB Output is correct
166 Correct 359 ms 50636 KB Output is correct
167 Incorrect 83 ms 18872 KB Tree @(185719, 20663) appears more than once: for edges on positions 43 and 44
168 Halted 0 ms 0 KB -