답안 #481736

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
481736 2021-10-21T13:57:58 Z Fysty 분수 공원 (IOI21_parks) C++17
100 / 100
1766 ms 96348 KB
#include <bits/stdc++.h>
#include "parks.h"
#include <random>
#include <chrono>
using namespace std;
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize ("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<double,double> pdd;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

template<typename T> void _do(T x){cerr<<x<<"\n";}
template<typename T,typename ...U> void _do(T x,U ...y){cerr<<x<<", ";_do(y...);}
#define dbg(...) cerr<<#__VA_ARGS__<<" = ";_do(__VA_ARGS__);

const int MOD1=1e9+7;
const int MOD2=998244353;
const ll INF=3e18;
const ld PI=3.14159265358979323846;
ll gcd(ll a,ll b){if(b==0) return a; return gcd(b,a%b);}
ll fpow(ll a,ll b,ll m)
{
    if(!b) return 1;
    ll ans=fpow(a*a%m,b/2,m);
    return (b%2?ans*a%m:ans);
}
ll inv(ll a,ll m) {return fpow(a,m-2,m);}

#define MottoHayaku ios::sync_with_stdio(false);cin.tie(0);
//#define int ll
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep1(i,n) for(ll i=1;i<=n;i++)
#define repk(i,m,n) for(int i=m;i<n;i++)
#define F first
#define S second
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define uni(c) c.resize(distance(c.begin(),unique(c.begin(),c.end())))
#define unisort(c) sort(c.begin(),c.end()),uni(c)
const int N=2e5+1;
bool vis[N<<2];
vector<int> x,y;
vector<int> retu,retv,a,b;
vector<pii> ed[N<<2];
pii point[N],pos[N<<2];
set<pii> edges;
map<pii,int> id,id2;
int n,tn=0,cnt=0;
int par[N];
int fp(int u){return u==par[u]?u:par[u]=fp(par[u]);}
int unite(int u,int v)
{
    if(fp(u)==fp(v)) return 0;
    par[fp(v)]=fp(u);
    return 1;
}

/*void build(vector<int> v1,vector<int> v2,vector<int> v3,vector<int> v4)
{
    for(ll u:v1) cout<<u<<" ";
    cout<<"\n";
    for(ll u:v2) cout<<u<<" ";
    cout<<"\n";
    for(ll u:v3) cout<<u<<" ";
    cout<<"\n";
    for(ll u:v4) cout<<u<<" ";
    cout<<"\n";
}
*/
void solve()
{
    for(pii tmp:edges)
    {
        int u=tmp.F,v=tmp.S;
        int can=unite(u,v);
        if(can)
        {
            cnt++;
            retu.pb(u);
            retv.pb(v);
            if(y[u]==y[v])
            {
                int mid=(x[u]+x[v])>>1;
                if((mid+y[u]+1)%4==0)
                {
                    a.pb(mid);
                    b.pb(y[u]+1);
                }
                else
                {
                    a.pb(mid);
                    b.pb(y[u]-1);
                }
            }
            else
            {
                int mid=(y[u]+y[v])>>1;
                if((mid+x[u]+1)%4==2)
                {
                    a.pb(x[u]+1);
                    b.pb(mid);
                }
                else
                {
                    a.pb(x[u]-1);
                    b.pb(mid);
                }
            }
        }
    }
}
void dfs(int u)
{
    vis[u]=1;
    for(pii tmp:ed[u])
    {
        if(vis[tmp.F]) continue;
        pii p=pos[tmp.F];
        if(tmp.S==1)
        {
            edges.erase({id[{p.F+1,p.S-1}],id[{p.F+1,p.S+1}]});
            edges.erase({id[{p.F+1,p.S+1}],id[{p.F+1,p.S-1}]});
        }
        else if(tmp.S==2)
        {
            edges.erase({id[{p.F-1,p.S-1}],id[{p.F-1,p.S+1}]});
            edges.erase({id[{p.F-1,p.S+1}],id[{p.F-1,p.S-1}]});
        }
        else if(tmp.S==3)
        {
            edges.erase({id[{p.F-1,p.S-1}],id[{p.F+1,p.S-1}]});
            edges.erase({id[{p.F+1,p.S-1}],id[{p.F-1,p.S-1}]});
        }
        else if(tmp.S==4)
        {
            edges.erase({id[{p.F-1,p.S+1}],id[{p.F+1,p.S+1}]});
            edges.erase({id[{p.F+1,p.S+1}],id[{p.F-1,p.S+1}]});
        }
        dfs(tmp.F);
    }
}
int construct_roads(vector<int> X,vector<int> Y) {
    x=X;
    y=Y;
    n=x.size();
    if(n==1)
	{
	    build(retu,retv,a,b);
        return 1;
    }
    rep(i,n)
    {
        point[i]={x[i],y[i]};
        id[point[i]]=i;
    }
    rep(i,n)
    {
        int tmp=0;
        if(id.count({x[i]+2,y[i]}))
        {
            edges.insert({id[{x[i]+2,y[i]}],i});
            tmp++;
        }
        if(id.count({x[i],y[i]+2}))
        {
            edges.insert({id[{x[i],y[i]+2}],i});
            tmp++;
        }
        if(tmp==2)
        {
            if(id.count({x[i]+2,y[i]+2}))
            {
                tn++;
                pos[tn]={x[i]+1,y[i]+1};
                id2[{x[i]+1,y[i]+1}]=tn;
            }
        }
    }
    rep1(i,tn)
    {
        pii tmp=pos[i];
        if((tmp.F+tmp.S)%4==0)
        {
            if(id2.count({tmp.F,tmp.S-2}))
            {
                int u=id2[{tmp.F,tmp.S-2}];
                ed[u].pb({i,3});
            }
            else ed[0].pb({i,3});
            if(id2.count({tmp.F,tmp.S+2}))
            {
                int u=id2[{tmp.F,tmp.S+2}];
                ed[u].pb({i,4});
            }
            else ed[0].pb({i,4});
        }
        else
        {
            if(id2.count({tmp.F-2,tmp.S}))
            {
                int u=id2[{tmp.F-2,tmp.S}];
                ed[u].pb({i,2});
            }
            else ed[0].pb({i,2});
            if(id2.count({tmp.F+2,tmp.S}))
            {
                int u=id2[{tmp.F+2,tmp.S}];
                ed[u].pb({i,1});
            }
            else ed[0].pb({i,1});
        }
    }
    if(tn>0)
    {
        dfs(0);
    }
    rep(i,n) par[i]=i;
    solve();
    if(cnt<n-1) return 0;
    else
    {
        build(retu,retv,a,b);
        return 1;
    }
}
/*
for blocks:
    if (x+y)%4==0 then ud
    if (x+y)%4==2 then lr
direction:
    1: left
    2: right
    3: up
    4: down
*/
/*
signed main()
{
    MottoHayaku
    vector<int> X,Y;
    int tx,ty;
    while(cin>>tx>>ty)
    {
        X.pb(tx);
        Y.pb(ty);
    }

    ll res=construct_roads(X,Y);
    cout<<res<<"\n";
}
*/

# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 19020 KB Output is correct
2 Correct 9 ms 19004 KB Output is correct
3 Correct 9 ms 19048 KB Output is correct
4 Correct 9 ms 19020 KB Output is correct
5 Correct 9 ms 19020 KB Output is correct
6 Correct 9 ms 19020 KB Output is correct
7 Correct 9 ms 19020 KB Output is correct
8 Correct 9 ms 19020 KB Output is correct
9 Correct 178 ms 38344 KB Output is correct
10 Correct 21 ms 21196 KB Output is correct
11 Correct 70 ms 29500 KB Output is correct
12 Correct 25 ms 22216 KB Output is correct
13 Correct 47 ms 26300 KB Output is correct
14 Correct 10 ms 19276 KB Output is correct
15 Correct 10 ms 19456 KB Output is correct
16 Correct 178 ms 38400 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 19020 KB Output is correct
2 Correct 9 ms 19004 KB Output is correct
3 Correct 9 ms 19048 KB Output is correct
4 Correct 9 ms 19020 KB Output is correct
5 Correct 9 ms 19020 KB Output is correct
6 Correct 9 ms 19020 KB Output is correct
7 Correct 9 ms 19020 KB Output is correct
8 Correct 9 ms 19020 KB Output is correct
9 Correct 178 ms 38344 KB Output is correct
10 Correct 21 ms 21196 KB Output is correct
11 Correct 70 ms 29500 KB Output is correct
12 Correct 25 ms 22216 KB Output is correct
13 Correct 47 ms 26300 KB Output is correct
14 Correct 10 ms 19276 KB Output is correct
15 Correct 10 ms 19456 KB Output is correct
16 Correct 178 ms 38400 KB Output is correct
17 Correct 9 ms 19004 KB Output is correct
18 Correct 9 ms 19020 KB Output is correct
19 Correct 9 ms 19104 KB Output is correct
20 Correct 9 ms 19100 KB Output is correct
21 Correct 10 ms 19108 KB Output is correct
22 Correct 9 ms 19020 KB Output is correct
23 Correct 1080 ms 74256 KB Output is correct
24 Correct 9 ms 19020 KB Output is correct
25 Correct 11 ms 19404 KB Output is correct
26 Correct 14 ms 19788 KB Output is correct
27 Correct 16 ms 20012 KB Output is correct
28 Correct 299 ms 41236 KB Output is correct
29 Correct 544 ms 52144 KB Output is correct
30 Correct 793 ms 63788 KB Output is correct
31 Correct 1054 ms 74200 KB Output is correct
32 Correct 9 ms 19020 KB Output is correct
33 Correct 9 ms 19100 KB Output is correct
34 Correct 9 ms 19020 KB Output is correct
35 Correct 9 ms 19020 KB Output is correct
36 Correct 9 ms 19020 KB Output is correct
37 Correct 9 ms 19020 KB Output is correct
38 Correct 10 ms 19020 KB Output is correct
39 Correct 9 ms 19104 KB Output is correct
40 Correct 9 ms 19020 KB Output is correct
41 Correct 9 ms 19020 KB Output is correct
42 Correct 9 ms 19108 KB Output is correct
43 Correct 10 ms 19404 KB Output is correct
44 Correct 13 ms 19788 KB Output is correct
45 Correct 195 ms 39240 KB Output is correct
46 Correct 314 ms 48216 KB Output is correct
47 Correct 310 ms 48272 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 19020 KB Output is correct
2 Correct 9 ms 19004 KB Output is correct
3 Correct 9 ms 19048 KB Output is correct
4 Correct 9 ms 19020 KB Output is correct
5 Correct 9 ms 19020 KB Output is correct
6 Correct 9 ms 19020 KB Output is correct
7 Correct 9 ms 19020 KB Output is correct
8 Correct 9 ms 19020 KB Output is correct
9 Correct 178 ms 38344 KB Output is correct
10 Correct 21 ms 21196 KB Output is correct
11 Correct 70 ms 29500 KB Output is correct
12 Correct 25 ms 22216 KB Output is correct
13 Correct 47 ms 26300 KB Output is correct
14 Correct 10 ms 19276 KB Output is correct
15 Correct 10 ms 19456 KB Output is correct
16 Correct 178 ms 38400 KB Output is correct
17 Correct 9 ms 19004 KB Output is correct
18 Correct 9 ms 19020 KB Output is correct
19 Correct 9 ms 19104 KB Output is correct
20 Correct 9 ms 19100 KB Output is correct
21 Correct 10 ms 19108 KB Output is correct
22 Correct 9 ms 19020 KB Output is correct
23 Correct 1080 ms 74256 KB Output is correct
24 Correct 9 ms 19020 KB Output is correct
25 Correct 11 ms 19404 KB Output is correct
26 Correct 14 ms 19788 KB Output is correct
27 Correct 16 ms 20012 KB Output is correct
28 Correct 299 ms 41236 KB Output is correct
29 Correct 544 ms 52144 KB Output is correct
30 Correct 793 ms 63788 KB Output is correct
31 Correct 1054 ms 74200 KB Output is correct
32 Correct 9 ms 19020 KB Output is correct
33 Correct 9 ms 19100 KB Output is correct
34 Correct 9 ms 19020 KB Output is correct
35 Correct 9 ms 19020 KB Output is correct
36 Correct 9 ms 19020 KB Output is correct
37 Correct 9 ms 19020 KB Output is correct
38 Correct 10 ms 19020 KB Output is correct
39 Correct 9 ms 19104 KB Output is correct
40 Correct 9 ms 19020 KB Output is correct
41 Correct 9 ms 19020 KB Output is correct
42 Correct 9 ms 19108 KB Output is correct
43 Correct 10 ms 19404 KB Output is correct
44 Correct 13 ms 19788 KB Output is correct
45 Correct 195 ms 39240 KB Output is correct
46 Correct 314 ms 48216 KB Output is correct
47 Correct 310 ms 48272 KB Output is correct
48 Correct 9 ms 19104 KB Output is correct
49 Correct 9 ms 19020 KB Output is correct
50 Correct 9 ms 19100 KB Output is correct
51 Correct 9 ms 19020 KB Output is correct
52 Correct 9 ms 19020 KB Output is correct
53 Correct 10 ms 19020 KB Output is correct
54 Correct 9 ms 19096 KB Output is correct
55 Correct 1265 ms 92824 KB Output is correct
56 Correct 9 ms 19020 KB Output is correct
57 Correct 13 ms 19788 KB Output is correct
58 Correct 24 ms 21476 KB Output is correct
59 Correct 33 ms 22156 KB Output is correct
60 Correct 498 ms 56504 KB Output is correct
61 Correct 713 ms 71196 KB Output is correct
62 Correct 930 ms 77892 KB Output is correct
63 Correct 1259 ms 92264 KB Output is correct
64 Correct 9 ms 19100 KB Output is correct
65 Correct 9 ms 19024 KB Output is correct
66 Correct 9 ms 19104 KB Output is correct
67 Correct 457 ms 59160 KB Output is correct
68 Correct 437 ms 59272 KB Output is correct
69 Correct 439 ms 59032 KB Output is correct
70 Correct 12 ms 19788 KB Output is correct
71 Correct 17 ms 20500 KB Output is correct
72 Correct 197 ms 39184 KB Output is correct
73 Correct 363 ms 49264 KB Output is correct
74 Correct 542 ms 59360 KB Output is correct
75 Correct 565 ms 61108 KB Output is correct
76 Correct 449 ms 59280 KB Output is correct
77 Correct 14 ms 20044 KB Output is correct
78 Correct 19 ms 20780 KB Output is correct
79 Correct 207 ms 39596 KB Output is correct
80 Correct 363 ms 49948 KB Output is correct
81 Correct 556 ms 60312 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 19020 KB Output is correct
2 Correct 9 ms 19004 KB Output is correct
3 Correct 9 ms 19048 KB Output is correct
4 Correct 9 ms 19020 KB Output is correct
5 Correct 9 ms 19020 KB Output is correct
6 Correct 9 ms 19020 KB Output is correct
7 Correct 9 ms 19020 KB Output is correct
8 Correct 9 ms 19020 KB Output is correct
9 Correct 178 ms 38344 KB Output is correct
10 Correct 21 ms 21196 KB Output is correct
11 Correct 70 ms 29500 KB Output is correct
12 Correct 25 ms 22216 KB Output is correct
13 Correct 47 ms 26300 KB Output is correct
14 Correct 10 ms 19276 KB Output is correct
15 Correct 10 ms 19456 KB Output is correct
16 Correct 178 ms 38400 KB Output is correct
17 Correct 10 ms 19020 KB Output is correct
18 Correct 9 ms 19020 KB Output is correct
19 Correct 9 ms 19020 KB Output is correct
20 Correct 527 ms 58072 KB Output is correct
21 Correct 497 ms 57784 KB Output is correct
22 Correct 524 ms 57788 KB Output is correct
23 Correct 392 ms 51784 KB Output is correct
24 Correct 241 ms 38592 KB Output is correct
25 Correct 481 ms 51212 KB Output is correct
26 Correct 437 ms 51408 KB Output is correct
27 Correct 484 ms 57500 KB Output is correct
28 Correct 492 ms 57504 KB Output is correct
29 Correct 569 ms 57540 KB Output is correct
30 Correct 560 ms 57624 KB Output is correct
31 Correct 9 ms 19012 KB Output is correct
32 Correct 30 ms 22152 KB Output is correct
33 Correct 92 ms 28848 KB Output is correct
34 Correct 469 ms 58044 KB Output is correct
35 Correct 21 ms 20832 KB Output is correct
36 Correct 85 ms 27164 KB Output is correct
37 Correct 190 ms 35256 KB Output is correct
38 Correct 176 ms 34756 KB Output is correct
39 Correct 258 ms 40544 KB Output is correct
40 Correct 340 ms 46304 KB Output is correct
41 Correct 439 ms 52232 KB Output is correct
42 Correct 558 ms 58028 KB Output is correct
43 Correct 9 ms 19020 KB Output is correct
44 Correct 12 ms 19004 KB Output is correct
45 Correct 9 ms 19020 KB Output is correct
46 Correct 9 ms 19060 KB Output is correct
47 Correct 9 ms 19020 KB Output is correct
48 Correct 9 ms 19020 KB Output is correct
49 Correct 9 ms 19020 KB Output is correct
50 Correct 9 ms 19020 KB Output is correct
51 Correct 10 ms 19020 KB Output is correct
52 Correct 9 ms 19020 KB Output is correct
53 Correct 9 ms 19020 KB Output is correct
54 Correct 10 ms 19424 KB Output is correct
55 Correct 12 ms 19532 KB Output is correct
56 Correct 203 ms 38440 KB Output is correct
57 Correct 317 ms 47004 KB Output is correct
58 Correct 316 ms 47008 KB Output is correct
59 Correct 9 ms 19020 KB Output is correct
60 Correct 9 ms 19020 KB Output is correct
61 Correct 9 ms 19020 KB Output is correct
62 Correct 473 ms 57616 KB Output is correct
63 Correct 456 ms 57640 KB Output is correct
64 Correct 459 ms 57600 KB Output is correct
65 Correct 12 ms 19660 KB Output is correct
66 Correct 17 ms 20428 KB Output is correct
67 Correct 222 ms 38348 KB Output is correct
68 Correct 358 ms 47992 KB Output is correct
69 Correct 522 ms 57500 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 19020 KB Output is correct
2 Correct 9 ms 19004 KB Output is correct
3 Correct 9 ms 19048 KB Output is correct
4 Correct 9 ms 19020 KB Output is correct
5 Correct 9 ms 19020 KB Output is correct
6 Correct 9 ms 19020 KB Output is correct
7 Correct 9 ms 19020 KB Output is correct
8 Correct 9 ms 19020 KB Output is correct
9 Correct 178 ms 38344 KB Output is correct
10 Correct 21 ms 21196 KB Output is correct
11 Correct 70 ms 29500 KB Output is correct
12 Correct 25 ms 22216 KB Output is correct
13 Correct 47 ms 26300 KB Output is correct
14 Correct 10 ms 19276 KB Output is correct
15 Correct 10 ms 19456 KB Output is correct
16 Correct 178 ms 38400 KB Output is correct
17 Correct 473 ms 57572 KB Output is correct
18 Correct 478 ms 57748 KB Output is correct
19 Correct 545 ms 57804 KB Output is correct
20 Correct 650 ms 59908 KB Output is correct
21 Correct 476 ms 53792 KB Output is correct
22 Correct 9 ms 19020 KB Output is correct
23 Correct 62 ms 25948 KB Output is correct
24 Correct 38 ms 22684 KB Output is correct
25 Correct 128 ms 31292 KB Output is correct
26 Correct 277 ms 39468 KB Output is correct
27 Correct 229 ms 39400 KB Output is correct
28 Correct 344 ms 44708 KB Output is correct
29 Correct 422 ms 49860 KB Output is correct
30 Correct 509 ms 54596 KB Output is correct
31 Correct 627 ms 59964 KB Output is correct
32 Correct 557 ms 59456 KB Output is correct
33 Correct 440 ms 57500 KB Output is correct
34 Correct 14 ms 19916 KB Output is correct
35 Correct 23 ms 20752 KB Output is correct
36 Correct 208 ms 38808 KB Output is correct
37 Correct 360 ms 48668 KB Output is correct
38 Correct 548 ms 58504 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 19020 KB Output is correct
2 Correct 9 ms 19004 KB Output is correct
3 Correct 9 ms 19048 KB Output is correct
4 Correct 9 ms 19020 KB Output is correct
5 Correct 9 ms 19020 KB Output is correct
6 Correct 9 ms 19020 KB Output is correct
7 Correct 9 ms 19020 KB Output is correct
8 Correct 9 ms 19020 KB Output is correct
9 Correct 178 ms 38344 KB Output is correct
10 Correct 21 ms 21196 KB Output is correct
11 Correct 70 ms 29500 KB Output is correct
12 Correct 25 ms 22216 KB Output is correct
13 Correct 47 ms 26300 KB Output is correct
14 Correct 10 ms 19276 KB Output is correct
15 Correct 10 ms 19456 KB Output is correct
16 Correct 178 ms 38400 KB Output is correct
17 Correct 9 ms 19004 KB Output is correct
18 Correct 9 ms 19020 KB Output is correct
19 Correct 9 ms 19104 KB Output is correct
20 Correct 9 ms 19100 KB Output is correct
21 Correct 10 ms 19108 KB Output is correct
22 Correct 9 ms 19020 KB Output is correct
23 Correct 1080 ms 74256 KB Output is correct
24 Correct 9 ms 19020 KB Output is correct
25 Correct 11 ms 19404 KB Output is correct
26 Correct 14 ms 19788 KB Output is correct
27 Correct 16 ms 20012 KB Output is correct
28 Correct 299 ms 41236 KB Output is correct
29 Correct 544 ms 52144 KB Output is correct
30 Correct 793 ms 63788 KB Output is correct
31 Correct 1054 ms 74200 KB Output is correct
32 Correct 9 ms 19020 KB Output is correct
33 Correct 9 ms 19100 KB Output is correct
34 Correct 9 ms 19020 KB Output is correct
35 Correct 9 ms 19020 KB Output is correct
36 Correct 9 ms 19020 KB Output is correct
37 Correct 9 ms 19020 KB Output is correct
38 Correct 10 ms 19020 KB Output is correct
39 Correct 9 ms 19104 KB Output is correct
40 Correct 9 ms 19020 KB Output is correct
41 Correct 9 ms 19020 KB Output is correct
42 Correct 9 ms 19108 KB Output is correct
43 Correct 10 ms 19404 KB Output is correct
44 Correct 13 ms 19788 KB Output is correct
45 Correct 195 ms 39240 KB Output is correct
46 Correct 314 ms 48216 KB Output is correct
47 Correct 310 ms 48272 KB Output is correct
48 Correct 9 ms 19104 KB Output is correct
49 Correct 9 ms 19020 KB Output is correct
50 Correct 9 ms 19100 KB Output is correct
51 Correct 9 ms 19020 KB Output is correct
52 Correct 9 ms 19020 KB Output is correct
53 Correct 10 ms 19020 KB Output is correct
54 Correct 9 ms 19096 KB Output is correct
55 Correct 1265 ms 92824 KB Output is correct
56 Correct 9 ms 19020 KB Output is correct
57 Correct 13 ms 19788 KB Output is correct
58 Correct 24 ms 21476 KB Output is correct
59 Correct 33 ms 22156 KB Output is correct
60 Correct 498 ms 56504 KB Output is correct
61 Correct 713 ms 71196 KB Output is correct
62 Correct 930 ms 77892 KB Output is correct
63 Correct 1259 ms 92264 KB Output is correct
64 Correct 9 ms 19100 KB Output is correct
65 Correct 9 ms 19024 KB Output is correct
66 Correct 9 ms 19104 KB Output is correct
67 Correct 457 ms 59160 KB Output is correct
68 Correct 437 ms 59272 KB Output is correct
69 Correct 439 ms 59032 KB Output is correct
70 Correct 12 ms 19788 KB Output is correct
71 Correct 17 ms 20500 KB Output is correct
72 Correct 197 ms 39184 KB Output is correct
73 Correct 363 ms 49264 KB Output is correct
74 Correct 542 ms 59360 KB Output is correct
75 Correct 565 ms 61108 KB Output is correct
76 Correct 449 ms 59280 KB Output is correct
77 Correct 14 ms 20044 KB Output is correct
78 Correct 19 ms 20780 KB Output is correct
79 Correct 207 ms 39596 KB Output is correct
80 Correct 363 ms 49948 KB Output is correct
81 Correct 556 ms 60312 KB Output is correct
82 Correct 10 ms 19020 KB Output is correct
83 Correct 9 ms 19020 KB Output is correct
84 Correct 9 ms 19020 KB Output is correct
85 Correct 527 ms 58072 KB Output is correct
86 Correct 497 ms 57784 KB Output is correct
87 Correct 524 ms 57788 KB Output is correct
88 Correct 392 ms 51784 KB Output is correct
89 Correct 241 ms 38592 KB Output is correct
90 Correct 481 ms 51212 KB Output is correct
91 Correct 437 ms 51408 KB Output is correct
92 Correct 484 ms 57500 KB Output is correct
93 Correct 492 ms 57504 KB Output is correct
94 Correct 569 ms 57540 KB Output is correct
95 Correct 560 ms 57624 KB Output is correct
96 Correct 9 ms 19012 KB Output is correct
97 Correct 30 ms 22152 KB Output is correct
98 Correct 92 ms 28848 KB Output is correct
99 Correct 469 ms 58044 KB Output is correct
100 Correct 21 ms 20832 KB Output is correct
101 Correct 85 ms 27164 KB Output is correct
102 Correct 190 ms 35256 KB Output is correct
103 Correct 176 ms 34756 KB Output is correct
104 Correct 258 ms 40544 KB Output is correct
105 Correct 340 ms 46304 KB Output is correct
106 Correct 439 ms 52232 KB Output is correct
107 Correct 558 ms 58028 KB Output is correct
108 Correct 9 ms 19020 KB Output is correct
109 Correct 12 ms 19004 KB Output is correct
110 Correct 9 ms 19020 KB Output is correct
111 Correct 9 ms 19060 KB Output is correct
112 Correct 9 ms 19020 KB Output is correct
113 Correct 9 ms 19020 KB Output is correct
114 Correct 9 ms 19020 KB Output is correct
115 Correct 9 ms 19020 KB Output is correct
116 Correct 10 ms 19020 KB Output is correct
117 Correct 9 ms 19020 KB Output is correct
118 Correct 9 ms 19020 KB Output is correct
119 Correct 10 ms 19424 KB Output is correct
120 Correct 12 ms 19532 KB Output is correct
121 Correct 203 ms 38440 KB Output is correct
122 Correct 317 ms 47004 KB Output is correct
123 Correct 316 ms 47008 KB Output is correct
124 Correct 9 ms 19020 KB Output is correct
125 Correct 9 ms 19020 KB Output is correct
126 Correct 9 ms 19020 KB Output is correct
127 Correct 473 ms 57616 KB Output is correct
128 Correct 456 ms 57640 KB Output is correct
129 Correct 459 ms 57600 KB Output is correct
130 Correct 12 ms 19660 KB Output is correct
131 Correct 17 ms 20428 KB Output is correct
132 Correct 222 ms 38348 KB Output is correct
133 Correct 358 ms 47992 KB Output is correct
134 Correct 522 ms 57500 KB Output is correct
135 Correct 473 ms 57572 KB Output is correct
136 Correct 478 ms 57748 KB Output is correct
137 Correct 545 ms 57804 KB Output is correct
138 Correct 650 ms 59908 KB Output is correct
139 Correct 476 ms 53792 KB Output is correct
140 Correct 9 ms 19020 KB Output is correct
141 Correct 62 ms 25948 KB Output is correct
142 Correct 38 ms 22684 KB Output is correct
143 Correct 128 ms 31292 KB Output is correct
144 Correct 277 ms 39468 KB Output is correct
145 Correct 229 ms 39400 KB Output is correct
146 Correct 344 ms 44708 KB Output is correct
147 Correct 422 ms 49860 KB Output is correct
148 Correct 509 ms 54596 KB Output is correct
149 Correct 627 ms 59964 KB Output is correct
150 Correct 557 ms 59456 KB Output is correct
151 Correct 440 ms 57500 KB Output is correct
152 Correct 14 ms 19916 KB Output is correct
153 Correct 23 ms 20752 KB Output is correct
154 Correct 208 ms 38808 KB Output is correct
155 Correct 360 ms 48668 KB Output is correct
156 Correct 548 ms 58504 KB Output is correct
157 Correct 9 ms 19020 KB Output is correct
158 Correct 9 ms 19100 KB Output is correct
159 Correct 9 ms 19020 KB Output is correct
160 Correct 11 ms 19084 KB Output is correct
161 Correct 1765 ms 96012 KB Output is correct
162 Correct 465 ms 60476 KB Output is correct
163 Correct 851 ms 73020 KB Output is correct
164 Correct 846 ms 73056 KB Output is correct
165 Correct 1397 ms 93624 KB Output is correct
166 Correct 1654 ms 91204 KB Output is correct
167 Correct 201 ms 34120 KB Output is correct
168 Correct 131 ms 29388 KB Output is correct
169 Correct 505 ms 44852 KB Output is correct
170 Correct 1183 ms 66984 KB Output is correct
171 Correct 1584 ms 81604 KB Output is correct
172 Correct 715 ms 58240 KB Output is correct
173 Correct 946 ms 65416 KB Output is correct
174 Correct 1117 ms 73364 KB Output is correct
175 Correct 1371 ms 80156 KB Output is correct
176 Correct 1574 ms 89232 KB Output is correct
177 Correct 1766 ms 96348 KB Output is correct