Submission #273529

# Submission time Handle Problem Language Result Execution time Memory
273529 2020-08-19T05:44:20 Z 최은수(#5105) Mountains and Valleys (CCO20_day1problem3) C++17
16 / 25
7000 ms 23184 KB
#include<iostream>
#include<vector>
#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;
vector<pi>adj[500010];
int dep[500010];
void dfs(int x,int p)
{
    dep[x]=dep[p]+1;
    for(pi&t:adj[x])
        if(t.fi!=p)
            dfs(t.fi,x);
    return;
}
vector<int>dv;
bool chk[500010];
void dfs2(int x,int p)
{
    dv.eb(x);
    dep[x]=dep[p]+1;
    for(pi&t:adj[x])
        if(!chk[t.se]&&t.fi!=p)
            dfs2(t.fi,x);
    return;
}
int pa[500010],pai[500010];
int dp[500010];
void sdfs(int x,int p)
{
    pa[x]=p;
    dp[x]=dep[x]=dep[p]+1;
    for(pi&t:adj[x])
    {
        if(t.fi==p)
            pai[x]=t.se;
        else
            sdfs(t.fi,x);
    }
    return;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int n,m;
    cin>>n>>m;
    vector<pair<pi,int> >ev;
    for(int i=0;i<m;i++)
    {
        int u,v,w;
        cin>>u>>v>>w;
        u++,v++;
        if(w==1)
            adj[u].eb(v,i),adj[v].eb(u,i);
        else if(w*2<n)
            ev.eb(pi(u,v),w);
    }
    int ans=inf;
    {
        sdfs(1,0);
        int d1=max_element(dep+1,dep+n+1)-dep;
        dfs(d1,0);
        ans=2*n-1-*max_element(dep+1,dep+n+1);
    }
    for(auto&t:ev)
    {
        int u=t.fi.fi;
        int v=t.fi.se;
        int w=t.se;
        vector<int>rest;
        vector<int>ch;
        ch.eb(u);
        {
            vector<int>ch2;
            ch2.eb(v);
            for(int uc=u,vc=v;uc!=vc;)
            {
                if(dp[uc]>dp[vc])
                    rest.eb(pai[uc]),uc=pa[uc],ch.eb(uc);
                else
                    rest.eb(pai[vc]),vc=pa[vc],ch2.eb(vc);
            }
            ch2.pop_back();
            reverse(all(ch2));
            for(int&t:ch2)
                ch.eb(t);
        }
        int len=(int)ch.size()-1;
        for(int&t:rest)
            chk[t]=1;
        vector<int>mxd;
        for(int&t:ch)
        {
            dv.clear();
            dfs2(t,0);
            int mx=-1,mi=-1;
            for(int&t:dv)
                if(dep[t]>mx)
                    mx=dep[t],mi=t;
            mxd.eb(mx-1);
            dv.clear();
            dfs2(mi,0);
            mx=-1;
            for(int&t:dv)
                if(dep[t]>mx)
                    mx=dep[t];
            ans=min(ans,n*2-1-mx-len+w);
        }
        vector<int>suf;
        suf.eb(mxd[len]);
        for(int i=len;i-->0;)
            suf.eb(max(suf.back(),mxd[i]+len-i));
        int mx=0;
        for(int i=0;i<len;i++)
        {
            mx=max(mx,i+mxd[i]);
            ans=min(ans,n*2-4-mx-suf[len-i-1]+w);
        }
        for(int&t:rest)
            chk[t]=0;
    }
    cout<<ans<<endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 9 ms 12032 KB Output is correct
2 Correct 9 ms 12032 KB Output is correct
3 Correct 8 ms 12160 KB Output is correct
4 Correct 8 ms 12160 KB Output is correct
5 Correct 9 ms 12160 KB Output is correct
6 Correct 9 ms 12160 KB Output is correct
7 Correct 8 ms 12160 KB Output is correct
8 Correct 8 ms 12160 KB Output is correct
9 Correct 8 ms 12160 KB Output is correct
10 Correct 8 ms 12160 KB Output is correct
11 Correct 8 ms 12160 KB Output is correct
12 Correct 9 ms 12160 KB Output is correct
13 Correct 8 ms 12160 KB Output is correct
14 Correct 9 ms 12160 KB Output is correct
15 Correct 9 ms 12160 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 12032 KB Output is correct
2 Correct 9 ms 12032 KB Output is correct
3 Correct 8 ms 12160 KB Output is correct
4 Correct 8 ms 12160 KB Output is correct
5 Correct 9 ms 12160 KB Output is correct
6 Correct 9 ms 12160 KB Output is correct
7 Correct 8 ms 12160 KB Output is correct
8 Correct 8 ms 12160 KB Output is correct
9 Correct 8 ms 12160 KB Output is correct
10 Correct 8 ms 12160 KB Output is correct
11 Correct 8 ms 12160 KB Output is correct
12 Correct 9 ms 12160 KB Output is correct
13 Correct 8 ms 12160 KB Output is correct
14 Correct 9 ms 12160 KB Output is correct
15 Correct 9 ms 12160 KB Output is correct
16 Correct 8 ms 12160 KB Output is correct
17 Correct 8 ms 12160 KB Output is correct
18 Correct 8 ms 12160 KB Output is correct
19 Correct 8 ms 12160 KB Output is correct
20 Correct 8 ms 12160 KB Output is correct
21 Correct 8 ms 12160 KB Output is correct
22 Correct 8 ms 12160 KB Output is correct
23 Correct 8 ms 12160 KB Output is correct
24 Correct 8 ms 12160 KB Output is correct
25 Correct 8 ms 12160 KB Output is correct
26 Correct 8 ms 12160 KB Output is correct
27 Correct 8 ms 12160 KB Output is correct
28 Correct 9 ms 12160 KB Output is correct
29 Correct 8 ms 12160 KB Output is correct
30 Correct 9 ms 12160 KB Output is correct
31 Correct 8 ms 12160 KB Output is correct
32 Correct 9 ms 12160 KB Output is correct
33 Correct 8 ms 12160 KB Output is correct
34 Correct 8 ms 12160 KB Output is correct
35 Correct 8 ms 12160 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 12 ms 12544 KB Output is correct
2 Correct 12 ms 12544 KB Output is correct
3 Correct 12 ms 12544 KB Output is correct
4 Correct 12 ms 12416 KB Output is correct
5 Correct 12 ms 12416 KB Output is correct
6 Correct 13 ms 12416 KB Output is correct
7 Correct 12 ms 12544 KB Output is correct
8 Correct 12 ms 12544 KB Output is correct
9 Correct 12 ms 12544 KB Output is correct
10 Correct 12 ms 12416 KB Output is correct
11 Correct 12 ms 12416 KB Output is correct
12 Correct 12 ms 12416 KB Output is correct
13 Correct 12 ms 12544 KB Output is correct
14 Correct 13 ms 12544 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 12032 KB Output is correct
2 Correct 9 ms 12032 KB Output is correct
3 Correct 8 ms 12160 KB Output is correct
4 Correct 8 ms 12160 KB Output is correct
5 Correct 9 ms 12160 KB Output is correct
6 Correct 9 ms 12160 KB Output is correct
7 Correct 8 ms 12160 KB Output is correct
8 Correct 8 ms 12160 KB Output is correct
9 Correct 8 ms 12160 KB Output is correct
10 Correct 8 ms 12160 KB Output is correct
11 Correct 8 ms 12160 KB Output is correct
12 Correct 9 ms 12160 KB Output is correct
13 Correct 8 ms 12160 KB Output is correct
14 Correct 9 ms 12160 KB Output is correct
15 Correct 9 ms 12160 KB Output is correct
16 Correct 8 ms 12160 KB Output is correct
17 Correct 8 ms 12160 KB Output is correct
18 Correct 8 ms 12160 KB Output is correct
19 Correct 8 ms 12160 KB Output is correct
20 Correct 8 ms 12160 KB Output is correct
21 Correct 8 ms 12160 KB Output is correct
22 Correct 8 ms 12160 KB Output is correct
23 Correct 8 ms 12160 KB Output is correct
24 Correct 8 ms 12160 KB Output is correct
25 Correct 8 ms 12160 KB Output is correct
26 Correct 8 ms 12160 KB Output is correct
27 Correct 8 ms 12160 KB Output is correct
28 Correct 9 ms 12160 KB Output is correct
29 Correct 8 ms 12160 KB Output is correct
30 Correct 9 ms 12160 KB Output is correct
31 Correct 8 ms 12160 KB Output is correct
32 Correct 9 ms 12160 KB Output is correct
33 Correct 8 ms 12160 KB Output is correct
34 Correct 8 ms 12160 KB Output is correct
35 Correct 8 ms 12160 KB Output is correct
36 Correct 9 ms 12160 KB Output is correct
37 Correct 9 ms 12160 KB Output is correct
38 Correct 9 ms 12160 KB Output is correct
39 Correct 10 ms 12160 KB Output is correct
40 Correct 9 ms 12160 KB Output is correct
41 Correct 9 ms 12160 KB Output is correct
42 Correct 9 ms 12160 KB Output is correct
43 Correct 10 ms 12160 KB Output is correct
44 Correct 9 ms 12160 KB Output is correct
45 Correct 10 ms 12160 KB Output is correct
46 Correct 9 ms 12160 KB Output is correct
47 Correct 9 ms 12160 KB Output is correct
48 Correct 9 ms 12160 KB Output is correct
49 Correct 8 ms 12160 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 12032 KB Output is correct
2 Correct 9 ms 12032 KB Output is correct
3 Correct 8 ms 12160 KB Output is correct
4 Correct 8 ms 12160 KB Output is correct
5 Correct 9 ms 12160 KB Output is correct
6 Correct 9 ms 12160 KB Output is correct
7 Correct 8 ms 12160 KB Output is correct
8 Correct 8 ms 12160 KB Output is correct
9 Correct 8 ms 12160 KB Output is correct
10 Correct 8 ms 12160 KB Output is correct
11 Correct 8 ms 12160 KB Output is correct
12 Correct 9 ms 12160 KB Output is correct
13 Correct 8 ms 12160 KB Output is correct
14 Correct 9 ms 12160 KB Output is correct
15 Correct 9 ms 12160 KB Output is correct
16 Correct 8 ms 12160 KB Output is correct
17 Correct 8 ms 12160 KB Output is correct
18 Correct 8 ms 12160 KB Output is correct
19 Correct 8 ms 12160 KB Output is correct
20 Correct 8 ms 12160 KB Output is correct
21 Correct 8 ms 12160 KB Output is correct
22 Correct 8 ms 12160 KB Output is correct
23 Correct 8 ms 12160 KB Output is correct
24 Correct 8 ms 12160 KB Output is correct
25 Correct 8 ms 12160 KB Output is correct
26 Correct 8 ms 12160 KB Output is correct
27 Correct 8 ms 12160 KB Output is correct
28 Correct 9 ms 12160 KB Output is correct
29 Correct 8 ms 12160 KB Output is correct
30 Correct 9 ms 12160 KB Output is correct
31 Correct 8 ms 12160 KB Output is correct
32 Correct 9 ms 12160 KB Output is correct
33 Correct 8 ms 12160 KB Output is correct
34 Correct 8 ms 12160 KB Output is correct
35 Correct 8 ms 12160 KB Output is correct
36 Correct 9 ms 12160 KB Output is correct
37 Correct 9 ms 12160 KB Output is correct
38 Correct 9 ms 12160 KB Output is correct
39 Correct 10 ms 12160 KB Output is correct
40 Correct 9 ms 12160 KB Output is correct
41 Correct 9 ms 12160 KB Output is correct
42 Correct 9 ms 12160 KB Output is correct
43 Correct 10 ms 12160 KB Output is correct
44 Correct 9 ms 12160 KB Output is correct
45 Correct 10 ms 12160 KB Output is correct
46 Correct 9 ms 12160 KB Output is correct
47 Correct 9 ms 12160 KB Output is correct
48 Correct 9 ms 12160 KB Output is correct
49 Correct 8 ms 12160 KB Output is correct
50 Correct 23 ms 12160 KB Output is correct
51 Correct 21 ms 12160 KB Output is correct
52 Correct 23 ms 12160 KB Output is correct
53 Correct 24 ms 12160 KB Output is correct
54 Correct 24 ms 12160 KB Output is correct
55 Correct 12 ms 12160 KB Output is correct
56 Correct 23 ms 12160 KB Output is correct
57 Correct 24 ms 12160 KB Output is correct
58 Correct 24 ms 12288 KB Output is correct
59 Correct 24 ms 12160 KB Output is correct
60 Correct 23 ms 12160 KB Output is correct
61 Correct 24 ms 12160 KB Output is correct
62 Correct 11 ms 12160 KB Output is correct
63 Correct 11 ms 12160 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 12032 KB Output is correct
2 Correct 9 ms 12032 KB Output is correct
3 Correct 8 ms 12160 KB Output is correct
4 Correct 8 ms 12160 KB Output is correct
5 Correct 9 ms 12160 KB Output is correct
6 Correct 9 ms 12160 KB Output is correct
7 Correct 8 ms 12160 KB Output is correct
8 Correct 8 ms 12160 KB Output is correct
9 Correct 8 ms 12160 KB Output is correct
10 Correct 8 ms 12160 KB Output is correct
11 Correct 8 ms 12160 KB Output is correct
12 Correct 9 ms 12160 KB Output is correct
13 Correct 8 ms 12160 KB Output is correct
14 Correct 9 ms 12160 KB Output is correct
15 Correct 9 ms 12160 KB Output is correct
16 Correct 8 ms 12160 KB Output is correct
17 Correct 8 ms 12160 KB Output is correct
18 Correct 8 ms 12160 KB Output is correct
19 Correct 8 ms 12160 KB Output is correct
20 Correct 8 ms 12160 KB Output is correct
21 Correct 8 ms 12160 KB Output is correct
22 Correct 8 ms 12160 KB Output is correct
23 Correct 8 ms 12160 KB Output is correct
24 Correct 8 ms 12160 KB Output is correct
25 Correct 8 ms 12160 KB Output is correct
26 Correct 8 ms 12160 KB Output is correct
27 Correct 8 ms 12160 KB Output is correct
28 Correct 9 ms 12160 KB Output is correct
29 Correct 8 ms 12160 KB Output is correct
30 Correct 9 ms 12160 KB Output is correct
31 Correct 8 ms 12160 KB Output is correct
32 Correct 9 ms 12160 KB Output is correct
33 Correct 8 ms 12160 KB Output is correct
34 Correct 8 ms 12160 KB Output is correct
35 Correct 8 ms 12160 KB Output is correct
36 Correct 12 ms 12544 KB Output is correct
37 Correct 12 ms 12544 KB Output is correct
38 Correct 12 ms 12544 KB Output is correct
39 Correct 12 ms 12416 KB Output is correct
40 Correct 12 ms 12416 KB Output is correct
41 Correct 13 ms 12416 KB Output is correct
42 Correct 12 ms 12544 KB Output is correct
43 Correct 12 ms 12544 KB Output is correct
44 Correct 12 ms 12544 KB Output is correct
45 Correct 12 ms 12416 KB Output is correct
46 Correct 12 ms 12416 KB Output is correct
47 Correct 12 ms 12416 KB Output is correct
48 Correct 12 ms 12544 KB Output is correct
49 Correct 13 ms 12544 KB Output is correct
50 Correct 9 ms 12160 KB Output is correct
51 Correct 9 ms 12160 KB Output is correct
52 Correct 9 ms 12160 KB Output is correct
53 Correct 10 ms 12160 KB Output is correct
54 Correct 9 ms 12160 KB Output is correct
55 Correct 9 ms 12160 KB Output is correct
56 Correct 9 ms 12160 KB Output is correct
57 Correct 10 ms 12160 KB Output is correct
58 Correct 9 ms 12160 KB Output is correct
59 Correct 10 ms 12160 KB Output is correct
60 Correct 9 ms 12160 KB Output is correct
61 Correct 9 ms 12160 KB Output is correct
62 Correct 9 ms 12160 KB Output is correct
63 Correct 8 ms 12160 KB Output is correct
64 Correct 23 ms 12160 KB Output is correct
65 Correct 21 ms 12160 KB Output is correct
66 Correct 23 ms 12160 KB Output is correct
67 Correct 24 ms 12160 KB Output is correct
68 Correct 24 ms 12160 KB Output is correct
69 Correct 12 ms 12160 KB Output is correct
70 Correct 23 ms 12160 KB Output is correct
71 Correct 24 ms 12160 KB Output is correct
72 Correct 24 ms 12288 KB Output is correct
73 Correct 24 ms 12160 KB Output is correct
74 Correct 23 ms 12160 KB Output is correct
75 Correct 24 ms 12160 KB Output is correct
76 Correct 11 ms 12160 KB Output is correct
77 Correct 11 ms 12160 KB Output is correct
78 Correct 1579 ms 12928 KB Output is correct
79 Correct 1133 ms 13148 KB Output is correct
80 Correct 1616 ms 12832 KB Output is correct
81 Correct 1795 ms 12920 KB Output is correct
82 Correct 1761 ms 12752 KB Output is correct
83 Correct 332 ms 12792 KB Output is correct
84 Correct 1389 ms 13140 KB Output is correct
85 Correct 1720 ms 12920 KB Output is correct
86 Correct 1539 ms 12996 KB Output is correct
87 Correct 1735 ms 12808 KB Output is correct
88 Correct 1701 ms 12844 KB Output is correct
89 Correct 1765 ms 12804 KB Output is correct
90 Correct 298 ms 12792 KB Output is correct
91 Correct 297 ms 12672 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 12032 KB Output is correct
2 Correct 9 ms 12032 KB Output is correct
3 Correct 8 ms 12160 KB Output is correct
4 Correct 8 ms 12160 KB Output is correct
5 Correct 9 ms 12160 KB Output is correct
6 Correct 9 ms 12160 KB Output is correct
7 Correct 8 ms 12160 KB Output is correct
8 Correct 8 ms 12160 KB Output is correct
9 Correct 8 ms 12160 KB Output is correct
10 Correct 8 ms 12160 KB Output is correct
11 Correct 8 ms 12160 KB Output is correct
12 Correct 9 ms 12160 KB Output is correct
13 Correct 8 ms 12160 KB Output is correct
14 Correct 9 ms 12160 KB Output is correct
15 Correct 9 ms 12160 KB Output is correct
16 Correct 8 ms 12160 KB Output is correct
17 Correct 8 ms 12160 KB Output is correct
18 Correct 8 ms 12160 KB Output is correct
19 Correct 8 ms 12160 KB Output is correct
20 Correct 8 ms 12160 KB Output is correct
21 Correct 8 ms 12160 KB Output is correct
22 Correct 8 ms 12160 KB Output is correct
23 Correct 8 ms 12160 KB Output is correct
24 Correct 8 ms 12160 KB Output is correct
25 Correct 8 ms 12160 KB Output is correct
26 Correct 8 ms 12160 KB Output is correct
27 Correct 8 ms 12160 KB Output is correct
28 Correct 9 ms 12160 KB Output is correct
29 Correct 8 ms 12160 KB Output is correct
30 Correct 9 ms 12160 KB Output is correct
31 Correct 8 ms 12160 KB Output is correct
32 Correct 9 ms 12160 KB Output is correct
33 Correct 8 ms 12160 KB Output is correct
34 Correct 8 ms 12160 KB Output is correct
35 Correct 8 ms 12160 KB Output is correct
36 Correct 12 ms 12544 KB Output is correct
37 Correct 12 ms 12544 KB Output is correct
38 Correct 12 ms 12544 KB Output is correct
39 Correct 12 ms 12416 KB Output is correct
40 Correct 12 ms 12416 KB Output is correct
41 Correct 13 ms 12416 KB Output is correct
42 Correct 12 ms 12544 KB Output is correct
43 Correct 12 ms 12544 KB Output is correct
44 Correct 12 ms 12544 KB Output is correct
45 Correct 12 ms 12416 KB Output is correct
46 Correct 12 ms 12416 KB Output is correct
47 Correct 12 ms 12416 KB Output is correct
48 Correct 12 ms 12544 KB Output is correct
49 Correct 13 ms 12544 KB Output is correct
50 Correct 9 ms 12160 KB Output is correct
51 Correct 9 ms 12160 KB Output is correct
52 Correct 9 ms 12160 KB Output is correct
53 Correct 10 ms 12160 KB Output is correct
54 Correct 9 ms 12160 KB Output is correct
55 Correct 9 ms 12160 KB Output is correct
56 Correct 9 ms 12160 KB Output is correct
57 Correct 10 ms 12160 KB Output is correct
58 Correct 9 ms 12160 KB Output is correct
59 Correct 10 ms 12160 KB Output is correct
60 Correct 9 ms 12160 KB Output is correct
61 Correct 9 ms 12160 KB Output is correct
62 Correct 9 ms 12160 KB Output is correct
63 Correct 8 ms 12160 KB Output is correct
64 Correct 23 ms 12160 KB Output is correct
65 Correct 21 ms 12160 KB Output is correct
66 Correct 23 ms 12160 KB Output is correct
67 Correct 24 ms 12160 KB Output is correct
68 Correct 24 ms 12160 KB Output is correct
69 Correct 12 ms 12160 KB Output is correct
70 Correct 23 ms 12160 KB Output is correct
71 Correct 24 ms 12160 KB Output is correct
72 Correct 24 ms 12288 KB Output is correct
73 Correct 24 ms 12160 KB Output is correct
74 Correct 23 ms 12160 KB Output is correct
75 Correct 24 ms 12160 KB Output is correct
76 Correct 11 ms 12160 KB Output is correct
77 Correct 11 ms 12160 KB Output is correct
78 Correct 1579 ms 12928 KB Output is correct
79 Correct 1133 ms 13148 KB Output is correct
80 Correct 1616 ms 12832 KB Output is correct
81 Correct 1795 ms 12920 KB Output is correct
82 Correct 1761 ms 12752 KB Output is correct
83 Correct 332 ms 12792 KB Output is correct
84 Correct 1389 ms 13140 KB Output is correct
85 Correct 1720 ms 12920 KB Output is correct
86 Correct 1539 ms 12996 KB Output is correct
87 Correct 1735 ms 12808 KB Output is correct
88 Correct 1701 ms 12844 KB Output is correct
89 Correct 1765 ms 12804 KB Output is correct
90 Correct 298 ms 12792 KB Output is correct
91 Correct 297 ms 12672 KB Output is correct
92 Execution timed out 7052 ms 23184 KB Time limit exceeded
93 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 9 ms 12032 KB Output is correct
2 Correct 9 ms 12032 KB Output is correct
3 Correct 8 ms 12160 KB Output is correct
4 Correct 8 ms 12160 KB Output is correct
5 Correct 9 ms 12160 KB Output is correct
6 Correct 9 ms 12160 KB Output is correct
7 Correct 8 ms 12160 KB Output is correct
8 Correct 8 ms 12160 KB Output is correct
9 Correct 8 ms 12160 KB Output is correct
10 Correct 8 ms 12160 KB Output is correct
11 Correct 8 ms 12160 KB Output is correct
12 Correct 9 ms 12160 KB Output is correct
13 Correct 8 ms 12160 KB Output is correct
14 Correct 9 ms 12160 KB Output is correct
15 Correct 9 ms 12160 KB Output is correct
16 Correct 8 ms 12160 KB Output is correct
17 Correct 8 ms 12160 KB Output is correct
18 Correct 8 ms 12160 KB Output is correct
19 Correct 8 ms 12160 KB Output is correct
20 Correct 8 ms 12160 KB Output is correct
21 Correct 8 ms 12160 KB Output is correct
22 Correct 8 ms 12160 KB Output is correct
23 Correct 8 ms 12160 KB Output is correct
24 Correct 8 ms 12160 KB Output is correct
25 Correct 8 ms 12160 KB Output is correct
26 Correct 8 ms 12160 KB Output is correct
27 Correct 8 ms 12160 KB Output is correct
28 Correct 9 ms 12160 KB Output is correct
29 Correct 8 ms 12160 KB Output is correct
30 Correct 9 ms 12160 KB Output is correct
31 Correct 8 ms 12160 KB Output is correct
32 Correct 9 ms 12160 KB Output is correct
33 Correct 8 ms 12160 KB Output is correct
34 Correct 8 ms 12160 KB Output is correct
35 Correct 8 ms 12160 KB Output is correct
36 Correct 12 ms 12544 KB Output is correct
37 Correct 12 ms 12544 KB Output is correct
38 Correct 12 ms 12544 KB Output is correct
39 Correct 12 ms 12416 KB Output is correct
40 Correct 12 ms 12416 KB Output is correct
41 Correct 13 ms 12416 KB Output is correct
42 Correct 12 ms 12544 KB Output is correct
43 Correct 12 ms 12544 KB Output is correct
44 Correct 12 ms 12544 KB Output is correct
45 Correct 12 ms 12416 KB Output is correct
46 Correct 12 ms 12416 KB Output is correct
47 Correct 12 ms 12416 KB Output is correct
48 Correct 12 ms 12544 KB Output is correct
49 Correct 13 ms 12544 KB Output is correct
50 Correct 9 ms 12160 KB Output is correct
51 Correct 9 ms 12160 KB Output is correct
52 Correct 9 ms 12160 KB Output is correct
53 Correct 10 ms 12160 KB Output is correct
54 Correct 9 ms 12160 KB Output is correct
55 Correct 9 ms 12160 KB Output is correct
56 Correct 9 ms 12160 KB Output is correct
57 Correct 10 ms 12160 KB Output is correct
58 Correct 9 ms 12160 KB Output is correct
59 Correct 10 ms 12160 KB Output is correct
60 Correct 9 ms 12160 KB Output is correct
61 Correct 9 ms 12160 KB Output is correct
62 Correct 9 ms 12160 KB Output is correct
63 Correct 8 ms 12160 KB Output is correct
64 Correct 23 ms 12160 KB Output is correct
65 Correct 21 ms 12160 KB Output is correct
66 Correct 23 ms 12160 KB Output is correct
67 Correct 24 ms 12160 KB Output is correct
68 Correct 24 ms 12160 KB Output is correct
69 Correct 12 ms 12160 KB Output is correct
70 Correct 23 ms 12160 KB Output is correct
71 Correct 24 ms 12160 KB Output is correct
72 Correct 24 ms 12288 KB Output is correct
73 Correct 24 ms 12160 KB Output is correct
74 Correct 23 ms 12160 KB Output is correct
75 Correct 24 ms 12160 KB Output is correct
76 Correct 11 ms 12160 KB Output is correct
77 Correct 11 ms 12160 KB Output is correct
78 Correct 1579 ms 12928 KB Output is correct
79 Correct 1133 ms 13148 KB Output is correct
80 Correct 1616 ms 12832 KB Output is correct
81 Correct 1795 ms 12920 KB Output is correct
82 Correct 1761 ms 12752 KB Output is correct
83 Correct 332 ms 12792 KB Output is correct
84 Correct 1389 ms 13140 KB Output is correct
85 Correct 1720 ms 12920 KB Output is correct
86 Correct 1539 ms 12996 KB Output is correct
87 Correct 1735 ms 12808 KB Output is correct
88 Correct 1701 ms 12844 KB Output is correct
89 Correct 1765 ms 12804 KB Output is correct
90 Correct 298 ms 12792 KB Output is correct
91 Correct 297 ms 12672 KB Output is correct
92 Execution timed out 7052 ms 23184 KB Time limit exceeded
93 Halted 0 ms 0 KB -