답안 #614373

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
614373 2022-07-31T02:33:45 Z DanerZein 분수 공원 (IOI21_parks) C++17
70 / 100
1353 ms 116544 KB
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
const int MAX_N=2e5+10;
struct point{
  int x,y,id;
  point(int xx,int yy,int ii){
    x=xx;
    y=yy;
    id=ii;
  }
  ii coord(){
    return ii(x,y);
  }
};
struct Road{
  int u,v,id;
  bool hor;
  Road(int uu,int vv,int ii,bool h){
    u=uu; v=vv; id=ii; hor=h;
  }
};
int pa[MAX_N];
int n;
vector<point> foun;
vector<Road> road;
int X[5]={0,1,0,-1};
int Y[5]={-1,0,1,0};
int ns=0;
void init(int n){
  for(int i=0;i<n;i++) pa[i]=i;
  ns=n;
}
int findset(int u){
  return pa[u]==u?u:pa[u]=findset(pa[u]);
}
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;
    ns--;
  }
}
set<ii> us;
vector<ii> puntosChoque(int id){
  vector<ii> pu;
  ii f1=foun[road[id].u].coord();
  ii f2=foun[road[id].v].coord();
  int x,y;
  if(f1.second==f2.second){
    x=(f1.first+f2.first)/2;
    y=f1.second;
  }
  else{
    x=f1.first;
    y=(f1.second+f2.second)/2;
  }
  for(int i=0;i<4;i++){
    int xk=x+X[i];
    int yk=y+Y[i];
    if(us.find(ii(xk,yk))!=us.end()) continue;
    if(ii(xk,yk)!=f1 && ii(xk,yk)!=f2)
      pu.push_back(ii(xk,yk));
  }
  return pu;
}
bool canConnect(point u,point v){
  return !issameset(u.id,v.id) && (((u.x==v.x && abs(u.y-v.y)==2)) || ((u.y==v.y && abs(u.x-v.x)==2)));
}
bool don[MAX_N];
bool sortX(point a,point b){
  return a.x!=b.x ? a.x<b.x: a.y<b.y;
}
bool sortY(point a,point b){
  return a.y!=b.y ? a.y<b.y : a.x<b.x;
}
bool origin(point a,point b){
  return a.id<b.id;
}
int be;
map<ii,int> punid;
map<int,ii> idpun;
map<int,vi> conbe;
void choque(int id){
  vector<ii> pu=puntosChoque(id);
  for(int i=0;i<pu.size();i++){
    if(punid.find(pu[i])==punid.end()){
      punid[pu[i]]=be;
      idpun[id]=pu[i];
      be++;
    }
    conbe[punid[pu[i]]].push_back(id);
  }
}
int construct_roads(std::vector<int> x, std::vector<int> y) {
  n=x.size();
  for(int i=0;i<n;i++){
    foun.push_back(point(x[i],y[i],i));
  }
  init(n);
  sort(foun.begin(),foun.end(),sortX);
  vector<int> ua,va;
  for(int i=0;i<n-1;i++){
    if(canConnect(foun[i],foun[i+1])){
      unionset(foun[i].id,foun[i+1].id);
      ua.push_back(foun[i].id);
      va.push_back(foun[i+1].id);
      road.push_back(Road(foun[i].id,foun[i+1].id,road.size(),0));
    }
  }
  sort(foun.begin(),foun.end(),sortY);
  for(int i=0;i<n-1;i++){
    if(canConnect(foun[i],foun[i+1])){
      unionset(foun[i].id,foun[i+1].id);
      ua.push_back(foun[i].id);
      va.push_back(foun[i+1].id);  
      road.push_back(Road(foun[i].id,foun[i+1].id,road.size(),1));
    }
  }
  sort(foun.begin(),foun.end(),origin);
  if(ns!=1) return 0;
  be=road.size();
  for(int i=0;i<road.size();i++) choque(i);
  priority_queue<ii, vector<ii>, greater<ii> > pq;
  for(int i=0;i<road.size();i++){
    int pro=0;
    vector<ii> pu=puntosChoque(i);
    for(int j=0;j<pu.size();j++){
      int v=punid[pu[j]];
      pq.push(ii(conbe[v].size(),i));
    }
  }
  /*for(int i=0;i<road.size();i++){
    cout<<road[i].u<<" "<<road[i].v<<endl;
  }*/
  int t=road.size();
  vector<int> a(t),b(t);
  while(!pq.empty()){
    int i=pq.top().second;
    pq.pop();
    if(don[i]) continue;
    vector<ii> pu=puntosChoque(i);
    int iu=0;
    //cout<<i<<": \n";
    for(int j=0;j<pu.size();j++){
      int u=punid[pu[j]];
      int vis=0;
      //cout<<pu[j].first<<" "<<pu[j].second<<":\n";
      for(auto &v:conbe[u]){
	//	cout<<v<<endl;
	if(!don[v]) vis++;
      }
      if(vis==1){
	iu=j;
	break;
      }
    }
    don[i]=1;
    // cout<<endl;
    us.insert(pu[iu]);
    a[i]=pu[iu].first; b[i]=pu[iu].second;
    for(int j=0;j<pu.size();j++){
      int vis=0;
      int u=punid[pu[j]];
      int id=-1;
      for(auto &v:conbe[u]){
	if(!don[v]){
	  id=v;
	  vis++;
	}
      }
      if(vis==1){
	pq.push(ii(1,id));
      }
    }
  }
  build(ua,va,a,b);
  return 1;
}

