답안 #282956

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
282956 2020-08-25T07:45:59 Z 최은수(#5745) Iqea (innopolis2018_final_C) C++17
100 / 100
1385 ms 158504 KB
#include<iostream>
#include<vector>
#include<map>
#include<algorithm>
#define ep emplace
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const int inf=1e9+7;
const ll INF=1e18;
struct dsu
{
    int pa[100010];
    inline void init()
    {
        fill(pa,pa+100010,-1);
        return;
    }
    dsu(){init();}
    int par(int x)
    {
        if(pa[x]==-1)
            return x;
        return pa[x]=par(pa[x]);
    }
    inline void uni(int x,int y)
    {
        x=par(x);
        y=par(y);
        if(x==y)
            return;
        pa[x]=y;
        return;
    }
}uf1,uf2;
vector<int>adj[200010];
int sz[200010];
void sdfs(int x,int p)
{
    sz[x]=1;
    for(int&t:adj[x])
        if(t!=p)
            sdfs(t,x),sz[x]+=sz[t];
    return;
}
bool chk[200010];
int dis[200010][18];
void dfs(int x,int p,int d,int cd)
{
    dis[x][cd]=d;
    sz[x]=1;
    for(int&t:adj[x])
        if(!chk[t]&&t!=p)
            dfs(t,x,d+1,cd),sz[x]+=sz[t];
    return;
}
int get(int x,int p,int z)
{
    int ms=-1,mi=-1;
    for(int&t:adj[x])
        if(!chk[t]&&t!=p&&sz[t]>ms)
            ms=sz[t],mi=t;
    if(ms<=sz[z]/2)
        return x;
    return get(mi,x,z);
}
int cdep[200010];
int cpa[200010];
void dnc(int x)
{
    chk[x]=1;
    for(int&t:adj[x])
    {
        if(chk[t])
            continue;
        dfs(t,x,1,cdep[x]);
        int nc=get(t,x,t);
        cpa[nc]=x;
        cdep[nc]=cdep[x]+1;
        dnc(nc);
    }
    return;
}
vector<pair<pi,int> >hv[4567890];
inline void mpput(int x,int y,int p)
{
    int hsh=x%2048*2048+y%2048;
    for(int i=0;i<(int)hv[hsh].size();i++)
    {
        if(hv[hsh][i].fi==pi(x,y))
        {
            hv[hsh][i].se=min(hv[hsh][i].se,p);
            return;
        }
    }
    hv[hsh].eb(pi(x,y),p);
    return;
}
inline int mpget(int x,int y)
{
    int hsh=x%2048*2048+y%2048;
    for(int i=0;i<(int)hv[hsh].size();i++)
        if(hv[hsh][i].fi==pi(x,y))
            return hv[hsh][i].se;
    return 0;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin>>n;
    vector<pi>p(n);
    for(pi&t:p)
        cin>>t.fi>>t.se;
    vector<pi>sxv=p,syv=p;
    auto cmp1=[](const pi&x,const pi&y){return x<y;};
    auto cmp2=[](const pi&x,const pi&y){return pi(x.se,x.fi)<pi(y.se,y.fi);};
    sort(all(sxv),cmp1);
    sort(all(syv),cmp2);
    for(int i=1;i<n;i++)
        if(sxv[i].fi==sxv[i-1].fi&&sxv[i].se==sxv[i-1].se+1)
            uf1.uni(i,i-1);
    for(int i=1;i<n;i++)
        if(syv[i].fi==syv[i-1].fi+1&&syv[i].se==syv[i-1].se)
            uf2.uni(i,i-1);
    for(int i=1;i<n;i++)
    {
        if(sxv[i].fi==sxv[i-1].fi&&sxv[i].se==sxv[i-1].se+1)
        {
            int p1=uf2.par(lower_bound(all(syv),sxv[i-1],cmp2)-syv.begin())+n;
            int p2=uf2.par(lower_bound(all(syv),sxv[i],cmp2)-syv.begin())+n;
            adj[p1].eb(p2);
            adj[p2].eb(p1);
        }
    }
    for(int i=1;i<n;i++)
    {
        if(syv[i].fi==syv[i-1].fi+1&&syv[i].se==syv[i-1].se)
        {
            int p1=uf1.par(lower_bound(all(sxv),syv[i-1],cmp1)-sxv.begin());
            int p2=uf1.par(lower_bound(all(sxv),syv[i],cmp1)-sxv.begin());
            adj[p1].eb(p2);
            adj[p2].eb(p1);
        }
    }
    for(int i=0;i<n*2;i++)
    {
        sort(all(adj[i]));
        adj[i].erase(unique(all(adj[i])),adj[i].end());
    }
    sdfs(uf1.par(0),-1);
    int c1=get(uf1.par(0),-1,uf1.par(0));
    cpa[c1]=-1;
    dnc(c1);
    sdfs(uf2.par(0)+n,-1);
    int c2=get(uf2.par(0)+n,-1,uf2.par(0)+n);
    cpa[c2]=-1;
    dnc(c2);
    int q;
    cin>>q;
    while(q-->0)
    {
        int t,x,y;
        cin>>t>>x>>y;
        int p1=uf1.par(lower_bound(all(sxv),pi(x,y),cmp1)-sxv.begin());
        int p2=uf2.par(lower_bound(all(syv),pi(x,y),cmp2)-syv.begin())+n;
        vector<int>cp1,cp2;
        while(p1!=-1)
            cp1.eb(p1),p1=cpa[p1];
        while(p2!=-1)
            cp2.eb(p2),p2=cpa[p2];
        p1=cp1[0],p2=cp2[0];
        if(t==1)
            for(int&u:cp1)
                for(int&v:cp2)
                    mpput(u,v,dis[p1][cdep[u]]+dis[p2][cdep[v]]-inf);
        else
        {
            int ans=0;
            for(int&u:cp1)
                for(int&v:cp2)
                    ans=min(ans,mpget(u,v)+dis[p1][cdep[u]]+dis[p2][cdep[v]]);
            if(ans==0)
                ans=-1;
            else
                ans+=inf;
            cout<<ans<<'\n';
        }
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 67 ms 113160 KB Output is correct
2 Correct 69 ms 113144 KB Output is correct
3 Correct 71 ms 113144 KB Output is correct
4 Correct 83 ms 114168 KB Output is correct
5 Correct 83 ms 114168 KB Output is correct
6 Correct 83 ms 114296 KB Output is correct
7 Correct 91 ms 114680 KB Output is correct
8 Correct 92 ms 114808 KB Output is correct
9 Correct 92 ms 114808 KB Output is correct
10 Correct 88 ms 114676 KB Output is correct
11 Correct 90 ms 114808 KB Output is correct
12 Correct 92 ms 114808 KB Output is correct
13 Correct 92 ms 114808 KB Output is correct
14 Correct 94 ms 114840 KB Output is correct
15 Correct 94 ms 114808 KB Output is correct
16 Correct 89 ms 114808 KB Output is correct
17 Correct 92 ms 114684 KB Output is correct
18 Correct 91 ms 114680 KB Output is correct
19 Correct 94 ms 114680 KB Output is correct
20 Correct 99 ms 114936 KB Output is correct
21 Correct 90 ms 114680 KB Output is correct
22 Correct 94 ms 114936 KB Output is correct
23 Correct 94 ms 114936 KB Output is correct
24 Correct 97 ms 115064 KB Output is correct
25 Correct 81 ms 114420 KB Output is correct
26 Correct 86 ms 114552 KB Output is correct
27 Correct 77 ms 114168 KB Output is correct
28 Correct 95 ms 115084 KB Output is correct
29 Correct 95 ms 115064 KB Output is correct
30 Correct 96 ms 115192 KB Output is correct
31 Correct 95 ms 115192 KB Output is correct
32 Correct 94 ms 115068 KB Output is correct
33 Correct 96 ms 115064 KB Output is correct
34 Correct 97 ms 115064 KB Output is correct
35 Correct 94 ms 115192 KB Output is correct
36 Correct 81 ms 114040 KB Output is correct
37 Correct 92 ms 115064 KB Output is correct
38 Correct 99 ms 115064 KB Output is correct
39 Correct 93 ms 115064 KB Output is correct
40 Correct 94 ms 115192 KB Output is correct
41 Correct 93 ms 114936 KB Output is correct
42 Correct 94 ms 114968 KB Output is correct
43 Correct 80 ms 114196 KB Output is correct
44 Correct 90 ms 114936 KB Output is correct
45 Correct 92 ms 114936 KB Output is correct
46 Correct 81 ms 114200 KB Output is correct
47 Correct 91 ms 114808 KB Output is correct
48 Correct 87 ms 114428 KB Output is correct
49 Correct 87 ms 114424 KB Output is correct
50 Correct 86 ms 114424 KB Output is correct
51 Correct 85 ms 114296 KB Output is correct
52 Correct 87 ms 114552 KB Output is correct
53 Correct 89 ms 114680 KB Output is correct
54 Correct 88 ms 114680 KB Output is correct
55 Correct 90 ms 114808 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 67 ms 113160 KB Output is correct
2 Correct 69 ms 113144 KB Output is correct
3 Correct 71 ms 113144 KB Output is correct
4 Correct 83 ms 114168 KB Output is correct
5 Correct 83 ms 114168 KB Output is correct
6 Correct 83 ms 114296 KB Output is correct
7 Correct 91 ms 114680 KB Output is correct
8 Correct 92 ms 114808 KB Output is correct
9 Correct 92 ms 114808 KB Output is correct
10 Correct 88 ms 114676 KB Output is correct
11 Correct 90 ms 114808 KB Output is correct
12 Correct 92 ms 114808 KB Output is correct
13 Correct 92 ms 114808 KB Output is correct
14 Correct 94 ms 114840 KB Output is correct
15 Correct 94 ms 114808 KB Output is correct
16 Correct 89 ms 114808 KB Output is correct
17 Correct 92 ms 114684 KB Output is correct
18 Correct 91 ms 114680 KB Output is correct
19 Correct 94 ms 114680 KB Output is correct
20 Correct 99 ms 114936 KB Output is correct
21 Correct 90 ms 114680 KB Output is correct
22 Correct 94 ms 114936 KB Output is correct
23 Correct 94 ms 114936 KB Output is correct
24 Correct 97 ms 115064 KB Output is correct
25 Correct 81 ms 114420 KB Output is correct
26 Correct 86 ms 114552 KB Output is correct
27 Correct 77 ms 114168 KB Output is correct
28 Correct 95 ms 115084 KB Output is correct
29 Correct 95 ms 115064 KB Output is correct
30 Correct 96 ms 115192 KB Output is correct
31 Correct 95 ms 115192 KB Output is correct
32 Correct 94 ms 115068 KB Output is correct
33 Correct 96 ms 115064 KB Output is correct
34 Correct 97 ms 115064 KB Output is correct
35 Correct 94 ms 115192 KB Output is correct
36 Correct 81 ms 114040 KB Output is correct
37 Correct 92 ms 115064 KB Output is correct
38 Correct 99 ms 115064 KB Output is correct
39 Correct 93 ms 115064 KB Output is correct
40 Correct 94 ms 115192 KB Output is correct
41 Correct 93 ms 114936 KB Output is correct
42 Correct 94 ms 114968 KB Output is correct
43 Correct 80 ms 114196 KB Output is correct
44 Correct 90 ms 114936 KB Output is correct
45 Correct 92 ms 114936 KB Output is correct
46 Correct 81 ms 114200 KB Output is correct
47 Correct 91 ms 114808 KB Output is correct
48 Correct 87 ms 114428 KB Output is correct
49 Correct 87 ms 114424 KB Output is correct
50 Correct 86 ms 114424 KB Output is correct
51 Correct 85 ms 114296 KB Output is correct
52 Correct 87 ms 114552 KB Output is correct
53 Correct 89 ms 114680 KB Output is correct
54 Correct 88 ms 114680 KB Output is correct
55 Correct 90 ms 114808 KB Output is correct
56 Correct 218 ms 114552 KB Output is correct
57 Correct 217 ms 114556 KB Output is correct
58 Correct 229 ms 114940 KB Output is correct
59 Correct 310 ms 115440 KB Output is correct
60 Correct 332 ms 115576 KB Output is correct
61 Correct 350 ms 115716 KB Output is correct
62 Correct 353 ms 115436 KB Output is correct
63 Correct 303 ms 115448 KB Output is correct
64 Correct 322 ms 115688 KB Output is correct
65 Correct 331 ms 115576 KB Output is correct
66 Correct 317 ms 115664 KB Output is correct
67 Correct 306 ms 115704 KB Output is correct
68 Correct 323 ms 115496 KB Output is correct
69 Correct 312 ms 115576 KB Output is correct
70 Correct 314 ms 115448 KB Output is correct
71 Correct 295 ms 115192 KB Output is correct
72 Correct 315 ms 115488 KB Output is correct
73 Correct 319 ms 115544 KB Output is correct
74 Correct 207 ms 114760 KB Output is correct
75 Correct 217 ms 115452 KB Output is correct
76 Correct 181 ms 114552 KB Output is correct
77 Correct 398 ms 116344 KB Output is correct
78 Correct 387 ms 116088 KB Output is correct
79 Correct 212 ms 114464 KB Output is correct
80 Correct 366 ms 116088 KB Output is correct
81 Correct 376 ms 116088 KB Output is correct
82 Correct 349 ms 115960 KB Output is correct
83 Correct 408 ms 116216 KB Output is correct
84 Correct 239 ms 114680 KB Output is correct
85 Correct 366 ms 116000 KB Output is correct
86 Correct 344 ms 115832 KB Output is correct
87 Correct 182 ms 114928 KB Output is correct
88 Correct 307 ms 115192 KB Output is correct
89 Correct 287 ms 115064 KB Output is correct
90 Correct 273 ms 114960 KB Output is correct
91 Correct 253 ms 114936 KB Output is correct
92 Correct 244 ms 114776 KB Output is correct
93 Correct 328 ms 115352 KB Output is correct
94 Correct 350 ms 115320 KB Output is correct
95 Correct 313 ms 115320 KB Output is correct
96 Correct 311 ms 115448 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 398 ms 133624 KB Output is correct
2 Correct 445 ms 133496 KB Output is correct
3 Correct 1225 ms 156152 KB Output is correct
4 Correct 1290 ms 156536 KB Output is correct
5 Correct 1311 ms 157136 KB Output is correct
6 Correct 1361 ms 157304 KB Output is correct
7 Correct 766 ms 133624 KB Output is correct
8 Correct 381 ms 133496 KB Output is correct
9 Correct 337 ms 134904 KB Output is correct
10 Correct 952 ms 134520 KB Output is correct
11 Correct 561 ms 135928 KB Output is correct
12 Correct 376 ms 136184 KB Output is correct
13 Correct 338 ms 134264 KB Output is correct
14 Correct 354 ms 135032 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1012 ms 147832 KB Output is correct
2 Correct 1034 ms 148472 KB Output is correct
3 Correct 1080 ms 148344 KB Output is correct
4 Correct 1108 ms 148984 KB Output is correct
5 Correct 1097 ms 148712 KB Output is correct
6 Correct 1119 ms 148728 KB Output is correct
7 Correct 1069 ms 147904 KB Output is correct
8 Correct 1004 ms 148164 KB Output is correct
9 Correct 1066 ms 148516 KB Output is correct
10 Correct 1302 ms 153764 KB Output is correct
11 Correct 1169 ms 155128 KB Output is correct
12 Correct 1385 ms 157188 KB Output is correct
13 Correct 450 ms 139000 KB Output is correct
14 Correct 511 ms 146304 KB Output is correct
15 Correct 352 ms 135544 KB Output is correct
16 Correct 1292 ms 156664 KB Output is correct
17 Correct 1242 ms 156536 KB Output is correct
18 Correct 1348 ms 157156 KB Output is correct
19 Correct 1273 ms 157068 KB Output is correct
20 Correct 1191 ms 157580 KB Output is correct
21 Correct 1320 ms 158456 KB Output is correct
22 Correct 1363 ms 157780 KB Output is correct
23 Correct 1276 ms 158504 KB Output is correct
24 Correct 376 ms 134520 KB Output is correct
25 Correct 1242 ms 156664 KB Output is correct
26 Correct 1262 ms 156528 KB Output is correct
27 Correct 1240 ms 157048 KB Output is correct
28 Correct 1322 ms 157304 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 67 ms 113160 KB Output is correct
2 Correct 69 ms 113144 KB Output is correct
3 Correct 71 ms 113144 KB Output is correct
4 Correct 83 ms 114168 KB Output is correct
5 Correct 83 ms 114168 KB Output is correct
6 Correct 83 ms 114296 KB Output is correct
7 Correct 91 ms 114680 KB Output is correct
8 Correct 92 ms 114808 KB Output is correct
9 Correct 92 ms 114808 KB Output is correct
10 Correct 88 ms 114676 KB Output is correct
11 Correct 90 ms 114808 KB Output is correct
12 Correct 92 ms 114808 KB Output is correct
13 Correct 92 ms 114808 KB Output is correct
14 Correct 94 ms 114840 KB Output is correct
15 Correct 94 ms 114808 KB Output is correct
16 Correct 89 ms 114808 KB Output is correct
17 Correct 92 ms 114684 KB Output is correct
18 Correct 91 ms 114680 KB Output is correct
19 Correct 94 ms 114680 KB Output is correct
20 Correct 99 ms 114936 KB Output is correct
21 Correct 90 ms 114680 KB Output is correct
22 Correct 94 ms 114936 KB Output is correct
23 Correct 94 ms 114936 KB Output is correct
24 Correct 97 ms 115064 KB Output is correct
25 Correct 81 ms 114420 KB Output is correct
26 Correct 86 ms 114552 KB Output is correct
27 Correct 77 ms 114168 KB Output is correct
28 Correct 95 ms 115084 KB Output is correct
29 Correct 95 ms 115064 KB Output is correct
30 Correct 96 ms 115192 KB Output is correct
31 Correct 95 ms 115192 KB Output is correct
32 Correct 94 ms 115068 KB Output is correct
33 Correct 96 ms 115064 KB Output is correct
34 Correct 97 ms 115064 KB Output is correct
35 Correct 94 ms 115192 KB Output is correct
36 Correct 81 ms 114040 KB Output is correct
37 Correct 92 ms 115064 KB Output is correct
38 Correct 99 ms 115064 KB Output is correct
39 Correct 93 ms 115064 KB Output is correct
40 Correct 94 ms 115192 KB Output is correct
41 Correct 93 ms 114936 KB Output is correct
42 Correct 94 ms 114968 KB Output is correct
43 Correct 80 ms 114196 KB Output is correct
44 Correct 90 ms 114936 KB Output is correct
45 Correct 92 ms 114936 KB Output is correct
46 Correct 81 ms 114200 KB Output is correct
47 Correct 91 ms 114808 KB Output is correct
48 Correct 87 ms 114428 KB Output is correct
49 Correct 87 ms 114424 KB Output is correct
50 Correct 86 ms 114424 KB Output is correct
51 Correct 85 ms 114296 KB Output is correct
52 Correct 87 ms 114552 KB Output is correct
53 Correct 89 ms 114680 KB Output is correct
54 Correct 88 ms 114680 KB Output is correct
55 Correct 90 ms 114808 KB Output is correct
56 Correct 218 ms 114552 KB Output is correct
57 Correct 217 ms 114556 KB Output is correct
58 Correct 229 ms 114940 KB Output is correct
59 Correct 310 ms 115440 KB Output is correct
60 Correct 332 ms 115576 KB Output is correct
61 Correct 350 ms 115716 KB Output is correct
62 Correct 353 ms 115436 KB Output is correct
63 Correct 303 ms 115448 KB Output is correct
64 Correct 322 ms 115688 KB Output is correct
65 Correct 331 ms 115576 KB Output is correct
66 Correct 317 ms 115664 KB Output is correct
67 Correct 306 ms 115704 KB Output is correct
68 Correct 323 ms 115496 KB Output is correct
69 Correct 312 ms 115576 KB Output is correct
70 Correct 314 ms 115448 KB Output is correct
71 Correct 295 ms 115192 KB Output is correct
72 Correct 315 ms 115488 KB Output is correct
73 Correct 319 ms 115544 KB Output is correct
74 Correct 207 ms 114760 KB Output is correct
75 Correct 217 ms 115452 KB Output is correct
76 Correct 181 ms 114552 KB Output is correct
77 Correct 398 ms 116344 KB Output is correct
78 Correct 387 ms 116088 KB Output is correct
79 Correct 212 ms 114464 KB Output is correct
80 Correct 366 ms 116088 KB Output is correct
81 Correct 376 ms 116088 KB Output is correct
82 Correct 349 ms 115960 KB Output is correct
83 Correct 408 ms 116216 KB Output is correct
84 Correct 239 ms 114680 KB Output is correct
85 Correct 366 ms 116000 KB Output is correct
86 Correct 344 ms 115832 KB Output is correct
87 Correct 182 ms 114928 KB Output is correct
88 Correct 307 ms 115192 KB Output is correct
89 Correct 287 ms 115064 KB Output is correct
90 Correct 273 ms 114960 KB Output is correct
91 Correct 253 ms 114936 KB Output is correct
92 Correct 244 ms 114776 KB Output is correct
93 Correct 328 ms 115352 KB Output is correct
94 Correct 350 ms 115320 KB Output is correct
95 Correct 313 ms 115320 KB Output is correct
96 Correct 311 ms 115448 KB Output is correct
97 Correct 398 ms 133624 KB Output is correct
98 Correct 445 ms 133496 KB Output is correct
99 Correct 1225 ms 156152 KB Output is correct
100 Correct 1290 ms 156536 KB Output is correct
101 Correct 1311 ms 157136 KB Output is correct
102 Correct 1361 ms 157304 KB Output is correct
103 Correct 766 ms 133624 KB Output is correct
104 Correct 381 ms 133496 KB Output is correct
105 Correct 337 ms 134904 KB Output is correct
106 Correct 952 ms 134520 KB Output is correct
107 Correct 561 ms 135928 KB Output is correct
108 Correct 376 ms 136184 KB Output is correct
109 Correct 338 ms 134264 KB Output is correct
110 Correct 354 ms 135032 KB Output is correct
111 Correct 1012 ms 147832 KB Output is correct
112 Correct 1034 ms 148472 KB Output is correct
113 Correct 1080 ms 148344 KB Output is correct
114 Correct 1108 ms 148984 KB Output is correct
115 Correct 1097 ms 148712 KB Output is correct
116 Correct 1119 ms 148728 KB Output is correct
117 Correct 1069 ms 147904 KB Output is correct
118 Correct 1004 ms 148164 KB Output is correct
119 Correct 1066 ms 148516 KB Output is correct
120 Correct 1302 ms 153764 KB Output is correct
121 Correct 1169 ms 155128 KB Output is correct
122 Correct 1385 ms 157188 KB Output is correct
123 Correct 450 ms 139000 KB Output is correct
124 Correct 511 ms 146304 KB Output is correct
125 Correct 352 ms 135544 KB Output is correct
126 Correct 1292 ms 156664 KB Output is correct
127 Correct 1242 ms 156536 KB Output is correct
128 Correct 1348 ms 157156 KB Output is correct
129 Correct 1273 ms 157068 KB Output is correct
130 Correct 1191 ms 157580 KB Output is correct
131 Correct 1320 ms 158456 KB Output is correct
132 Correct 1363 ms 157780 KB Output is correct
133 Correct 1276 ms 158504 KB Output is correct
134 Correct 376 ms 134520 KB Output is correct
135 Correct 1242 ms 156664 KB Output is correct
136 Correct 1262 ms 156528 KB Output is correct
137 Correct 1240 ms 157048 KB Output is correct
138 Correct 1322 ms 157304 KB Output is correct
139 Correct 510 ms 128248 KB Output is correct
140 Correct 593 ms 129656 KB Output is correct
141 Correct 543 ms 129016 KB Output is correct
142 Correct 589 ms 129760 KB Output is correct
143 Correct 1025 ms 148344 KB Output is correct
144 Correct 1109 ms 148216 KB Output is correct
145 Correct 1018 ms 148600 KB Output is correct
146 Correct 931 ms 144584 KB Output is correct
147 Correct 1096 ms 150392 KB Output is correct
148 Correct 1101 ms 150400 KB Output is correct
149 Correct 1198 ms 154744 KB Output is correct
150 Correct 1217 ms 153240 KB Output is correct
151 Correct 393 ms 134648 KB Output is correct
152 Correct 1219 ms 154392 KB Output is correct
153 Correct 1267 ms 153160 KB Output is correct
154 Correct 352 ms 134648 KB Output is correct
155 Correct 1041 ms 146520 KB Output is correct
156 Correct 899 ms 144220 KB Output is correct
157 Correct 861 ms 142936 KB Output is correct
158 Correct 797 ms 141536 KB Output is correct
159 Correct 721 ms 139516 KB Output is correct
160 Correct 970 ms 147832 KB Output is correct
161 Correct 975 ms 147908 KB Output is correct
162 Correct 961 ms 147788 KB Output is correct
163 Correct 1002 ms 147912 KB Output is correct