Submission #618832

# Submission time Handle Problem Language Result Execution time Memory
618832 2022-08-02T07:47:54 Z keta_tsimakuridze Duathlon (APIO18_duathlon) C++14
100 / 100
358 ms 77964 KB
#include<bits/stdc++.h>
#define f first
#define s second
#define ll long long
#define int long long
#define pii pair<int,int>
using namespace std;
const int N = 3e5 + 5;
int f[N], low[N], t[N], sz[2 * N], p[N], h[N], X;
ll bad = 0, s[2 * N];
int n;
vector<int> adj[2 * N];
vector<pii> V[N];
map<int,int> e[N];
int find(int u) {
    return (p[u] == u ? u : p[u] = find(p[u]));
}
void merge(int u, int v) {
    u = find(u), v = find(v);
    p[u] = v;
}
void dfs0(int u, int ID) {
    f[u] = 1;
    low[u] = h[u]; sz[u] = 1;
    for(int i = 0; i < V[u].size(); i++) {
        int v = V[u][i].f, id = V[u][i].s;
        if(ID == id) continue;
        if(f[v]) low[u] = min(low[u], h[v]);
        else    {
            t[id] = 1;
            h[v] = h[u] + 1;
            dfs0(v, id);
            sz[u] += sz[v];
            if(low[v] < h[u]) merge(ID, id);
            low[u] = min(low[u], low[v]);
        }
    }
} /*
void dfs(int u, int p) {
    h[u] = h[p] + 1;
    sz[u] = 0;
    s[u] = 0;
    for(int i = 0; i < adj[u].size(); i++) {
        int v = adj[u][i];
        if(v == p) continue;
        dfs(v, u);
        s[u] += s[v] + sz[u] * sz[v];
        sz[u] += sz[v];
    }
    if(h[u] % 2)s[u] += sz[u], sz[u]++;
    if(h[u] == 3) bad += sz[u] * (sz[u] - 1) / 2;
} */
void dfs1(int u, int p) {
    f[u] = -1; X += (u <= n);
    for(int i = 0; i < adj[u].size(); i++) {
        int v = adj[u][i];
        if(v == p) continue;
        dfs1(v, u);
    }
}
void dfs(int u, int p) {
    sz[u] = 0;
    f[u] = -1;
    h[u] = h[p] + 1;
    for(int i = 0; i < adj[u].size(); i++) {
        int  v = adj[u][i];
        if(v == p) continue;
        dfs(v, u);
        sz[u] += sz[v];
    }
    if(h[u] % 2) {
        ++sz[u];
        if(p)
        bad += sz[u] * (sz[u] - 1) / 2 * (adj[p].size() - 1);
        for(int i = 0; i < adj[u].size(); i++) {
            int v = adj[u][i];
            if(v == p) continue;
            bad += ((X - sz[v]) * (X - sz[v] - 1) / 2) * (adj[v].size() - 1);
        }
    }
}
void ADD(int x, int y) {
    x += n;
    if(e[x][y]) return;
    e[x][y] = 1;
    adj[x].push_back(y);
    adj[y].push_back(x);
}
main() {
    int m;
    cin >> n >> m;
    vector<pair<int,int >> e;
    for(int i = 1; i <= m; i++) {
        int u, v;
        cin >> u >> v;
        V[u].push_back({v, i});
        V[v].push_back({u, i});
        e.push_back({u, v});
        p[i] = i;
    }
    int all = 0;
    for(int i = n; i >= 1; i--) if(!f[i]) dfs0(i, 0), all += sz[i] * (sz[i] - 1) * (sz[i] - 2);
  //  for(int i = 1; i <= n; i++) V[i].clear();
    for(int i = 1; i <= m; i++) {
        if(!t[i]) continue;
        ADD(find(i), e[i - 1].f);
        ADD(find(i), e[i - 1].s);
    }
    for(int i = 1; i <= n; i++)
    if(f[i] != -1) X = 0, dfs1(i, 0), dfs(i, 0);
    cout << all - 2 * bad;

}

Compilation message

