답안 #443494

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
443494 2021-07-10T15:18:23 Z leinad2 분수 공원 (IOI21_parks) C++17
70 / 100
514 ms 74704 KB
#include "parks.h"
#include<bits/stdc++.h>
using namespace std;
int par[400010], chk[400010], chk2[400010], A[400010][2], vis[400010];
int Find(int v){return v==par[v]?v:par[v]=Find(par[v]);}
vector<pair<int, int> >v;
int cnt;
map<pair<int, int>, int>mp;
vector<pair<int, int> >adj[400010];
vector<int>_u, _v, _a, _b;
void dfs(int v)
{
    for(int i=0;i<adj[v].size();i++)
    {
        int p=adj[v][i].first;
        if(!vis[p])vis[p]=1,dfs(p),_a[adj[v][i].second]=p;
    }
}
int construct_roads(vector<int>x, vector<int>y)
{
    int n, i, j, k, a, b;
    n=x.size();
    vector<pair<pair<int, int>, int> >V;
    for(i=0;i<n;i++)
    {
        V.push_back({{x[i], y[i]}, i});
    }
    sort(V.begin(), V.end());
    for(i=1;i<V.size();i++)
    {
        if(V[i].first.first==V[i-1].first.first&&V[i].first.second==V[i-1].first.second+2)
        {
            v.push_back({V[i].second, V[i-1].second});
        }
    }
    for(i=0;i<n;i++)
    {
        swap(V[i].first.first, V[i].first.second);
    }
    sort(V.begin(), V.end());
    for(i=1;i<V.size();i++)
    {
        if(V[i].first.first==V[i-1].first.first&&V[i].first.second==V[i-1].first.second+2)
        {
            v.push_back({V[i].second, V[i-1].second});
        }
    }
    for(int rng=0;rng<5;rng++)
    {
        for(i=0;i<n;i++)par[i]=i;
        if(rng!=0)random_shuffle(v.begin(), v.end());
        _u.clear();_v.clear();_a.clear();_b.clear();cnt=0;mp.clear();for(i=1;i<=2*n;i++)vis[i]=chk[i]=chk2[i]=0,adj[i].clear();
        for(i=0;i<v.size();i++)
        {
            if(Find(v[i].first)!=Find(v[i].second))
            {
                _u.push_back(v[i].first);
                _v.push_back(v[i].second);
                par[Find(v[i].first)]=Find(v[i].second);
            }
        }
        if(_u.size()!=n-1)return 0;
        vector<pair<int, int> >edge;
        _a.resize(n-1);_b.resize(n-1);
        for(i=0;i<_u.size();i++)
        {
            int a=_u[i], b=_v[i], q, w, e, r;
            if(x[a]==x[b])
            {
                q=x[a]-1;e=x[a]+1;
                w=r=(y[a]+y[b])/2;
            }
            else
            {
                w=y[a]-1;r=y[a]+1;
                q=e=(x[a]+x[b])/2;
            }
            if(mp.find({q, w})==mp.end())mp[{q, w}]=++cnt,A[cnt][0]=q,A[cnt][1]=w;
            if(mp.find({e, r})==mp.end())mp[{e, r}]=++cnt,A[cnt][0]=e,A[cnt][1]=r;
            int x=mp[{q, w}];int y=mp[{e, r}];
            edge.push_back({x, y});
        }
        for(i=0;i++<cnt;)par[i]=i;
        for(i=0;i<edge.size();i++)par[Find(edge[i].first)]=Find(edge[i].second);
        for(i=0;i++<cnt;)chk[Find(i)]++;
        for(i=0;i<edge.size();i++)chk2[Find(edge[i].first)]++;
        for(i=0;i<edge.size();i++)
        {
            adj[edge[i].first].push_back({edge[i].second, i});
            adj[edge[i].second].push_back({edge[i].first, i});
        }
        bool flag=true;
        for(i=0;i++<cnt;)
        {
            if(chk[i])
            {
                if(chk[i]<chk2[i]){flag=false;break;}
                else vis[i]=1,dfs(i);
            }
        }
        if(!flag)continue;
        for(i=0;i<_a.size();i++)
        {
            if(_a[i]==0)_a[i]=Find(edge[i].first);
            int a=_a[i];
            _a[i]=A[a][0];_b[i]=A[a][1];
        }
        build(_u, _v, _a, _b);
        return 1;
    }
    return 0;
}