Compilation message

parks.cpp: In function 'void choque(int)':
parks.cpp:92:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   92 |   for(int i=0;i<pu.size();i++){
      |               ~^~~~~~~~~~
parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:129:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Road>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  129 |   for(int i=0;i<road.size();i++) choque(i);
      |               ~^~~~~~~~~~~~
parks.cpp:131:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Road>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  131 |   for(int i=0;i<road.size();i++){
      |               ~^~~~~~~~~~~~
parks.cpp:134: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]
  134 |     for(int j=0;j<pu.size();j++){
      |                 ~^~~~~~~~~~
parks.cpp:132:9: warning: unused variable 'pro' [-Wunused-variable]
  132 |     int pro=0;
      |         ^~~
parks.cpp:151: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]
  151 |     for(int j=0;j<pu.size();j++){
      |                 ~^~~~~~~~~~
parks.cpp:168: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]
  168 |     for(int j=0;j<pu.size();j++){
      |                 ~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 500 ms 58012 KB Output is correct
10 Correct 33 ms 6016 KB Output is correct
11 Correct 238 ms 31312 KB Output is correct
12 Correct 73 ms 8856 KB Output is correct
13 Correct 20 ms 3640 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 498 ms 58008 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 500 ms 58012 KB Output is correct
10 Correct 33 ms 6016 KB Output is correct
11 Correct 238 ms 31312 KB Output is correct
12 Correct 73 ms 8856 KB Output is correct
13 Correct 20 ms 3640 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 498 ms 58008 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 224 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 1096 ms 97364 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 4 ms 852 KB Output is correct
26 Correct 2 ms 468 KB Output is correct
27 Correct 2 ms 596 KB Output is correct
28 Correct 372 ms 39204 KB Output is correct
29 Correct 626 ms 58552 KB Output is correct
30 Correct 864 ms 78116 KB Output is correct
31 Correct 1176 ms 97400 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 308 KB Output is correct
37 Correct 1 ms 308 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 1 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 1 ms 452 KB Output is correct
44 Correct 2 ms 468 KB Output is correct
45 Correct 482 ms 45040 KB Output is correct
46 Correct 763 ms 65460 KB Output is correct
47 Correct 737 ms 65464 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 500 ms 58012 KB Output is correct
10 Correct 33 ms 6016 KB Output is correct
11 Correct 238 ms 31312 KB Output is correct
12 Correct 73 ms 8856 KB Output is correct
13 Correct 20 ms 3640 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 498 ms 58008 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 224 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 1096 ms 97364 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 4 ms 852 KB Output is correct
26 Correct 2 ms 468 KB Output is correct
27 Correct 2 ms 596 KB Output is correct
28 Correct 372 ms 39204 KB Output is correct
29 Correct 626 ms 58552 KB Output is correct
30 Correct 864 ms 78116 KB Output is correct
31 Correct 1176 ms 97400 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 308 KB Output is correct
37 Correct 1 ms 308 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 1 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 1 ms 452 KB Output is correct
44 Correct 2 ms 468 KB Output is correct
45 Correct 482 ms 45040 KB Output is correct
46 Correct 763 ms 65460 KB Output is correct
47 Correct 737 ms 65464 KB Output is correct
48 Correct 0 ms 212 KB Output is correct
49 Correct 1 ms 308 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 308 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 1110 ms 92908 KB Output is correct
56 Correct 1 ms 212 KB Output is correct
57 Correct 7 ms 1108 KB Output is correct
58 Correct 20 ms 3112 KB Output is correct
59 Correct 5 ms 1160 KB Output is correct
60 Correct 469 ms 46692 KB Output is correct
61 Correct 715 ms 63124 KB Output is correct
62 Correct 865 ms 76948 KB Output is correct
63 Correct 1055 ms 92940 KB Output is correct
64 Correct 1 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 1 ms 212 KB Output is correct
67 Correct 1109 ms 116224 KB Output is correct
68 Correct 1095 ms 116544 KB Output is correct
69 Correct 1066 ms 115136 KB Output is correct
70 Correct 3 ms 596 KB Output is correct
71 Correct 5 ms 852 KB Output is correct
72 Correct 486 ms 44064 KB Output is correct
73 Correct 770 ms 66344 KB Output is correct
74 Correct 1092 ms 88228 KB Output is correct
75 Correct 1039 ms 99780 KB Output is correct
76 Correct 1110 ms 116276 KB Output is correct
77 Correct 3 ms 724 KB Output is correct
78 Correct 6 ms 1048 KB Output is correct
79 Correct 469 ms 45860 KB Output is correct
80 Correct 761 ms 69260 KB Output is correct
81 Correct 1048 ms 91808 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 500 ms 58012 KB Output is correct
10 Correct 33 ms 6016 KB Output is correct
11 Correct 238 ms 31312 KB Output is correct
12 Correct 73 ms 8856 KB Output is correct
13 Correct 20 ms 3640 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 498 ms 58008 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 296 KB Output is correct
20 Correct 884 ms 75764 KB Output is correct
21 Correct 899 ms 75112 KB Output is correct
22 Correct 953 ms 75244 KB Output is correct
23 Correct 826 ms 98896 KB Output is correct
24 Correct 131 ms 8380 KB Output is correct
25 Correct 119 ms 15860 KB Output is correct
26 Correct 127 ms 15852 KB Output is correct
27 Correct 1066 ms 114828 KB Output is correct
28 Correct 881 ms 114912 KB Output is correct
29 Correct 1026 ms 114820 KB Output is correct
30 Correct 1056 ms 114976 KB Output is correct
31 Correct 0 ms 212 KB Output is correct
32 Correct 62 ms 6768 KB Output is correct
33 Correct 50 ms 4824 KB Output is correct
34 Correct 908 ms 84264 KB Output is correct
35 Correct 6 ms 1176 KB Output is correct
36 Correct 31 ms 4296 KB Output is correct
37 Correct 63 ms 8492 KB Output is correct
38 Correct 509 ms 34040 KB Output is correct
39 Correct 687 ms 46292 KB Output is correct
40 Correct 878 ms 59412 KB Output is correct
41 Correct 1100 ms 71896 KB Output is correct
42 Correct 1353 ms 84320 KB Output is correct
43 Correct 1 ms 212 KB Output is correct
44 Correct 0 ms 212 KB Output is correct
45 Correct 1 ms 212 KB Output is correct
46 Correct 1 ms 212 KB Output is correct
47 Correct 1 ms 212 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 2 ms 468 KB Output is correct
55 Correct 2 ms 468 KB Output is correct
56 Correct 467 ms 45052 KB Output is correct
57 Correct 717 ms 65476 KB Output is correct
58 Correct 708 ms 65512 KB Output is correct
59 Correct 0 ms 212 KB Output is correct
60 Correct 1 ms 212 KB Output is correct
61 Correct 1 ms 212 KB Output is correct
62 Correct 1052 ms 116376 KB Output is correct
63 Correct 1081 ms 116268 KB Output is correct
64 Correct 1033 ms 115156 KB Output is correct
65 Correct 3 ms 596 KB Output is correct
66 Correct 4 ms 980 KB Output is correct
67 Correct 475 ms 44116 KB Output is correct
68 Correct 742 ms 66304 KB Output is correct
69 Correct 1022 ms 87996 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 500 ms 58012 KB Output is correct
10 Correct 33 ms 6016 KB Output is correct
11 Correct 238 ms 31312 KB Output is correct
12 Correct 73 ms 8856 KB Output is correct
13 Correct 20 ms 3640 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 498 ms 58008 KB Output is correct
17 Correct 1016 ms 113996 KB Output is correct
18 Correct 991 ms 114180 KB Output is correct
19 Correct 882 ms 73048 KB Output is correct
20 Correct 1058 ms 84788 KB Output is correct
21 Correct 937 ms 91748 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 144 ms 14140 KB Output is correct
24 Correct 12 ms 2120 KB Output is correct
25 Correct 43 ms 7264 KB Output is correct
26 Correct 72 ms 9380 KB Output is correct
27 Correct 626 ms 44084 KB Output is correct
28 Correct 789 ms 55224 KB Output is correct
29 Correct 947 ms 66552 KB Output is correct
30 Correct 1131 ms 76868 KB Output is correct
31 Correct 1304 ms 87848 KB Output is correct
32 Correct 1000 ms 99732 KB Output is correct
33 Correct 1093 ms 116220 KB Output is correct
34 Correct 3 ms 724 KB Output is correct
35 Correct 5 ms 1048 KB Output is correct
36 Correct 478 ms 45944 KB Output is correct
37 Correct 731 ms 69400 KB Output is correct
38 Correct 999 ms 91904 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 500 ms 58012 KB Output is correct
10 Correct 33 ms 6016 KB Output is correct
11 Correct 238 ms 31312 KB Output is correct
12 Correct 73 ms 8856 KB Output is correct
13 Correct 20 ms 3640 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 498 ms 58008 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 224 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 1096 ms 97364 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 4 ms 852 KB Output is correct
26 Correct 2 ms 468 KB Output is correct
27 Correct 2 ms 596 KB Output is correct
28 Correct 372 ms 39204 KB Output is correct
29 Correct 626 ms 58552 KB Output is correct
30 Correct 864 ms 78116 KB Output is correct
31 Correct 1176 ms 97400 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 308 KB Output is correct
37 Correct 1 ms 308 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 1 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 1 ms 452 KB Output is correct
44 Correct 2 ms 468 KB Output is correct
45 Correct 482 ms 45040 KB Output is correct
46 Correct 763 ms 65460 KB Output is correct
47 Correct 737 ms 65464 KB Output is correct
48 Correct 0 ms 212 KB Output is correct
49 Correct 1 ms 308 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 308 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 1110 ms 92908 KB Output is correct
56 Correct 1 ms 212 KB Output is correct
57 Correct 7 ms 1108 KB Output is correct
58 Correct 20 ms 3112 KB Output is correct
59 Correct 5 ms 1160 KB Output is correct
60 Correct 469 ms 46692 KB Output is correct
61 Correct 715 ms 63124 KB Output is correct
62 Correct 865 ms 76948 KB Output is correct
63 Correct 1055 ms 92940 KB Output is correct
64 Correct 1 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 1 ms 212 KB Output is correct
67 Correct 1109 ms 116224 KB Output is correct
68 Correct 1095 ms 116544 KB Output is correct
69 Correct 1066 ms 115136 KB Output is correct
70 Correct 3 ms 596 KB Output is correct
71 Correct 5 ms 852 KB Output is correct
72 Correct 486 ms 44064 KB Output is correct
73 Correct 770 ms 66344 KB Output is correct
74 Correct 1092 ms 88228 KB Output is correct
75 Correct 1039 ms 99780 KB Output is correct
76 Correct 1110 ms 116276 KB Output is correct
77 Correct 3 ms 724 KB Output is correct
78 Correct 6 ms 1048 KB Output is correct
79 Correct 469 ms 45860 KB Output is correct
80 Correct 761 ms 69260 KB Output is correct
81 Correct 1048 ms 91808 KB Output is correct
82 Correct 0 ms 212 KB Output is correct
83 Correct 1 ms 212 KB Output is correct
84 Correct 1 ms 296 KB Output is correct
85 Correct 884 ms 75764 KB Output is correct
86 Correct 899 ms 75112 KB Output is correct
87 Correct 953 ms 75244 KB Output is correct
88 Correct 826 ms 98896 KB Output is correct
89 Correct 131 ms 8380 KB Output is correct
90 Correct 119 ms 15860 KB Output is correct
91 Correct 127 ms 15852 KB Output is correct
92 Correct 1066 ms 114828 KB Output is correct
93 Correct 881 ms 114912 KB Output is correct
94 Correct 1026 ms 114820 KB Output is correct
95 Correct 1056 ms 114976 KB Output is correct
96 Correct 0 ms 212 KB Output is correct
97 Correct 62 ms 6768 KB Output is correct
98 Correct 50 ms 4824 KB Output is correct
99 Correct 908 ms 84264 KB Output is correct
100 Correct 6 ms 1176 KB Output is correct
101 Correct 31 ms 4296 KB Output is correct
102 Correct 63 ms 8492 KB Output is correct
103 Correct 509 ms 34040 KB Output is correct
104 Correct 687 ms 46292 KB Output is correct
105 Correct 878 ms 59412 KB Output is correct
106 Correct 1100 ms 71896 KB Output is correct
107 Correct 1353 ms 84320 KB Output is correct
108 Correct 1 ms 212 KB Output is correct
109 Correct 0 ms 212 KB Output is correct
110 Correct 1 ms 212 KB Output is correct
111 Correct 1 ms 212 KB Output is correct
112 Correct 1 ms 212 KB Output is correct
113 Correct 1 ms 212 KB Output is correct
114 Correct 1 ms 212 KB Output is correct
115 Correct 1 ms 212 KB Output is correct
116 Correct 1 ms 212 KB Output is correct
117 Correct 1 ms 212 KB Output is correct
118 Correct 1 ms 212 KB Output is correct
119 Correct 2 ms 468 KB Output is correct
120 Correct 2 ms 468 KB Output is correct
121 Correct 467 ms 45052 KB Output is correct
122 Correct 717 ms 65476 KB Output is correct
123 Correct 708 ms 65512 KB Output is correct
124 Correct 0 ms 212 KB Output is correct
125 Correct 1 ms 212 KB Output is correct
126 Correct 1 ms 212 KB Output is correct
127 Correct 1052 ms 116376 KB Output is correct
128 Correct 1081 ms 116268 KB Output is correct
129 Correct 1033 ms 115156 KB Output is correct
130 Correct 3 ms 596 KB Output is correct
131 Correct 4 ms 980 KB Output is correct
132 Correct 475 ms 44116 KB Output is correct
133 Correct 742 ms 66304 KB Output is correct
134 Correct 1022 ms 87996 KB Output is correct
135 Correct 1016 ms 113996 KB Output is correct
136 Correct 991 ms 114180 KB Output is correct
137 Correct 882 ms 73048 KB Output is correct
138 Correct 1058 ms 84788 KB Output is correct
139 Correct 937 ms 91748 KB Output is correct
140 Correct 0 ms 212 KB Output is correct
141 Correct 144 ms 14140 KB Output is correct
142 Correct 12 ms 2120 KB Output is correct
143 Correct 43 ms 7264 KB Output is correct
144 Correct 72 ms 9380 KB Output is correct
145 Correct 626 ms 44084 KB Output is correct
146 Correct 789 ms 55224 KB Output is correct
147 Correct 947 ms 66552 KB Output is correct
148 Correct 1131 ms 76868 KB Output is correct
149 Correct 1304 ms 87848 KB Output is correct
150 Correct 1000 ms 99732 KB Output is correct
151 Correct 1093 ms 116220 KB Output is correct
152 Correct 3 ms 724 KB Output is correct
153 Correct 5 ms 1048 KB Output is correct
154 Correct 478 ms 45944 KB Output is correct
155 Correct 731 ms 69400 KB Output is correct
156 Correct 999 ms 91904 KB Output is correct
157 Correct 1 ms 212 KB Output is correct
158 Correct 0 ms 212 KB Output is correct
159 Correct 0 ms 316 KB Output is correct
160 Correct 0 ms 212 KB Output is correct
161 Correct 998 ms 81244 KB Output is correct
162 Correct 884 ms 84088 KB Output is correct
163 Correct 797 ms 77520 KB Output is correct
164 Correct 802 ms 77392 KB Output is correct
165 Correct 871 ms 80124 KB Output is correct
166 Correct 820 ms 80592 KB Output is correct
167 Runtime error 191 ms 35484 KB Execution killed with signal 11
168 Halted 0 ms 0 KB -