count_triplets.cpp: In function 'void dfs0(long long int, long long int)':
count_triplets.cpp:25:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   25 |     for(int i = 0; i < V[u].size(); i++) {
      |                    ~~^~~~~~~~~~~~~
count_triplets.cpp: In function 'void dfs1(long long int, long long int)':
count_triplets.cpp:55:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   55 |     for(int i = 0; i < adj[u].size(); i++) {
      |                    ~~^~~~~~~~~~~~~~~
count_triplets.cpp: In function 'void dfs(long long int, long long int)':
count_triplets.cpp:65:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   65 |     for(int i = 0; i < adj[u].size(); i++) {
      |                    ~~^~~~~~~~~~~~~~~
count_triplets.cpp:75:26: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   75 |         for(int i = 0; i < adj[u].size(); i++) {
      |                        ~~^~~~~~~~~~~~~~~
count_triplets.cpp: At global scope:
count_triplets.cpp:89:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   89 | main() {
      | ^~~~
# Verdict Execution time Memory Grader output
1 Correct 20 ms 35540 KB Output is correct
2 Correct 18 ms 35588 KB Output is correct
3 Correct 18 ms 35568 KB Output is correct
4 Correct 19 ms 35492 KB Output is correct
5 Correct 17 ms 35524 KB Output is correct
6 Correct 18 ms 35476 KB Output is correct
7 Correct 18 ms 35564 KB Output is correct
8 Correct 18 ms 35684 KB Output is correct
9 Correct 18 ms 35540 KB Output is correct
10 Correct 17 ms 35576 KB Output is correct
11 Correct 20 ms 35540 KB Output is correct
12 Correct 17 ms 35548 KB Output is correct
13 Correct 20 ms 35588 KB Output is correct
14 Correct 18 ms 35588 KB Output is correct
15 Correct 18 ms 35468 KB Output is correct
16 Correct 19 ms 35540 KB Output is correct
17 Correct 20 ms 35468 KB Output is correct
18 Correct 22 ms 35460 KB Output is correct
19 Correct 20 ms 35488 KB Output is correct
20 Correct 21 ms 35584 KB Output is correct
21 Correct 19 ms 35512 KB Output is correct
22 Correct 18 ms 35528 KB Output is correct
23 Correct 17 ms 35540 KB Output is correct
24 Correct 18 ms 35540 KB Output is correct
25 Correct 19 ms 35520 KB Output is correct
26 Correct 18 ms 35556 KB Output is correct
27 Correct 17 ms 35544 KB Output is correct
28 Correct 19 ms 35540 KB Output is correct
29 Correct 18 ms 35468 KB Output is correct
30 Correct 16 ms 35540 KB Output is correct
31 Correct 18 ms 35584 KB Output is correct
32 Correct 17 ms 35520 KB Output is correct
33 Correct 17 ms 35516 KB Output is correct
34 Correct 18 ms 35492 KB Output is correct
35 Correct 18 ms 35584 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 35540 KB Output is correct
2 Correct 18 ms 35588 KB Output is correct
3 Correct 18 ms 35568 KB Output is correct
4 Correct 19 ms 35492 KB Output is correct
5 Correct 17 ms 35524 KB Output is correct
6 Correct 18 ms 35476 KB Output is correct
7 Correct 18 ms 35564 KB Output is correct
8 Correct 18 ms 35684 KB Output is correct
9 Correct 18 ms 35540 KB Output is correct
10 Correct 17 ms 35576 KB Output is correct
11 Correct 20 ms 35540 KB Output is correct
12 Correct 17 ms 35548 KB Output is correct
13 Correct 20 ms 35588 KB Output is correct
14 Correct 18 ms 35588 KB Output is correct
15 Correct 18 ms 35468 KB Output is correct
16 Correct 19 ms 35540 KB Output is correct
17 Correct 20 ms 35468 KB Output is correct
18 Correct 22 ms 35460 KB Output is correct
19 Correct 20 ms 35488 KB Output is correct
20 Correct 21 ms 35584 KB Output is correct
21 Correct 19 ms 35512 KB Output is correct
22 Correct 18 ms 35528 KB Output is correct
23 Correct 17 ms 35540 KB Output is correct
24 Correct 18 ms 35540 KB Output is correct
25 Correct 19 ms 35520 KB Output is correct
26 Correct 18 ms 35556 KB Output is correct
27 Correct 17 ms 35544 KB Output is correct
28 Correct 19 ms 35540 KB Output is correct
29 Correct 18 ms 35468 KB Output is correct
30 Correct 16 ms 35540 KB Output is correct
31 Correct 18 ms 35584 KB Output is correct
32 Correct 17 ms 35520 KB Output is correct
33 Correct 17 ms 35516 KB Output is correct
34 Correct 18 ms 35492 KB Output is correct
35 Correct 18 ms 35584 KB Output is correct
36 Correct 19 ms 35520 KB Output is correct
37 Correct 18 ms 35548 KB Output is correct
38 Correct 17 ms 35588 KB Output is correct
39 Correct 17 ms 35480 KB Output is correct
40 Correct 18 ms 35504 KB Output is correct
41 Correct 17 ms 35472 KB Output is correct
42 Correct 19 ms 35544 KB Output is correct
43 Correct 17 ms 35540 KB Output is correct
44 Correct 19 ms 35668 KB Output is correct
45 Correct 20 ms 35564 KB Output is correct
46 Correct 17 ms 35584 KB Output is correct
47 Correct 17 ms 35540 KB Output is correct
48 Correct 17 ms 35540 KB Output is correct
49 Correct 17 ms 35580 KB Output is correct
50 Correct 18 ms 35500 KB Output is correct
51 Correct 21 ms 35500 KB Output is correct
52 Correct 19 ms 35540 KB Output is correct
53 Correct 17 ms 35540 KB Output is correct
54 Correct 18 ms 35568 KB Output is correct
55 Correct 18 ms 35540 KB Output is correct
56 Correct 18 ms 35488 KB Output is correct
57 Correct 17 ms 35568 KB Output is correct
58 Correct 18 ms 35540 KB Output is correct
59 Correct 20 ms 35476 KB Output is correct
60 Correct 20 ms 35512 KB Output is correct
61 Correct 20 ms 35540 KB Output is correct
62 Correct 19 ms 35540 KB Output is correct
63 Correct 18 ms 35664 KB Output is correct
64 Correct 21 ms 35556 KB Output is correct
65 Correct 19 ms 35596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 271 ms 66228 KB Output is correct
2 Correct 255 ms 66332 KB Output is correct
3 Correct 288 ms 69992 KB Output is correct
4 Correct 266 ms 68412 KB Output is correct
5 Correct 299 ms 66216 KB Output is correct
6 Correct 268 ms 69176 KB Output is correct
7 Correct 267 ms 67500 KB Output is correct
8 Correct 261 ms 67880 KB Output is correct
9 Correct 273 ms 66036 KB Output is correct
10 Correct 294 ms 65864 KB Output is correct
11 Correct 208 ms 60296 KB Output is correct
12 Correct 185 ms 60052 KB Output is correct
13 Correct 165 ms 58680 KB Output is correct
14 Correct 198 ms 58276 KB Output is correct
15 Correct 146 ms 54404 KB Output is correct
16 Correct 149 ms 54224 KB Output is correct
17 Correct 21 ms 38732 KB Output is correct
18 Correct 20 ms 38740 KB Output is correct
19 Correct 22 ms 38720 KB Output is correct
20 Correct 19 ms 38740 KB Output is correct
21 Correct 21 ms 38628 KB Output is correct
22 Correct 21 ms 38720 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 35796 KB Output is correct
2 Correct 18 ms 35868 KB Output is correct
3 Correct 23 ms 35812 KB Output is correct
4 Correct 19 ms 36024 KB Output is correct
5 Correct 19 ms 35924 KB Output is correct
6 Correct 18 ms 35924 KB Output is correct
7 Correct 20 ms 35980 KB Output is correct
8 Correct 21 ms 35852 KB Output is correct
9 Correct 19 ms 35952 KB Output is correct
10 Correct 19 ms 35796 KB Output is correct
11 Correct 20 ms 35796 KB Output is correct
12 Correct 23 ms 35912 KB Output is correct
13 Correct 19 ms 35796 KB Output is correct
14 Correct 25 ms 35796 KB Output is correct
15 Correct 20 ms 35752 KB Output is correct
16 Correct 21 ms 35668 KB Output is correct
17 Correct 22 ms 35812 KB Output is correct
18 Correct 19 ms 35856 KB Output is correct
19 Correct 19 ms 35924 KB Output is correct
20 Correct 19 ms 35888 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 259 ms 68704 KB Output is correct
2 Correct 252 ms 68820 KB Output is correct
3 Correct 293 ms 68792 KB Output is correct
4 Correct 248 ms 68640 KB Output is correct
5 Correct 248 ms 68716 KB Output is correct
6 Correct 279 ms 77224 KB Output is correct
7 Correct 283 ms 74676 KB Output is correct
8 Correct 254 ms 73104 KB Output is correct
9 Correct 310 ms 71504 KB Output is correct
10 Correct 310 ms 68688 KB Output is correct
11 Correct 277 ms 68664 KB Output is correct
12 Correct 304 ms 68780 KB Output is correct
13 Correct 333 ms 68588 KB Output is correct
14 Correct 221 ms 65948 KB Output is correct
15 Correct 192 ms 63084 KB Output is correct
16 Correct 113 ms 54488 KB Output is correct
17 Correct 158 ms 68432 KB Output is correct
18 Correct 173 ms 68368 KB Output is correct
19 Correct 209 ms 68768 KB Output is correct
20 Correct 181 ms 68432 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 35796 KB Output is correct
2 Correct 19 ms 35796 KB Output is correct
3 Correct 18 ms 35796 KB Output is correct
4 Correct 23 ms 35784 KB Output is correct
5 Correct 18 ms 35812 KB Output is correct
6 Correct 19 ms 35796 KB Output is correct
7 Correct 18 ms 35724 KB Output is correct
8 Correct 19 ms 35860 KB Output is correct
9 Correct 20 ms 35752 KB Output is correct
10 Correct 19 ms 35848 KB Output is correct
11 Correct 19 ms 35848 KB Output is correct
12 Correct 18 ms 35856 KB Output is correct
13 Correct 20 ms 35908 KB Output is correct
14 Correct 19 ms 35924 KB Output is correct
15 Correct 19 ms 35832 KB Output is correct
16 Correct 19 ms 35796 KB Output is correct
17 Correct 19 ms 35892 KB Output is correct
18 Correct 19 ms 35812 KB Output is correct
19 Correct 22 ms 35784 KB Output is correct
20 Correct 19 ms 35840 KB Output is correct
21 Correct 19 ms 35864 KB Output is correct
22 Correct 21 ms 35876 KB Output is correct
23 Correct 22 ms 35892 KB Output is correct
24 Correct 19 ms 35900 KB Output is correct
25 Correct 17 ms 35672 KB Output is correct
26 Correct 20 ms 35540 KB Output is correct
27 Correct 19 ms 35568 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 255 ms 68664 KB Output is correct
2 Correct 299 ms 68624 KB Output is correct
3 Correct 274 ms 68704 KB Output is correct
4 Correct 280 ms 68664 KB Output is correct
5 Correct 270 ms 65704 KB Output is correct
6 Correct 275 ms 64256 KB Output is correct
7 Correct 276 ms 63648 KB Output is correct
8 Correct 269 ms 62644 KB Output is correct
9 Correct 243 ms 62556 KB Output is correct
10 Correct 269 ms 62004 KB Output is correct
11 Correct 224 ms 61600 KB Output is correct
12 Correct 230 ms 61276 KB Output is correct
13 Correct 233 ms 60892 KB Output is correct
14 Correct 231 ms 61992 KB Output is correct
15 Correct 296 ms 77120 KB Output is correct
16 Correct 351 ms 74848 KB Output is correct
17 Correct 334 ms 75824 KB Output is correct
18 Correct 309 ms 73524 KB Output is correct
19 Correct 264 ms 68536 KB Output is correct
20 Correct 302 ms 68548 KB Output is correct
21 Correct 259 ms 68624 KB Output is correct
22 Correct 253 ms 65720 KB Output is correct
23 Correct 202 ms 62776 KB Output is correct
24 Correct 247 ms 69868 KB Output is correct
25 Correct 335 ms 70172 KB Output is correct
26 Correct 263 ms 69132 KB Output is correct
27 Correct 276 ms 69164 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 35540 KB Output is correct
2 Correct 18 ms 35588 KB Output is correct
3 Correct 18 ms 35568 KB Output is correct
4 Correct 19 ms 35492 KB Output is correct
5 Correct 17 ms 35524 KB Output is correct
6 Correct 18 ms 35476 KB Output is correct
7 Correct 18 ms 35564 KB Output is correct
8 Correct 18 ms 35684 KB Output is correct
9 Correct 18 ms 35540 KB Output is correct
10 Correct 17 ms 35576 KB Output is correct
11 Correct 20 ms 35540 KB Output is correct
12 Correct 17 ms 35548 KB Output is correct
13 Correct 20 ms 35588 KB Output is correct
14 Correct 18 ms 35588 KB Output is correct
15 Correct 18 ms 35468 KB Output is correct
16 Correct 19 ms 35540 KB Output is correct
17 Correct 20 ms 35468 KB Output is correct
18 Correct 22 ms 35460 KB Output is correct
19 Correct 20 ms 35488 KB Output is correct
20 Correct 21 ms 35584 KB Output is correct
21 Correct 19 ms 35512 KB Output is correct
22 Correct 18 ms 35528 KB Output is correct
23 Correct 17 ms 35540 KB Output is correct
24 Correct 18 ms 35540 KB Output is correct
25 Correct 19 ms 35520 KB Output is correct
26 Correct 18 ms 35556 KB Output is correct
27 Correct 17 ms 35544 KB Output is correct
28 Correct 19 ms 35540 KB Output is correct
29 Correct 18 ms 35468 KB Output is correct
30 Correct 16 ms 35540 KB Output is correct
31 Correct 18 ms 35584 KB Output is correct
32 Correct 17 ms 35520 KB Output is correct
33 Correct 17 ms 35516 KB Output is correct
34 Correct 18 ms 35492 KB Output is correct
35 Correct 18 ms 35584 KB Output is correct
36 Correct 19 ms 35520 KB Output is correct
37 Correct 18 ms 35548 KB Output is correct
38 Correct 17 ms 35588 KB Output is correct
39 Correct 17 ms 35480 KB Output is correct
40 Correct 18 ms 35504 KB Output is correct
41 Correct 17 ms 35472 KB Output is correct
42 Correct 19 ms 35544 KB Output is correct
43 Correct 17 ms 35540 KB Output is correct
44 Correct 19 ms 35668 KB Output is correct
45 Correct 20 ms 35564 KB Output is correct
46 Correct 17 ms 35584 KB Output is correct
47 Correct 17 ms 35540 KB Output is correct
48 Correct 17 ms 35540 KB Output is correct
49 Correct 17 ms 35580 KB Output is correct
50 Correct 18 ms 35500 KB Output is correct
51 Correct 21 ms 35500 KB Output is correct
52 Correct 19 ms 35540 KB Output is correct
53 Correct 17 ms 35540 KB Output is correct
54 Correct 18 ms 35568 KB Output is correct
55 Correct 18 ms 35540 KB Output is correct
56 Correct 18 ms 35488 KB Output is correct
57 Correct 17 ms 35568 KB Output is correct
58 Correct 18 ms 35540 KB Output is correct
59 Correct 20 ms 35476 KB Output is correct
60 Correct 20 ms 35512 KB Output is correct
61 Correct 20 ms 35540 KB Output is correct
62 Correct 19 ms 35540 KB Output is correct
63 Correct 18 ms 35664 KB Output is correct
64 Correct 21 ms 35556 KB Output is correct
65 Correct 19 ms 35596 KB Output is correct
66 Correct 20 ms 35588 KB Output is correct
67 Correct 20 ms 35716 KB Output is correct
68 Correct 22 ms 35800 KB Output is correct
69 Correct 20 ms 35844 KB Output is correct
70 Correct 20 ms 35996 KB Output is correct
71 Correct 23 ms 35792 KB Output is correct
72 Correct 19 ms 35816 KB Output is correct
73 Correct 20 ms 35840 KB Output is correct
74 Correct 19 ms 35752 KB Output is correct
75 Correct 26 ms 35840 KB Output is correct
76 Correct 20 ms 35504 KB Output is correct
77 Correct 24 ms 35912 KB Output is correct
78 Correct 22 ms 35880 KB Output is correct
79 Correct 19 ms 35796 KB Output is correct
80 Correct 19 ms 35844 KB Output is correct
81 Correct 19 ms 35844 KB Output is correct
82 Correct 19 ms 35816 KB Output is correct
83 Correct 19 ms 35796 KB Output is correct
84 Correct 19 ms 35924 KB Output is correct
85 Correct 20 ms 35924 KB Output is correct
86 Correct 21 ms 35792 KB Output is correct
87 Correct 19 ms 35796 KB Output is correct
88 Correct 18 ms 35792 KB Output is correct
89 Correct 20 ms 35784 KB Output is correct
90 Correct 21 ms 35824 KB Output is correct
91 Correct 21 ms 35868 KB Output is correct
92 Correct 19 ms 35848 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 35540 KB Output is correct
2 Correct 18 ms 35588 KB Output is correct
3 Correct 18 ms 35568 KB Output is correct
4 Correct 19 ms 35492 KB Output is correct
5 Correct 17 ms 35524 KB Output is correct
6 Correct 18 ms 35476 KB Output is correct
7 Correct 18 ms 35564 KB Output is correct
8 Correct 18 ms 35684 KB Output is correct
9 Correct 18 ms 35540 KB Output is correct
10 Correct 17 ms 35576 KB Output is correct
11 Correct 20 ms 35540 KB Output is correct
12 Correct 17 ms 35548 KB Output is correct
13 Correct 20 ms 35588 KB Output is correct
14 Correct 18 ms 35588 KB Output is correct
15 Correct 18 ms 35468 KB Output is correct
16 Correct 19 ms 35540 KB Output is correct
17 Correct 20 ms 35468 KB Output is correct
18 Correct 22 ms 35460 KB Output is correct
19 Correct 20 ms 35488 KB Output is correct
20 Correct 21 ms 35584 KB Output is correct
21 Correct 19 ms 35512 KB Output is correct
22 Correct 18 ms 35528 KB Output is correct
23 Correct 17 ms 35540 KB Output is correct
24 Correct 18 ms 35540 KB Output is correct
25 Correct 19 ms 35520 KB Output is correct
26 Correct 18 ms 35556 KB Output is correct
27 Correct 17 ms 35544 KB Output is correct
28 Correct 19 ms 35540 KB Output is correct
29 Correct 18 ms 35468 KB Output is correct
30 Correct 16 ms 35540 KB Output is correct
31 Correct 18 ms 35584 KB Output is correct
32 Correct 17 ms 35520 KB Output is correct
33 Correct 17 ms 35516 KB Output is correct
34 Correct 18 ms 35492 KB Output is correct
35 Correct 18 ms 35584 KB Output is correct
36 Correct 19 ms 35520 KB Output is correct
37 Correct 18 ms 35548 KB Output is correct
38 Correct 17 ms 35588 KB Output is correct
39 Correct 17 ms 35480 KB Output is correct
40 Correct 18 ms 35504 KB Output is correct
41 Correct 17 ms 35472 KB Output is correct
42 Correct 19 ms 35544 KB Output is correct
43 Correct 17 ms 35540 KB Output is correct
44 Correct 19 ms 35668 KB Output is correct
45 Correct 20 ms 35564 KB Output is correct
46 Correct 17 ms 35584 KB Output is correct
47 Correct 17 ms 35540 KB Output is correct
48 Correct 17 ms 35540 KB Output is correct
49 Correct 17 ms 35580 KB Output is correct
50 Correct 18 ms 35500 KB Output is correct
51 Correct 21 ms 35500 KB Output is correct
52 Correct 19 ms 35540 KB Output is correct
53 Correct 17 ms 35540 KB Output is correct
54 Correct 18 ms 35568 KB Output is correct
55 Correct 18 ms 35540 KB Output is correct
56 Correct 18 ms 35488 KB Output is correct
57 Correct 17 ms 35568 KB Output is correct
58 Correct 18 ms 35540 KB Output is correct
59 Correct 20 ms 35476 KB Output is correct
60 Correct 20 ms 35512 KB Output is correct
61 Correct 20 ms 35540 KB Output is correct
62 Correct 19 ms 35540 KB Output is correct
63 Correct 18 ms 35664 KB Output is correct
64 Correct 21 ms 35556 KB Output is correct
65 Correct 19 ms 35596 KB Output is correct
66 Correct 271 ms 66228 KB Output is correct
67 Correct 255 ms 66332 KB Output is correct
68 Correct 288 ms 69992 KB Output is correct
69 Correct 266 ms 68412 KB Output is correct
70 Correct 299 ms 66216 KB Output is correct
71 Correct 268 ms 69176 KB Output is correct
72 Correct 267 ms 67500 KB Output is correct
73 Correct 261 ms 67880 KB Output is correct
74 Correct 273 ms 66036 KB Output is correct
75 Correct 294 ms 65864 KB Output is correct
76 Correct 208 ms 60296 KB Output is correct
77 Correct 185 ms 60052 KB Output is correct
78 Correct 165 ms 58680 KB Output is correct
79 Correct 198 ms 58276 KB Output is correct
80 Correct 146 ms 54404 KB Output is correct
81 Correct 149 ms 54224 KB Output is correct
82 Correct 21 ms 38732 KB Output is correct
83 Correct 20 ms 38740 KB Output is correct
84 Correct 22 ms 38720 KB Output is correct
85 Correct 19 ms 38740 KB Output is correct
86 Correct 21 ms 38628 KB Output is correct
87 Correct 21 ms 38720 KB Output is correct
88 Correct 19 ms 35796 KB Output is correct
89 Correct 18 ms 35868 KB Output is correct
90 Correct 23 ms 35812 KB Output is correct
91 Correct 19 ms 36024 KB Output is correct
92 Correct 19 ms 35924 KB Output is correct
93 Correct 18 ms 35924 KB Output is correct
94 Correct 20 ms 35980 KB Output is correct
95 Correct 21 ms 35852 KB Output is correct
96 Correct 19 ms 35952 KB Output is correct
97 Correct 19 ms 35796 KB Output is correct
98 Correct 20 ms 35796 KB Output is correct
99 Correct 23 ms 35912 KB Output is correct
100 Correct 19 ms 35796 KB Output is correct
101 Correct 25 ms 35796 KB Output is correct
102 Correct 20 ms 35752 KB Output is correct
103 Correct 21 ms 35668 KB Output is correct
104 Correct 22 ms 35812 KB Output is correct
105 Correct 19 ms 35856 KB Output is correct
106 Correct 19 ms 35924 KB Output is correct
107 Correct 19 ms 35888 KB Output is correct
108 Correct 259 ms 68704 KB Output is correct
109 Correct 252 ms 68820 KB Output is correct
110 Correct 293 ms 68792 KB Output is correct
111 Correct 248 ms 68640 KB Output is correct
112 Correct 248 ms 68716 KB Output is correct
113 Correct 279 ms 77224 KB Output is correct
114 Correct 283 ms 74676 KB Output is correct
115 Correct 254 ms 73104 KB Output is correct
116 Correct 310 ms 71504 KB Output is correct
117 Correct 310 ms 68688 KB Output is correct
118 Correct 277 ms 68664 KB Output is correct
119 Correct 304 ms 68780 KB Output is correct
120 Correct 333 ms 68588 KB Output is correct
121 Correct 221 ms 65948 KB Output is correct
122 Correct 192 ms 63084 KB Output is correct
123 Correct 113 ms 54488 KB Output is correct
124 Correct 158 ms 68432 KB Output is correct
125 Correct 173 ms 68368 KB Output is correct
126 Correct 209 ms 68768 KB Output is correct
127 Correct 181 ms 68432 KB Output is correct
128 Correct 19 ms 35796 KB Output is correct
129 Correct 19 ms 35796 KB Output is correct
130 Correct 18 ms 35796 KB Output is correct
131 Correct 23 ms 35784 KB Output is correct
132 Correct 18 ms 35812 KB Output is correct
133 Correct 19 ms 35796 KB Output is correct
134 Correct 18 ms 35724 KB Output is correct
135 Correct 19 ms 35860 KB Output is correct
136 Correct 20 ms 35752 KB Output is correct
137 Correct 19 ms 35848 KB Output is correct
138 Correct 19 ms 35848 KB Output is correct
139 Correct 18 ms 35856 KB Output is correct
140 Correct 20 ms 35908 KB Output is correct
141 Correct 19 ms 35924 KB Output is correct
142 Correct 19 ms 35832 KB Output is correct
143 Correct 19 ms 35796 KB Output is correct
144 Correct 19 ms 35892 KB Output is correct
145 Correct 19 ms 35812 KB Output is correct
146 Correct 22 ms 35784 KB Output is correct
147 Correct 19 ms 35840 KB Output is correct
148 Correct 19 ms 35864 KB Output is correct
149 Correct 21 ms 35876 KB Output is correct
150 Correct 22 ms 35892 KB Output is correct
151 Correct 19 ms 35900 KB Output is correct
152 Correct 17 ms 35672 KB Output is correct
153 Correct 20 ms 35540 KB Output is correct
154 Correct 19 ms 35568 KB Output is correct
155 Correct 255 ms 68664 KB Output is correct
156 Correct 299 ms 68624 KB Output is correct
157 Correct 274 ms 68704 KB Output is correct
158 Correct 280 ms 68664 KB Output is correct
159 Correct 270 ms 65704 KB Output is correct
160 Correct 275 ms 64256 KB Output is correct
161 Correct 276 ms 63648 KB Output is correct
162 Correct 269 ms 62644 KB Output is correct
163 Correct 243 ms 62556 KB Output is correct
164 Correct 269 ms 62004 KB Output is correct
165 Correct 224 ms 61600 KB Output is correct
166 Correct 230 ms 61276 KB Output is correct
167 Correct 233 ms 60892 KB Output is correct
168 Correct 231 ms 61992 KB Output is correct
169 Correct 296 ms 77120 KB Output is correct
170 Correct 351 ms 74848 KB Output is correct
171 Correct 334 ms 75824 KB Output is correct
172 Correct 309 ms 73524 KB Output is correct
173 Correct 264 ms 68536 KB Output is correct
174 Correct 302 ms 68548 KB Output is correct
175 Correct 259 ms 68624 KB Output is correct
176 Correct 253 ms 65720 KB Output is correct
177 Correct 202 ms 62776 KB Output is correct
178 Correct 247 ms 69868 KB Output is correct
179 Correct 335 ms 70172 KB Output is correct
180 Correct 263 ms 69132 KB Output is correct
181 Correct 276 ms 69164 KB Output is correct
182 Correct 20 ms 35588 KB Output is correct
183 Correct 20 ms 35716 KB Output is correct
184 Correct 22 ms 35800 KB Output is correct
185 Correct 20 ms 35844 KB Output is correct
186 Correct 20 ms 35996 KB Output is correct
187 Correct 23 ms 35792 KB Output is correct
188 Correct 19 ms 35816 KB Output is correct
189 Correct 20 ms 35840 KB Output is correct
190 Correct 19 ms 35752 KB Output is correct
191 Correct 26 ms 35840 KB Output is correct
192 Correct 20 ms 35504 KB Output is correct
193 Correct 24 ms 35912 KB Output is correct
194 Correct 22 ms 35880 KB Output is correct
195 Correct 19 ms 35796 KB Output is correct
196 Correct 19 ms 35844 KB Output is correct
197 Correct 19 ms 35844 KB Output is correct
198 Correct 19 ms 35816 KB Output is correct
199 Correct 19 ms 35796 KB Output is correct
200 Correct 19 ms 35924 KB Output is correct
201 Correct 20 ms 35924 KB Output is correct
202 Correct 21 ms 35792 KB Output is correct
203 Correct 19 ms 35796 KB Output is correct
204 Correct 18 ms 35792 KB Output is correct
205 Correct 20 ms 35784 KB Output is correct
206 Correct 21 ms 35824 KB Output is correct
207 Correct 21 ms 35868 KB Output is correct
208 Correct 19 ms 35848 KB Output is correct
209 Correct 23 ms 38712 KB Output is correct
210 Correct 132 ms 54696 KB Output is correct
211 Correct 233 ms 64744 KB Output is correct
212 Correct 298 ms 71728 KB Output is correct
213 Correct 358 ms 77964 KB Output is correct
214 Correct 143 ms 64184 KB Output is correct
215 Correct 155 ms 64896 KB Output is correct
216 Correct 260 ms 70776 KB Output is correct
217 Correct 277 ms 67824 KB Output is correct
218 Correct 228 ms 63196 KB Output is correct
219 Correct 219 ms 62120 KB Output is correct
220 Correct 223 ms 61760 KB Output is correct
221 Correct 246 ms 60856 KB Output is correct
222 Correct 248 ms 60772 KB Output is correct
223 Correct 303 ms 73004 KB Output is correct
224 Correct 298 ms 71472 KB Output is correct
225 Correct 270 ms 67312 KB Output is correct
226 Correct 289 ms 67308 KB Output is correct
227 Correct 275 ms 67512 KB Output is correct
228 Correct 234 ms 64748 KB Output is correct
229 Correct 205 ms 62300 KB Output is correct
230 Correct 279 ms 68404 KB Output is correct
231 Correct 317 ms 68448 KB Output is correct