Compilation message

parks.cpp: In function 'void dfs(int)':
parks.cpp:13: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]
   13 |     for(int i=0;i<adj[v].size();i++)
      |                 ~^~~~~~~~~~~~~~
parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:29:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<std::pair<int, int>, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   29 |     for(i=1;i<V.size();i++)
      |             ~^~~~~~~~~
parks.cpp:41:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<std::pair<int, int>, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   41 |     for(i=1;i<V.size();i++)
      |             ~^~~~~~~~~
parks.cpp:53: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]
   53 |         for(i=0;i<v.size();i++)
      |                 ~^~~~~~~~~
parks.cpp:62:21: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   62 |         if(_u.size()!=n-1)return 0;
      |            ~~~~~~~~~^~~~~
parks.cpp:65:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   65 |         for(i=0;i<_u.size();i++)
      |                 ~^~~~~~~~~~
parks.cpp:84: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]
   84 |         for(i=0;i<edge.size();i++)par[Find(edge[i].first)]=Find(edge[i].second);
      |                 ~^~~~~~~~~~~~
parks.cpp:86: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]
   86 |         for(i=0;i<edge.size();i++)chk2[Find(edge[i].first)]++;
      |                 ~^~~~~~~~~~~~
parks.cpp:87: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]
   87 |         for(i=0;i<edge.size();i++)
      |                 ~^~~~~~~~~~~~
parks.cpp:102:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  102 |         for(i=0;i<_a.size();i++)
      |                 ~^~~~~~~~~~
parks.cpp:21:15: warning: unused variable 'j' [-Wunused-variable]
   21 |     int n, i, j, k, a, b;
      |               ^
parks.cpp:21:18: warning: unused variable 'k' [-Wunused-variable]
   21 |     int n, i, j, k, a, b;
      |                  ^
parks.cpp:21:21: warning: unused variable 'a' [-Wunused-variable]
   21 |     int n, i, j, k, a, b;
      |                     ^
