Submission #60237

# Submission time Handle Problem Language Result Execution time Memory
60237 2018-07-23T22:21:54 Z duality Duathlon (APIO18_duathlon) C++11
100 / 100
347 ms 42100 KB
#define DEBUG 0

#include <bits/stdc++.h>
using namespace std;

#if DEBUG
// basic debugging macros
int __i__,__j__;
#define printLine(l) for(__i__=0;__i__<l;__i__++){cout<<"-";}cout<<endl
#define printLine2(l,c) for(__i__=0;__i__<l;__i__++){cout<<c;}cout<<endl
#define printVar(n) cout<<#n<<": "<<n<<endl
#define printArr(a,l) cout<<#a<<": ";for(__i__=0;__i__<l;__i__++){cout<<a[__i__]<<" ";}cout<<endl
#define print2dArr(a,r,c) cout<<#a<<":\n";for(__i__=0;__i__<r;__i__++){for(__j__=0;__j__<c;__j__++){cout<<a[__i__][__j__]<<" ";}cout<<endl;}
#define print2dArr2(a,r,c,l) cout<<#a<<":\n";for(__i__=0;__i__<r;__i__++){for(__j__=0;__j__<c;__j__++){cout<<setw(l)<<setfill(' ')<<a[__i__][__j__]<<" ";}cout<<endl;}

// advanced debugging class
// debug 1,2,'A',"test";
class _Debug {
    public:
        template<typename T>
        _Debug& operator,(T val) {
            cout << val << endl;
            return *this;
        }
};
#define debug _Debug(),
#else
#define printLine(l)
#define printLine2(l,c)
#define printVar(n)
#define printArr(a,l)
#define print2dArr(a,r,c)
#define print2dArr2(a,r,c,l)
#define debug
#endif

// define
#define MAX_VAL 999999999
#define MAX_VAL_2 999999999999999999LL
#define EPS 1e-6
#define mp make_pair
#define pb push_back

// typedef
typedef unsigned int UI;
typedef long long int LLI;
typedef unsigned long long int ULLI;
typedef unsigned short int US;
typedef pair<int,int> pii;
typedef pair<LLI,LLI> plli;
typedef vector<int> vi;
typedef vector<LLI> vlli;
typedef vector<pii> vpii;
typedef vector<plli> vplli;

// ---------- END OF TEMPLATE ----------

vi adjList[100000];
int disc[100000],low[100000],art[100000],t[100000];
vpii S;
vi com[100000];
int num = 0,bcc = 0;
int doDFS(int u,int p) {
    int i,c = 0;
    disc[u] = low[u] = num++;
    for (i = 0; i < adjList[u].size(); i++) {
        int v = adjList[u][i];
        if (disc[v] == -1) {
            c++;
            S.pb(mp(u,v));
            doDFS(v,u);
            low[u] = min(low[u],low[v]);
            if (((p == -1) && (c > 1)) || ((p != -1) && (low[v] >= disc[u]))) {
                art[u] = 1;
                while (1) {
                    int uu = S.back().first,vv = S.back().second;
                    S.pop_back();
                    if (t[uu] != bcc+1) com[bcc].pb(uu),t[uu] = bcc+1;
                    if (t[vv] != bcc+1) com[bcc].pb(vv),t[vv] = bcc+1;
                    if ((uu == u) && (vv == v)) break;
                }
                bcc++;
            }
        }
        else if ((v != p) && (disc[v] < disc[u])) low[u] = min(low[u],disc[v]),S.pb(mp(u,v));
    }
    return 0;
}
LLI ans = 0;
int size[100000];
vi adjList2[200000];
int visited[200000],sub[200000];
int doDFS2(int u,int p) {
    int i;
    sub[u] = ((u < bcc) ? size[u]:0);
    visited[u] = 1;
    for (i = 0; i < adjList2[u].size(); i++) {
        int v = adjList2[u][i];
        if (v != p) sub[u] += doDFS2(v,u);
    }
    return sub[u];
}
int doDFS3(int u,int p,int r) {
    int i;
    int c = sub[r]-sub[u];
    if (u < bcc) ans += 2LL*size[u]*size[u]*(sub[r]-size[u]);
    for (i = 0; i < adjList2[u].size(); i++) {
        int v = adjList2[u][i];
        if (v != p) {
            doDFS3(v,u,r);
            if (u < bcc) ans += 2LL*size[u]*sub[v]*c,c += sub[v];
        }
    }
    return 0;
}
int main() {
    int i;
    int n,m,u,v;
    scanf("%d %d",&n,&m);
    for (i = 0; i < m; i++) {
        scanf("%d %d",&u,&v);
        u--,v--;
        adjList[u].pb(v);
        adjList[v].pb(u);
    }

    int j;
    for (i = 0; i < n; i++) disc[i] = low[i] = -1;
    for (i = 0; i < n; i++) {
        if (disc[i] == -1) {
            doDFS(i,-1);
            if (!S.empty()) {
                while (!S.empty()) {
                    int u = S.back().first,v = S.back().second;
                    S.pop_back();
                    if (t[u] != bcc+1) com[bcc].pb(u),t[u] = bcc+1;
                    if (t[v] != bcc+1) com[bcc].pb(v),t[v] = bcc+1;
                }
                bcc++;
            }
        }
    }
    for (i = 0; i < bcc; i++) {
        for (j = 0; j < com[i].size(); j++) {
            if (art[com[i][j]]) {
                adjList2[i].pb(com[i][j]+bcc);
                adjList2[com[i][j]+bcc].pb(i);
            }
        }
        size[i] = com[i].size()-1;
        ans += (LLI) (size[i]+1)*size[i]*(size[i]-1);
        ans += (LLI) size[i]*size[i];
    }
    for (i = 0; i < bcc; i++) {
        if (!visited[i]) {
            doDFS2(i,-1),doDFS3(i,-1,i);
            ans -= (LLI) sub[i]*sub[i];
        }
    }
    printf("%lld\n",ans);

    return 0;
}