parks.cpp:21:24: warning: unused variable 'b' [-Wunused-variable]
   21 |     int n, i, j, k, a, b;
      |                        ^
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 9676 KB Output is correct
2 Correct 7 ms 9676 KB Output is correct
3 Correct 7 ms 9676 KB Output is correct
4 Correct 6 ms 9676 KB Output is correct
5 Correct 6 ms 9676 KB Output is correct
6 Correct 6 ms 9676 KB Output is correct
7 Correct 6 ms 9672 KB Output is correct
8 Correct 6 ms 9628 KB Output is correct
9 Correct 233 ms 42292 KB Output is correct
10 Correct 24 ms 12944 KB Output is correct
11 Correct 126 ms 27216 KB Output is correct
12 Correct 54 ms 14588 KB Output is correct
13 Correct 20 ms 13128 KB Output is correct
14 Correct 7 ms 9676 KB Output is correct
15 Correct 8 ms 9876 KB Output is correct
16 Correct 246 ms 42276 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 9676 KB Output is correct
2 Correct 7 ms 9676 KB Output is correct
3 Correct 7 ms 9676 KB Output is correct
4 Correct 6 ms 9676 KB Output is correct
5 Correct 6 ms 9676 KB Output is correct
6 Correct 6 ms 9676 KB Output is correct
7 Correct 6 ms 9672 KB Output is correct
8 Correct 6 ms 9628 KB Output is correct
9 Correct 233 ms 42292 KB Output is correct
10 Correct 24 ms 12944 KB Output is correct
11 Correct 126 ms 27216 KB Output is correct
12 Correct 54 ms 14588 KB Output is correct
13 Correct 20 ms 13128 KB Output is correct
14 Correct 7 ms 9676 KB Output is correct
15 Correct 8 ms 9876 KB Output is correct
16 Correct 246 ms 42276 KB Output is correct
17 Correct 6 ms 9632 KB Output is correct
18 Correct 6 ms 9676 KB Output is correct
19 Correct 6 ms 9676 KB Output is correct
20 Correct 6 ms 9676 KB Output is correct
21 Correct 6 ms 9676 KB Output is correct
22 Correct 11 ms 9732 KB Output is correct
23 Correct 489 ms 65172 KB Output is correct
24 Correct 7 ms 9676 KB Output is correct
25 Correct 8 ms 10028 KB Output is correct
26 Correct 10 ms 9932 KB Output is correct
27 Correct 9 ms 9976 KB Output is correct
28 Correct 171 ms 31908 KB Output is correct
29 Correct 264 ms 43008 KB Output is correct
30 Correct 377 ms 53832 KB Output is correct
31 Correct 463 ms 65180 KB Output is correct
32 Correct 7 ms 9676 KB Output is correct
33 Correct 6 ms 9668 KB Output is correct
34 Correct 6 ms 9608 KB Output is correct
35 Correct 6 ms 9676 KB Output is correct
36 Correct 10 ms 9656 KB Output is correct
37 Correct 6 ms 9672 KB Output is correct
38 Correct 6 ms 9676 KB Output is correct
39 Correct 6 ms 9676 KB Output is correct
40 Correct 6 ms 9676 KB Output is correct
41 Correct 7 ms 9676 KB Output is correct
42 Correct 6 ms 9676 KB Output is correct
43 Correct 7 ms 9804 KB Output is correct
44 Correct 7 ms 9880 KB Output is correct
45 Correct 203 ms 35656 KB Output is correct
46 Correct 367 ms 47416 KB Output is correct
47 Correct 366 ms 47484 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 9676 KB Output is correct
2 Correct 7 ms 9676 KB Output is correct
3 Correct 7 ms 9676 KB Output is correct
4 Correct 6 ms 9676 KB Output is correct
5 Correct 6 ms 9676 KB Output is correct
6 Correct 6 ms 9676 KB Output is correct
7 Correct 6 ms 9672 KB Output is correct
8 Correct 6 ms 9628 KB Output is correct
9 Correct 233 ms 42292 KB Output is correct
10 Correct 24 ms 12944 KB Output is correct
11 Correct 126 ms 27216 KB Output is correct
12 Correct 54 ms 14588 KB Output is correct
13 Correct 20 ms 13128 KB Output is correct
14 Correct 7 ms 9676 KB Output is correct
15 Correct 8 ms 9876 KB Output is correct
16 Correct 246 ms 42276 KB Output is correct
17 Correct 6 ms 9632 KB Output is correct
18 Correct 6 ms 9676 KB Output is correct
19 Correct 6 ms 9676 KB Output is correct
20 Correct 6 ms 9676 KB Output is correct
21 Correct 6 ms 9676 KB Output is correct
22 Correct 11 ms 9732 KB Output is correct
23 Correct 489 ms 65172 KB Output is correct
24 Correct 7 ms 9676 KB Output is correct
25 Correct 8 ms 10028 KB Output is correct
26 Correct 10 ms 9932 KB Output is correct
27 Correct 9 ms 9976 KB Output is correct
28 Correct 171 ms 31908 KB Output is correct
29 Correct 264 ms 43008 KB Output is correct
30 Correct 377 ms 53832 KB Output is correct
31 Correct 463 ms 65180 KB Output is correct
32 Correct 7 ms 9676 KB Output is correct
33 Correct 6 ms 9668 KB Output is correct
34 Correct 6 ms 9608 KB Output is correct
35 Correct 6 ms 9676 KB Output is correct
36 Correct 10 ms 9656 KB Output is correct
37 Correct 6 ms 9672 KB Output is correct
38 Correct 6 ms 9676 KB Output is correct
39 Correct 6 ms 9676 KB Output is correct
40 Correct 6 ms 9676 KB Output is correct
41 Correct 7 ms 9676 KB Output is correct
42 Correct 6 ms 9676 KB Output is correct
43 Correct 7 ms 9804 KB Output is correct
44 Correct 7 ms 9880 KB Output is correct
45 Correct 203 ms 35656 KB Output is correct
46 Correct 367 ms 47416 KB Output is correct
47 Correct 366 ms 47484 KB Output is correct
48 Correct 6 ms 9676 KB Output is correct
49 Correct 6 ms 9676 KB Output is correct
50 Correct 7 ms 9676 KB Output is correct
51 Correct 6 ms 9676 KB Output is correct
52 Correct 7 ms 9676 KB Output is correct
53 Correct 6 ms 9676 KB Output is correct
54 Correct 8 ms 9608 KB Output is correct
55 Correct 411 ms 61940 KB Output is correct
56 Correct 7 ms 9664 KB Output is correct
57 Correct 8 ms 10188 KB Output is correct
58 Correct 30 ms 11400 KB Output is correct
59 Correct 10 ms 10508 KB Output is correct
60 Correct 191 ms 35780 KB Output is correct
61 Correct 312 ms 44852 KB Output is correct
62 Correct 329 ms 52864 KB Output is correct
63 Correct 482 ms 62020 KB Output is correct
64 Correct 6 ms 9676 KB Output is correct
65 Correct 6 ms 9676 KB Output is correct
66 Correct 6 ms 9676 KB Output is correct
67 Correct 503 ms 74612 KB Output is correct
68 Correct 514 ms 74628 KB Output is correct
69 Correct 484 ms 74352 KB Output is correct
70 Correct 16 ms 10032 KB Output is correct
71 Correct 9 ms 10316 KB Output is correct
72 Correct 207 ms 35240 KB Output is correct
73 Correct 304 ms 47852 KB Output is correct
74 Correct 410 ms 60556 KB Output is correct
75 Correct 429 ms 66460 KB Output is correct
76 Correct 499 ms 74620 KB Output is correct
77 Correct 9 ms 10116 KB Output is correct
78 Correct 10 ms 10384 KB Output is correct
79 Correct 206 ms 36456 KB Output is correct
80 Correct 308 ms 49636 KB Output is correct
81 Correct 426 ms 62748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 9676 KB Output is correct
2 Correct 7 ms 9676 KB Output is correct
3 Correct 7 ms 9676 KB Output is correct
4 Correct 6 ms 9676 KB Output is correct
5 Correct 6 ms 9676 KB Output is correct
6 Correct 6 ms 9676 KB Output is correct
7 Correct 6 ms 9672 KB Output is correct
8 Correct 6 ms 9628 KB Output is correct
9 Correct 233 ms 42292 KB Output is correct
10 Correct 24 ms 12944 KB Output is correct
11 Correct 126 ms 27216 KB Output is correct
12 Correct 54 ms 14588 KB Output is correct
13 Correct 20 ms 13128 KB Output is correct
14 Correct 7 ms 9676 KB Output is correct
15 Correct 8 ms 9876 KB Output is correct
16 Correct 246 ms 42276 KB Output is correct
17 Correct 6 ms 9676 KB Output is correct
18 Correct 6 ms 9676 KB Output is correct
19 Correct 6 ms 9676 KB Output is correct
20 Correct 346 ms 62892 KB Output is correct
21 Correct 340 ms 58196 KB Output is correct
22 Correct 349 ms 58192 KB Output is correct
23 Correct 334 ms 64892 KB Output is correct
24 Correct 96 ms 20716 KB Output is correct
25 Correct 105 ms 25068 KB Output is correct
26 Correct 102 ms 25032 KB Output is correct
27 Correct 383 ms 74628 KB Output is correct
28 Correct 386 ms 74532 KB Output is correct
29 Correct 405 ms 74704 KB Output is correct
30 Correct 400 ms 74512 KB Output is correct
31 Correct 6 ms 9676 KB Output is correct
32 Correct 31 ms 13176 KB Output is correct
33 Correct 45 ms 15208 KB Output is correct
34 Correct 344 ms 62932 KB Output is correct
35 Correct 11 ms 10512 KB Output is correct
36 Correct 31 ms 13504 KB Output is correct
37 Correct 58 ms 17132 KB Output is correct
38 Correct 213 ms 29016 KB Output is correct
39 Correct 244 ms 36020 KB Output is correct
40 Correct 308 ms 43332 KB Output is correct
41 Correct 417 ms 50412 KB Output is correct
42 Correct 461 ms 57584 KB Output is correct
43 Correct 6 ms 9676 KB Output is correct
44 Correct 6 ms 9696 KB Output is correct
45 Correct 6 ms 9676 KB Output is correct
46 Correct 7 ms 9676 KB Output is correct
47 Correct 6 ms 9676 KB Output is correct
48 Correct 6 ms 9676 KB Output is correct
49 Correct 6 ms 9620 KB Output is correct
50 Correct 6 ms 9676 KB Output is correct
51 Correct 6 ms 9676 KB Output is correct
52 Correct 6 ms 9676 KB Output is correct
53 Correct 6 ms 9676 KB Output is correct
54 Correct 11 ms 9788 KB Output is correct
55 Correct 9 ms 9952 KB Output is correct
56 Correct 196 ms 35792 KB Output is correct
57 Correct 290 ms 47392 KB Output is correct
58 Correct 290 ms 47452 KB Output is correct
59 Correct 6 ms 9676 KB Output is correct
60 Correct 11 ms 9676 KB Output is correct
61 Correct 6 ms 9676 KB Output is correct
62 Correct 468 ms 74576 KB Output is correct
63 Correct 495 ms 74612 KB Output is correct
64 Correct 502 ms 74472 KB Output is correct
65 Correct 8 ms 9932 KB Output is correct
66 Correct 9 ms 10188 KB Output is correct
67 Correct 193 ms 35212 KB Output is correct
68 Correct 296 ms 47860 KB Output is correct
69 Correct 432 ms 60512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 9676 KB Output is correct
2 Correct 7 ms 9676 KB Output is correct
3 Correct 7 ms 9676 KB Output is correct
4 Correct 6 ms 9676 KB Output is correct
5 Correct 6 ms 9676 KB Output is correct
6 Correct 6 ms 9676 KB Output is correct
7 Correct 6 ms 9672 KB Output is correct
8 Correct 6 ms 9628 KB Output is correct
9 Correct 233 ms 42292 KB Output is correct
10 Correct 24 ms 12944 KB Output is correct
11 Correct 126 ms 27216 KB Output is correct
12 Correct 54 ms 14588 KB Output is correct
13 Correct 20 ms 13128 KB Output is correct
14 Correct 7 ms 9676 KB Output is correct
15 Correct 8 ms 9876 KB Output is correct
16 Correct 246 ms 42276 KB Output is correct
17 Correct 451 ms 74588 KB Output is correct
18 Correct 443 ms 74608 KB Output is correct
19 Correct 361 ms 62868 KB Output is correct
20 Correct 373 ms 60156 KB Output is correct
21 Correct 396 ms 62704 KB Output is correct
22 Correct 12 ms 9676 KB Output is correct
23 Correct 62 ms 17916 KB Output is correct
24 Correct 16 ms 11212 KB Output is correct
25 Correct 44 ms 15232 KB Output is correct
26 Correct 69 ms 18616 KB Output is correct
27 Correct 225 ms 34984 KB Output is correct
28 Correct 283 ms 42016 KB Output is correct
29 Correct 367 ms 47428 KB Output is correct
30 Correct 400 ms 53676 KB Output is correct
31 Correct 488 ms 60084 KB Output is correct
32 Correct 450 ms 66424 KB Output is correct
33 Correct 496 ms 74680 KB Output is correct
34 Correct 9 ms 10060 KB Output is correct
35 Correct 10 ms 10384 KB Output is correct
36 Correct 203 ms 36324 KB Output is correct
37 Correct 292 ms 49524 KB Output is correct
38 Correct 408 ms 62772 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 9676 KB Output is correct
2 Correct 7 ms 9676 KB Output is correct
3 Correct 7 ms 9676 KB Output is correct
4 Correct 6 ms 9676 KB Output is correct
5 Correct 6 ms 9676 KB Output is correct
6 Correct 6 ms 9676 KB Output is correct
7 Correct 6 ms 9672 KB Output is correct
8 Correct 6 ms 9628 KB Output is correct
9 Correct 233 ms 42292 KB Output is correct
10 Correct 24 ms 12944 KB Output is correct
11 Correct 126 ms 27216 KB Output is correct
12 Correct 54 ms 14588 KB Output is correct
13 Correct 20 ms 13128 KB Output is correct
14 Correct 7 ms 9676 KB Output is correct
15 Correct 8 ms 9876 KB Output is correct
16 Correct 246 ms 42276 KB Output is correct
17 Correct 6 ms 9632 KB Output is correct
18 Correct 6 ms 9676 KB Output is correct
19 Correct 6 ms 9676 KB Output is correct
20 Correct 6 ms 9676 KB Output is correct
21 Correct 6 ms 9676 KB Output is correct
22 Correct 11 ms 9732 KB Output is correct
23 Correct 489 ms 65172 KB Output is correct
24 Correct 7 ms 9676 KB Output is correct
25 Correct 8 ms 10028 KB Output is correct
26 Correct 10 ms 9932 KB Output is correct
27 Correct 9 ms 9976 KB Output is correct
28 Correct 171 ms 31908 KB Output is correct
29 Correct 264 ms 43008 KB Output is correct
30 Correct 377 ms 53832 KB Output is correct
31 Correct 463 ms 65180 KB Output is correct
32 Correct 7 ms 9676 KB Output is correct
33 Correct 6 ms 9668 KB Output is correct
34 Correct 6 ms 9608 KB Output is correct
35 Correct 6 ms 9676 KB Output is correct
36 Correct 10 ms 9656 KB Output is correct
37 Correct 6 ms 9672 KB Output is correct
38 Correct 6 ms 9676 KB Output is correct
39 Correct 6 ms 9676 KB Output is correct
40 Correct 6 ms 9676 KB Output is correct
41 Correct 7 ms 9676 KB Output is correct
42 Correct 6 ms 9676 KB Output is correct
43 Correct 7 ms 9804 KB Output is correct
44 Correct 7 ms 9880 KB Output is correct
45 Correct 203 ms 35656 KB Output is correct
46 Correct 367 ms 47416 KB Output is correct
47 Correct 366 ms 47484 KB Output is correct
48 Correct 6 ms 9676 KB Output is correct
49 Correct 6 ms 9676 KB Output is correct
50 Correct 7 ms 9676 KB Output is correct
51 Correct 6 ms 9676 KB Output is correct
52 Correct 7 ms 9676 KB Output is correct
53 Correct 6 ms 9676 KB Output is correct
54 Correct 8 ms 9608 KB Output is correct
55 Correct 411 ms 61940 KB Output is correct
56 Correct 7 ms 9664 KB Output is correct
57 Correct 8 ms 10188 KB Output is correct
58 Correct 30 ms 11400 KB Output is correct
59 Correct 10 ms 10508 KB Output is correct
60 Correct 191 ms 35780 KB Output is correct
61 Correct 312 ms 44852 KB Output is correct
62 Correct 329 ms 52864 KB Output is correct
63 Correct 482 ms 62020 KB Output is correct
64 Correct 6 ms 9676 KB Output is correct
65 Correct 6 ms 9676 KB Output is correct
66 Correct 6 ms 9676 KB Output is correct
67 Correct 503 ms 74612 KB Output is correct
68 Correct 514 ms 74628 KB Output is correct
69 Correct 484 ms 74352 KB Output is correct
70 Correct 16 ms 10032 KB Output is correct
71 Correct 9 ms 10316 KB Output is correct
72 Correct 207 ms 35240 KB Output is correct
73 Correct 304 ms 47852 KB Output is correct
74 Correct 410 ms 60556 KB Output is correct
75 Correct 429 ms 66460 KB Output is correct
76 Correct 499 ms 74620 KB Output is correct
77 Correct 9 ms 10116 KB Output is correct
78 Correct 10 ms 10384 KB Output is correct
79 Correct 206 ms 36456 KB Output is correct
80 Correct 308 ms 49636 KB Output is correct
81 Correct 426 ms 62748 KB Output is correct
82 Correct 6 ms 9676 KB Output is correct
83 Correct 6 ms 9676 KB Output is correct
84 Correct 6 ms 9676 KB Output is correct
85 Correct 346 ms 62892 KB Output is correct
86 Correct 340 ms 58196 KB Output is correct
87 Correct 349 ms 58192 KB Output is correct
88 Correct 334 ms 64892 KB Output is correct
89 Correct 96 ms 20716 KB Output is correct
90 Correct 105 ms 25068 KB Output is correct
91 Correct 102 ms 25032 KB Output is correct
92 Correct 383 ms 74628 KB Output is correct
93 Correct 386 ms 74532 KB Output is correct
94 Correct 405 ms 74704 KB Output is correct
95 Correct 400 ms 74512 KB Output is correct
96 Correct 6 ms 9676 KB Output is correct
97 Correct 31 ms 13176 KB Output is correct
98 Correct 45 ms 15208 KB Output is correct
99 Correct 344 ms 62932 KB Output is correct
100 Correct 11 ms 10512 KB Output is correct
101 Correct 31 ms 13504 KB Output is correct
102 Correct 58 ms 17132 KB Output is correct
103 Correct 213 ms 29016 KB Output is correct
104 Correct 244 ms 36020 KB Output is correct
105 Correct 308 ms 43332 KB Output is correct
106 Correct 417 ms 50412 KB Output is correct
107 Correct 461 ms 57584 KB Output is correct
108 Correct 6 ms 9676 KB Output is correct
109 Correct 6 ms 9696 KB Output is correct
110 Correct 6 ms 9676 KB Output is correct
111 Correct 7 ms 9676 KB Output is correct
112 Correct 6 ms 9676 KB Output is correct
113 Correct 6 ms 9676 KB Output is correct
114 Correct 6 ms 9620 KB Output is correct
115 Correct 6 ms 9676 KB Output is correct
116 Correct 6 ms 9676 KB Output is correct
117 Correct 6 ms 9676 KB Output is correct
118 Correct 6 ms 9676 KB Output is correct
119 Correct 11 ms 9788 KB Output is correct
120 Correct 9 ms 9952 KB Output is correct
121 Correct 196 ms 35792 KB Output is correct
122 Correct 290 ms 47392 KB Output is correct
123 Correct 290 ms 47452 KB Output is correct
124 Correct 6 ms 9676 KB Output is correct
125 Correct 11 ms 9676 KB Output is correct
126 Correct 6 ms 9676 KB Output is correct
127 Correct 468 ms 74576 KB Output is correct
128 Correct 495 ms 74612 KB Output is correct
129 Correct 502 ms 74472 KB Output is correct
130 Correct 8 ms 9932 KB Output is correct
131 Correct 9 ms 10188 KB Output is correct
132 Correct 193 ms 35212 KB Output is correct
133 Correct 296 ms 47860 KB Output is correct
134 Correct 432 ms 60512 KB Output is correct
135 Correct 451 ms 74588 KB Output is correct
136 Correct 443 ms 74608 KB Output is correct
137 Correct 361 ms 62868 KB Output is correct
138 Correct 373 ms 60156 KB Output is correct
139 Correct 396 ms 62704 KB Output is correct
140 Correct 12 ms 9676 KB Output is correct
141 Correct 62 ms 17916 KB Output is correct
142 Correct 16 ms 11212 KB Output is correct
143 Correct 44 ms 15232 KB Output is correct
144 Correct 69 ms 18616 KB Output is correct
145 Correct 225 ms 34984 KB Output is correct
146 Correct 283 ms 42016 KB Output is correct
147 Correct 367 ms 47428 KB Output is correct
148 Correct 400 ms 53676 KB Output is correct
149 Correct 488 ms 60084 KB Output is correct
150 Correct 450 ms 66424 KB Output is correct
151 Correct 496 ms 74680 KB Output is correct
152 Correct 9 ms 10060 KB Output is correct
153 Correct 10 ms 10384 KB Output is correct
154 Correct 203 ms 36324 KB Output is correct
155 Correct 292 ms 49524 KB Output is correct
156 Correct 408 ms 62772 KB Output is correct
157 Correct 6 ms 9676 KB Output is correct
158 Correct 7 ms 9676 KB Output is correct
159 Correct 6 ms 9676 KB Output is correct
160 Correct 6 ms 9676 KB Output is correct
161 Correct 418 ms 55792 KB Output is correct
162 Correct 336 ms 62828 KB Output is correct
163 Correct 336 ms 64608 KB Output is correct
164 Correct 334 ms 64540 KB Output is correct
165 Correct 344 ms 58996 KB Output is correct
166 Correct 409 ms 56572 KB Output is correct
167 Incorrect 306 ms 20280 KB Solution announced impossible, but it is possible.
168 Halted 0 ms 0 KB -