Compilation message

count_triplets.cpp: In function 'int doDFS(int, int)':
count_triplets.cpp:66:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (i = 0; i < adjList[u].size(); i++) {
                 ~~^~~~~~~~~~~~~~~~~~~
count_triplets.cpp: In function 'int doDFS2(int, int)':
count_triplets.cpp:97:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (i = 0; i < adjList2[u].size(); i++) {
                 ~~^~~~~~~~~~~~~~~~~~~~
count_triplets.cpp: In function 'int doDFS3(int, int, int)':
count_triplets.cpp:107:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (i = 0; i < adjList2[u].size(); i++) {
                 ~~^~~~~~~~~~~~~~~~~~~~
count_triplets.cpp: In function 'int main()':
count_triplets.cpp:144:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (j = 0; j < com[i].size(); j++) {
                     ~~^~~~~~~~~~~~~~~
count_triplets.cpp:119:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d",&n,&m);
     ~~~~~^~~~~~~~~~~~~~~
count_triplets.cpp:121:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d %d",&u,&v);
         ~~~~~^~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 11 ms 9720 KB Output is correct
2 Correct 14 ms 9868 KB Output is correct
3 Correct 10 ms 9932 KB Output is correct
4 Correct 10 ms 9932 KB Output is correct
5 Correct 11 ms 9932 KB Output is correct
6 Correct 12 ms 9932 KB Output is correct
7 Correct 12 ms 9932 KB Output is correct
8 Correct 10 ms 9932 KB Output is correct
9 Correct 11 ms 9932 KB Output is correct
10 Correct 11 ms 9968 KB Output is correct
11 Correct 10 ms 9968 KB Output is correct
12 Correct 12 ms 9968 KB Output is correct
13 Correct 13 ms 9968 KB Output is correct
14 Correct 13 ms 9968 KB Output is correct
15 Correct 12 ms 9968 KB Output is correct
16 Correct 13 ms 9968 KB Output is correct
17 Correct 11 ms 9968 KB Output is correct
18 Correct 10 ms 9972 KB Output is correct
19 Correct 11 ms 9972 KB Output is correct
20 Correct 12 ms 9972 KB Output is correct
21 Correct 13 ms 9972 KB Output is correct
22 Correct 10 ms 9972 KB Output is correct
23 Correct 10 ms 9972 KB Output is correct
24 Correct 12 ms 9972 KB Output is correct
25 Correct 14 ms 9972 KB Output is correct
26 Correct 14 ms 9972 KB Output is correct
27 Correct 13 ms 10092 KB Output is correct
28 Correct 13 ms 10092 KB Output is correct
29 Correct 11 ms 10092 KB Output is correct
30 Correct 11 ms 10092 KB Output is correct
31 Correct 13 ms 10092 KB Output is correct
32 Correct 11 ms 10092 KB Output is correct
33 Correct 10 ms 10092 KB Output is correct
34 Correct 10 ms 10092 KB Output is correct
35 Correct 11 ms 10100 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 11 ms 9720 KB Output is correct
2 Correct 14 ms 9868 KB Output is correct
3 Correct 10 ms 9932 KB Output is correct
4 Correct 10 ms 9932 KB Output is correct
5 Correct 11 ms 9932 KB Output is correct
6 Correct 12 ms 9932 KB Output is correct
7 Correct 12 ms 9932 KB Output is correct
8 Correct 10 ms 9932 KB Output is correct
9 Correct 11 ms 9932 KB Output is correct
10 Correct 11 ms 9968 KB Output is correct
11 Correct 10 ms 9968 KB Output is correct
12 Correct 12 ms 9968 KB Output is correct
13 Correct 13 ms 9968 KB Output is correct
14 Correct 13 ms 9968 KB Output is correct
15 Correct 12 ms 9968 KB Output is correct
16 Correct 13 ms 9968 KB Output is correct
17 Correct 11 ms 9968 KB Output is correct
18 Correct 10 ms 9972 KB Output is correct
19 Correct 11 ms 9972 KB Output is correct
20 Correct 12 ms 9972 KB Output is correct
21 Correct 13 ms 9972 KB Output is correct
22 Correct 10 ms 9972 KB Output is correct
23 Correct 10 ms 9972 KB Output is correct
24 Correct 12 ms 9972 KB Output is correct
25 Correct 14 ms 9972 KB Output is correct
26 Correct 14 ms 9972 KB Output is correct
27 Correct 13 ms 10092 KB Output is correct
28 Correct 13 ms 10092 KB Output is correct
29 Correct 11 ms 10092 KB Output is correct
30 Correct 11 ms 10092 KB Output is correct
31 Correct 13 ms 10092 KB Output is correct
32 Correct 11 ms 10092 KB Output is correct
33 Correct 10 ms 10092 KB Output is correct
34 Correct 10 ms 10092 KB Output is correct
35 Correct 11 ms 10100 KB Output is correct
36 Correct 10 ms 10100 KB Output is correct
37 Correct 10 ms 10100 KB Output is correct
38 Correct 11 ms 10100 KB Output is correct
39 Correct 11 ms 10100 KB Output is correct
40 Correct 12 ms 10100 KB Output is correct
41 Correct 10 ms 10100 KB Output is correct
42 Correct 10 ms 10100 KB Output is correct
43 Correct 12 ms 10100 KB Output is correct
44 Correct 12 ms 10100 KB Output is correct
45 Correct 12 ms 10100 KB Output is correct
46 Correct 11 ms 10100 KB Output is correct
47 Correct 13 ms 10100 KB Output is correct
48 Correct 12 ms 10100 KB Output is correct
49 Correct 10 ms 10100 KB Output is correct
50 Correct 12 ms 10100 KB Output is correct
51 Correct 12 ms 10100 KB Output is correct
52 Correct 12 ms 10100 KB Output is correct
53 Correct 12 ms 10100 KB Output is correct
54 Correct 11 ms 10100 KB Output is correct
55 Correct 12 ms 10100 KB Output is correct
56 Correct 12 ms 10100 KB Output is correct
57 Correct 10 ms 10100 KB Output is correct
58 Correct 10 ms 10100 KB Output is correct
59 Correct 12 ms 10100 KB Output is correct
60 Correct 12 ms 10100 KB Output is correct
61 Correct 10 ms 10100 KB Output is correct
62 Correct 12 ms 10100 KB Output is correct
63 Correct 13 ms 10108 KB Output is correct
64 Correct 13 ms 10108 KB Output is correct
65 Correct 13 ms 10108 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 133 ms 26864 KB Output is correct
2 Correct 126 ms 26944 KB Output is correct
3 Correct 270 ms 29184 KB Output is correct
4 Correct 191 ms 29184 KB Output is correct
5 Correct 156 ms 29184 KB Output is correct
6 Correct 197 ms 30604 KB Output is correct
7 Correct 199 ms 30604 KB Output is correct
8 Correct 238 ms 30604 KB Output is correct
9 Correct 205 ms 30604 KB Output is correct
10 Correct 189 ms 30604 KB Output is correct
11 Correct 120 ms 30604 KB Output is correct
12 Correct 160 ms 30604 KB Output is correct
13 Correct 139 ms 30604 KB Output is correct
14 Correct 122 ms 30604 KB Output is correct
15 Correct 76 ms 30604 KB Output is correct
16 Correct 102 ms 30604 KB Output is correct
17 Correct 15 ms 30604 KB Output is correct
18 Correct 16 ms 30604 KB Output is correct
19 Correct 14 ms 30604 KB Output is correct
20 Correct 14 ms 30604 KB Output is correct
21 Correct 12 ms 30604 KB Output is correct
22 Correct 13 ms 30604 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 11 ms 30604 KB Output is correct
2 Correct 11 ms 30604 KB Output is correct
3 Correct 11 ms 30604 KB Output is correct
4 Correct 11 ms 30604 KB Output is correct
5 Correct 14 ms 30604 KB Output is correct
6 Correct 14 ms 30604 KB Output is correct
7 Correct 14 ms 30604 KB Output is correct
8 Correct 12 ms 30604 KB Output is correct
9 Correct 14 ms 30604 KB Output is correct
10 Correct 12 ms 30604 KB Output is correct
11 Correct 12 ms 30604 KB Output is correct
12 Correct 11 ms 30604 KB Output is correct
13 Correct 11 ms 30604 KB Output is correct
14 Correct 12 ms 30604 KB Output is correct
15 Correct 14 ms 30604 KB Output is correct
16 Correct 10 ms 30604 KB Output is correct
17 Correct 12 ms 30604 KB Output is correct
18 Correct 15 ms 30604 KB Output is correct
19 Correct 12 ms 30604 KB Output is correct
20 Correct 13 ms 30604 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 228 ms 30604 KB Output is correct
2 Correct 238 ms 30604 KB Output is correct
3 Correct 265 ms 30604 KB Output is correct
4 Correct 245 ms 30604 KB Output is correct
5 Correct 286 ms 30604 KB Output is correct
6 Correct 302 ms 42100 KB Output is correct
7 Correct 303 ms 42100 KB Output is correct
8 Correct 325 ms 42100 KB Output is correct
9 Correct 301 ms 42100 KB Output is correct
10 Correct 257 ms 42100 KB Output is correct
11 Correct 255 ms 42100 KB Output is correct
12 Correct 287 ms 42100 KB Output is correct
13 Correct 179 ms 42100 KB Output is correct
14 Correct 206 ms 42100 KB Output is correct
15 Correct 160 ms 42100 KB Output is correct
16 Correct 95 ms 42100 KB Output is correct
17 Correct 148 ms 42100 KB Output is correct
18 Correct 143 ms 42100 KB Output is correct
19 Correct 141 ms 42100 KB Output is correct
20 Correct 167 ms 42100 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 12 ms 42100 KB Output is correct
2 Correct 12 ms 42100 KB Output is correct
3 Correct 11 ms 42100 KB Output is correct
4 Correct 13 ms 42100 KB Output is correct
5 Correct 14 ms 42100 KB Output is correct
6 Correct 11 ms 42100 KB Output is correct
7 Correct 13 ms 42100 KB Output is correct
8 Correct 11 ms 42100 KB Output is correct
9 Correct 11 ms 42100 KB Output is correct
10 Correct 12 ms 42100 KB Output is correct
11 Correct 11 ms 42100 KB Output is correct
12 Correct 12 ms 42100 KB Output is correct
13 Correct 12 ms 42100 KB Output is correct
14 Correct 11 ms 42100 KB Output is correct
15 Correct 13 ms 42100 KB Output is correct
16 Correct 13 ms 42100 KB Output is correct
17 Correct 12 ms 42100 KB Output is correct
18 Correct 13 ms 42100 KB Output is correct
19 Correct 11 ms 42100 KB Output is correct
20 Correct 12 ms 42100 KB Output is correct
21 Correct 12 ms 42100 KB Output is correct
22 Correct 11 ms 42100 KB Output is correct
23 Correct 12 ms 42100 KB Output is correct
24 Correct 12 ms 42100 KB Output is correct
25 Correct 14 ms 42100 KB Output is correct
26 Correct 13 ms 42100 KB Output is correct
27 Correct 13 ms 42100 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 255 ms 42100 KB Output is correct
2 Correct 219 ms 42100 KB Output is correct
3 Correct 250 ms 42100 KB Output is correct
4 Correct 196 ms 42100 KB Output is correct
5 Correct 176 ms 42100 KB Output is correct
6 Correct 137 ms 42100 KB Output is correct
7 Correct 135 ms 42100 KB Output is correct
8 Correct 154 ms 42100 KB Output is correct
9 Correct 139 ms 42100 KB Output is correct
10 Correct 170 ms 42100 KB Output is correct
11 Correct 167 ms 42100 KB Output is correct
12 Correct 165 ms 42100 KB Output is correct
13 Correct 114 ms 42100 KB Output is correct
14 Correct 137 ms 42100 KB Output is correct
15 Correct 247 ms 42100 KB Output is correct
16 Correct 347 ms 42100 KB Output is correct
17 Correct 250 ms 42100 KB Output is correct
18 Correct 237 ms 42100 KB Output is correct
19 Correct 226 ms 42100 KB Output is correct
20 Correct 246 ms 42100 KB Output is correct
21 Correct 195 ms 42100 KB Output is correct
22 Correct 209 ms 42100 KB Output is correct
23 Correct 232 ms 42100 KB Output is correct
24 Correct 207 ms 42100 KB Output is correct
25 Correct 225 ms 42100 KB Output is correct
26 Correct 169 ms 42100 KB Output is correct
27 Correct 216 ms 42100 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 11 ms 9720 KB Output is correct
2 Correct 14 ms 9868 KB Output is correct
3 Correct 10 ms 9932 KB Output is correct
4 Correct 10 ms 9932 KB Output is correct
5 Correct 11 ms 9932 KB Output is correct
6 Correct 12 ms 9932 KB Output is correct
7 Correct 12 ms 9932 KB Output is correct
8 Correct 10 ms 9932 KB Output is correct
9 Correct 11 ms 9932 KB Output is correct
10 Correct 11 ms 9968 KB Output is correct
11 Correct 10 ms 9968 KB Output is correct
12 Correct 12 ms 9968 KB Output is correct
13 Correct 13 ms 9968 KB Output is correct
14 Correct 13 ms 9968 KB Output is correct
15 Correct 12 ms 9968 KB Output is correct
16 Correct 13 ms 9968 KB Output is correct
17 Correct 11 ms 9968 KB Output is correct
18 Correct 10 ms 9972 KB Output is correct
19 Correct 11 ms 9972 KB Output is correct
20 Correct 12 ms 9972 KB Output is correct
21 Correct 13 ms 9972 KB Output is correct
22 Correct 10 ms 9972 KB Output is correct
23 Correct 10 ms 9972 KB Output is correct
24 Correct 12 ms 9972 KB Output is correct
25 Correct 14 ms 9972 KB Output is correct
26 Correct 14 ms 9972 KB Output is correct
27 Correct 13 ms 10092 KB Output is correct
28 Correct 13 ms 10092 KB Output is correct
29 Correct 11 ms 10092 KB Output is correct
30 Correct 11 ms 10092 KB Output is correct
31 Correct 13 ms 10092 KB Output is correct
32 Correct 11 ms 10092 KB Output is correct
33 Correct 10 ms 10092 KB Output is correct
34 Correct 10 ms 10092 KB Output is correct
35 Correct 11 ms 10100 KB Output is correct
36 Correct 10 ms 10100 KB Output is correct
37 Correct 10 ms 10100 KB Output is correct
38 Correct 11 ms 10100 KB Output is correct
39 Correct 11 ms 10100 KB Output is correct
40 Correct 12 ms 10100 KB Output is correct
41 Correct 10 ms 10100 KB Output is correct
42 Correct 10 ms 10100 KB Output is correct
43 Correct 12 ms 10100 KB Output is correct
44 Correct 12 ms 10100 KB Output is correct
45 Correct 12 ms 10100 KB Output is correct
46 Correct 11 ms 10100 KB Output is correct
47 Correct 13 ms 10100 KB Output is correct
48 Correct 12 ms 10100 KB Output is correct
49 Correct 10 ms 10100 KB Output is correct
50 Correct 12 ms 10100 KB Output is correct
51 Correct 12 ms 10100 KB Output is correct
52 Correct 12 ms 10100 KB Output is correct
53 Correct 12 ms 10100 KB Output is correct
54 Correct 11 ms 10100 KB Output is correct
55 Correct 12 ms 10100 KB Output is correct
56 Correct 12 ms 10100 KB Output is correct
57 Correct 10 ms 10100 KB Output is correct
58 Correct 10 ms 10100 KB Output is correct
59 Correct 12 ms 10100 KB Output is correct
60 Correct 12 ms 10100 KB Output is correct
61 Correct 10 ms 10100 KB Output is correct
62 Correct 12 ms 10100 KB Output is correct
63 Correct 13 ms 10108 KB Output is correct
64 Correct 13 ms 10108 KB Output is correct
65 Correct 13 ms 10108 KB Output is correct
66 Correct 14 ms 42100 KB Output is correct
67 Correct 15 ms 42100 KB Output is correct
68 Correct 14 ms 42100 KB Output is correct
69 Correct 12 ms 42100 KB Output is correct
70 Correct 14 ms 42100 KB Output is correct
71 Correct 12 ms 42100 KB Output is correct
72 Correct 12 ms 42100 KB Output is correct
73 Correct 13 ms 42100 KB Output is correct
74 Correct 13 ms 42100 KB Output is correct
75 Correct 12 ms 42100 KB Output is correct
76 Correct 12 ms 42100 KB Output is correct
77 Correct 14 ms 42100 KB Output is correct
78 Correct 14 ms 42100 KB Output is correct
79 Correct 14 ms 42100 KB Output is correct
80 Correct 15 ms 42100 KB Output is correct
81 Correct 13 ms 42100 KB Output is correct
82 Correct 12 ms 42100 KB Output is correct
83 Correct 14 ms 42100 KB Output is correct
84 Correct 13 ms 42100 KB Output is correct
85 Correct 13 ms 42100 KB Output is correct
86 Correct 14 ms 42100 KB Output is correct
87 Correct 12 ms 42100 KB Output is correct
88 Correct 14 ms 42100 KB Output is correct
89 Correct 17 ms 42100 KB Output is correct
90 Correct 12 ms 42100 KB Output is correct
91 Correct 14 ms 42100 KB Output is correct
92 Correct 14 ms 42100 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 11 ms 9720 KB Output is correct
2 Correct 14 ms 9868 KB Output is correct
3 Correct 10 ms 9932 KB Output is correct
4 Correct 10 ms 9932 KB Output is correct
5 Correct 11 ms 9932 KB Output is correct
6 Correct 12 ms 9932 KB Output is correct
7 Correct 12 ms 9932 KB Output is correct
8 Correct 10 ms 9932 KB Output is correct
9 Correct 11 ms 9932 KB Output is correct
10 Correct 11 ms 9968 KB Output is correct
11 Correct 10 ms 9968 KB Output is correct
12 Correct 12 ms 9968 KB Output is correct
13 Correct 13 ms 9968 KB Output is correct
14 Correct 13 ms 9968 KB Output is correct
15 Correct 12 ms 9968 KB Output is correct
16 Correct 13 ms 9968 KB Output is correct
17 Correct 11 ms 9968 KB Output is correct
18 Correct 10 ms 9972 KB Output is correct
19 Correct 11 ms 9972 KB Output is correct
20 Correct 12 ms 9972 KB Output is correct
21 Correct 13 ms 9972 KB Output is correct
22 Correct 10 ms 9972 KB Output is correct
23 Correct 10 ms 9972 KB Output is correct
24 Correct 12 ms 9972 KB Output is correct
25 Correct 14 ms 9972 KB Output is correct
26 Correct 14 ms 9972 KB Output is correct
27 Correct 13 ms 10092 KB Output is correct
28 Correct 13 ms 10092 KB Output is correct
29 Correct 11 ms 10092 KB Output is correct
30 Correct 11 ms 10092 KB Output is correct
31 Correct 13 ms 10092 KB Output is correct
32 Correct 11 ms 10092 KB Output is correct
33 Correct 10 ms 10092 KB Output is correct
34 Correct 10 ms 10092 KB Output is correct
35 Correct 11 ms 10100 KB Output is correct
36 Correct 10 ms 10100 KB Output is correct
37 Correct 10 ms 10100 KB Output is correct
38 Correct 11 ms 10100 KB Output is correct
39 Correct 11 ms 10100 KB Output is correct
40 Correct 12 ms 10100 KB Output is correct
41 Correct 10 ms 10100 KB Output is correct
42 Correct 10 ms 10100 KB Output is correct
43 Correct 12 ms 10100 KB Output is correct
44 Correct 12 ms 10100 KB Output is correct
45 Correct 12 ms 10100 KB Output is correct
46 Correct 11 ms 10100 KB Output is correct
47 Correct 13 ms 10100 KB Output is correct
48 Correct 12 ms 10100 KB Output is correct
49 Correct 10 ms 10100 KB Output is correct
50 Correct 12 ms 10100 KB Output is correct
51 Correct 12 ms 10100 KB Output is correct
52 Correct 12 ms 10100 KB Output is correct
53 Correct 12 ms 10100 KB Output is correct
54 Correct 11 ms 10100 KB Output is correct
55 Correct 12 ms 10100 KB Output is correct
56 Correct 12 ms 10100 KB Output is correct
57 Correct 10 ms 10100 KB Output is correct
58 Correct 10 ms 10100 KB Output is correct
59 Correct 12 ms 10100 KB Output is correct
60 Correct 12 ms 10100 KB Output is correct
61 Correct 10 ms 10100 KB Output is correct
62 Correct 12 ms 10100 KB Output is correct
63 Correct 13 ms 10108 KB Output is correct
64 Correct 13 ms 10108 KB Output is correct
65 Correct 13 ms 10108 KB Output is correct
66 Correct 133 ms 26864 KB Output is correct
67 Correct 126 ms 26944 KB Output is correct
68 Correct 270 ms 29184 KB Output is correct
69 Correct 191 ms 29184 KB Output is correct
70 Correct 156 ms 29184 KB Output is correct
71 Correct 197 ms 30604 KB Output is correct
72 Correct 199 ms 30604 KB Output is correct
73 Correct 238 ms 30604 KB Output is correct
74 Correct 205 ms 30604 KB Output is correct
75 Correct 189 ms 30604 KB Output is correct
76 Correct 120 ms 30604 KB Output is correct
77 Correct 160 ms 30604 KB Output is correct
78 Correct 139 ms 30604 KB Output is correct
79 Correct 122 ms 30604 KB Output is correct
80 Correct 76 ms 30604 KB Output is correct
81 Correct 102 ms 30604 KB Output is correct
82 Correct 15 ms 30604 KB Output is correct
83 Correct 16 ms 30604 KB Output is correct
84 Correct 14 ms 30604 KB Output is correct
85 Correct 14 ms 30604 KB Output is correct
86 Correct 12 ms 30604 KB Output is correct
87 Correct 13 ms 30604 KB Output is correct
88 Correct 11 ms 30604 KB Output is correct
89 Correct 11 ms 30604 KB Output is correct
90 Correct 11 ms 30604 KB Output is correct
91 Correct 11 ms 30604 KB Output is correct
92 Correct 14 ms 30604 KB Output is correct
93 Correct 14 ms 30604 KB Output is correct
94 Correct 14 ms 30604 KB Output is correct
95 Correct 12 ms 30604 KB Output is correct
96 Correct 14 ms 30604 KB Output is correct
97 Correct 12 ms 30604 KB Output is correct
98 Correct 12 ms 30604 KB Output is correct
99 Correct 11 ms 30604 KB Output is correct
100 Correct 11 ms 30604 KB Output is correct
101 Correct 12 ms 30604 KB Output is correct
102 Correct 14 ms 30604 KB Output is correct
103 Correct 10 ms 30604 KB Output is correct
104 Correct 12 ms 30604 KB Output is correct
105 Correct 15 ms 30604 KB Output is correct
106 Correct 12 ms 30604 KB Output is correct
107 Correct 13 ms 30604 KB Output is correct
108 Correct 228 ms 30604 KB Output is correct
109 Correct 238 ms 30604 KB Output is correct
110 Correct 265 ms 30604 KB Output is correct
111 Correct 245 ms 30604 KB Output is correct
112 Correct 286 ms 30604 KB Output is correct
113 Correct 302 ms 42100 KB Output is correct
114 Correct 303 ms 42100 KB Output is correct
115 Correct 325 ms 42100 KB Output is correct
116 Correct 301 ms 42100 KB Output is correct
117 Correct 257 ms 42100 KB Output is correct
118 Correct 255 ms 42100 KB Output is correct
119 Correct 287 ms 42100 KB Output is correct
120 Correct 179 ms 42100 KB Output is correct
121 Correct 206 ms 42100 KB Output is correct
122 Correct 160 ms 42100 KB Output is correct
123 Correct 95 ms 42100 KB Output is correct
124 Correct 148 ms 42100 KB Output is correct
125 Correct 143 ms 42100 KB Output is correct
126 Correct 141 ms 42100 KB Output is correct
127 Correct 167 ms 42100 KB Output is correct
128 Correct 12 ms 42100 KB Output is correct
129 Correct 12 ms 42100 KB Output is correct
130 Correct 11 ms 42100 KB Output is correct
131 Correct 13 ms 42100 KB Output is correct
132 Correct 14 ms 42100 KB Output is correct
133 Correct 11 ms 42100 KB Output is correct
134 Correct 13 ms 42100 KB Output is correct
135 Correct 11 ms 42100 KB Output is correct
136 Correct 11 ms 42100 KB Output is correct
137 Correct 12 ms 42100 KB Output is correct
138 Correct 11 ms 42100 KB Output is correct
139 Correct 12 ms 42100 KB Output is correct
140 Correct 12 ms 42100 KB Output is correct
141 Correct 11 ms 42100 KB Output is correct
142 Correct 13 ms 42100 KB Output is correct
143 Correct 13 ms 42100 KB Output is correct
144 Correct 12 ms 42100 KB Output is correct
145 Correct 13 ms 42100 KB Output is correct
146 Correct 11 ms 42100 KB Output is correct
147 Correct 12 ms 42100 KB Output is correct
148 Correct 12 ms 42100 KB Output is correct
149 Correct 11 ms 42100 KB Output is correct
150 Correct 12 ms 42100 KB Output is correct
151 Correct 12 ms 42100 KB Output is correct
152 Correct 14 ms 42100 KB Output is correct
153 Correct 13 ms 42100 KB Output is correct
154 Correct 13 ms 42100 KB Output is correct
155 Correct 255 ms 42100 KB Output is correct
156 Correct 219 ms 42100 KB Output is correct
157 Correct 250 ms 42100 KB Output is correct
158 Correct 196 ms 42100 KB Output is correct
159 Correct 176 ms 42100 KB Output is correct
160 Correct 137 ms 42100 KB Output is correct
161 Correct 135 ms 42100 KB Output is correct
162 Correct 154 ms 42100 KB Output is correct
163 Correct 139 ms 42100 KB Output is correct
164 Correct 170 ms 42100 KB Output is correct
165 Correct 167 ms 42100 KB Output is correct
166 Correct 165 ms 42100 KB Output is correct
167 Correct 114 ms 42100 KB Output is correct
168 Correct 137 ms 42100 KB Output is correct
169 Correct 247 ms 42100 KB Output is correct
170 Correct 347 ms 42100 KB Output is correct
171 Correct 250 ms 42100 KB Output is correct
172 Correct 237 ms 42100 KB Output is correct
173 Correct 226 ms 42100 KB Output is correct
174 Correct 246 ms 42100 KB Output is correct
175 Correct 195 ms 42100 KB Output is correct
176 Correct 209 ms 42100 KB Output is correct
177 Correct 232 ms 42100 KB Output is correct
178 Correct 207 ms 42100 KB Output is correct
179 Correct 225 ms 42100 KB Output is correct
180 Correct 169 ms 42100 KB Output is correct
181 Correct 216 ms 42100 KB Output is correct
182 Correct 14 ms 42100 KB Output is correct
183 Correct 15 ms 42100 KB Output is correct
184 Correct 14 ms 42100 KB Output is correct
185 Correct 12 ms 42100 KB Output is correct
186 Correct 14 ms 42100 KB Output is correct
187 Correct 12 ms 42100 KB Output is correct
188 Correct 12 ms 42100 KB Output is correct
189 Correct 13 ms 42100 KB Output is correct
190 Correct 13 ms 42100 KB Output is correct
191 Correct 12 ms 42100 KB Output is correct
192 Correct 12 ms 42100 KB Output is correct
193 Correct 14 ms 42100 KB Output is correct
194 Correct 14 ms 42100 KB Output is correct
195 Correct 14 ms 42100 KB Output is correct
196 Correct 15 ms 42100 KB Output is correct
197 Correct 13 ms 42100 KB Output is correct
198 Correct 12 ms 42100 KB Output is correct
199 Correct 14 ms 42100 KB Output is correct
200 Correct 13 ms 42100 KB Output is correct
201 Correct 13 ms 42100 KB Output is correct
202 Correct 14 ms 42100 KB Output is correct
203 Correct 12 ms 42100 KB Output is correct
204 Correct 14 ms 42100 KB Output is correct
205 Correct 17 ms 42100 KB Output is correct
206 Correct 12 ms 42100 KB Output is correct
207 Correct 14 ms 42100 KB Output is correct
208 Correct 14 ms 42100 KB Output is correct
209 Correct 16 ms 42100 KB Output is correct
210 Correct 117 ms 42100 KB Output is correct
211 Correct 189 ms 42100 KB Output is correct
212 Correct 242 ms 42100 KB Output is correct
213 Correct 237 ms 42100 KB Output is correct
214 Correct 82 ms 42100 KB Output is correct
215 Correct 88 ms 42100 KB Output is correct
216 Correct 213 ms 42100 KB Output is correct
217 Correct 167 ms 42100 KB Output is correct
218 Correct 138 ms 42100 KB Output is correct
219 Correct 123 ms 42100 KB Output is correct
220 Correct 128 ms 42100 KB Output is correct
221 Correct 152 ms 42100 KB Output is correct
222 Correct 132 ms 42100 KB Output is correct
223 Correct 252 ms 42100 KB Output is correct
224 Correct 217 ms 42100 KB Output is correct
225 Correct 241 ms 42100 KB Output is correct
226 Correct 272 ms 42100 KB Output is correct
227 Correct 210 ms 42100 KB Output is correct
228 Correct 206 ms 42100 KB Output is correct
229 Correct 185 ms 42100 KB Output is correct
230 Correct 206 ms 42100 KB Output is correct
231 Correct 195 ms 42100 KB Output is correct