Submission #235097

# Submission time Handle Problem Language Result Execution time Memory
235097 2020-05-27T04:40:13 Z rama_pang Duathlon (APIO18_duathlon) C++14
100 / 100
163 ms 42212 KB
#include <bits/stdc++.h>
using namespace std;

const int MAXN = 300005;

int N, M;
vector<int> G[MAXN];
vector<int> T[MAXN];

// Biconnected Components
int dis[MAXN];
int low[MAXN];

int compsz[MAXN];
vector<vector<int>> comps;

void DfsBcc(int u, int p = 0) {
  static int t = 1;
  dis[u] = low[u] = t++;

  static vector<int> st;
  st.emplace_back(u);

  int child = 0;
  for (auto v : G[u]) if (v != p) {
    if (dis[v]) {
      low[u] = min(low[u], dis[v]);
    } else {
      DfsBcc(v, u);
      low[u] = min(low[u], low[v]);
      child++;
      if ((p == 0 && child > 1) || (p != 0 && low[v] >= dis[u])) {
        comps.emplace_back();
        vector<int> &cur = comps.back();
        cur.emplace_back(u);
        while (cur.back() != v) {
          cur.emplace_back(st.back());
          st.pop_back();
        }
      }
    }
  }

  if (p == 0 && !st.empty()) {
    comps.emplace_back(st);
    st.clear();
  }
}

void InitBcc() {
  for (int i = 1; i <= N; i++) {
    if (!dis[i]) {
      DfsBcc(i);
    }
  }

  for (int i = 0; i < comps.size(); i++) {
    vector<int> &c = comps[i];
    sort(begin(c), end(c));
    c.resize(unique(begin(c), end(c)) - begin(c));
    compsz[i] = c.size();
    for (auto j : c) {
      T[i + N + 1].emplace_back(j);
      T[j].emplace_back(i + N + 1);
    }
  }
}

int vis[MAXN];
int sz[MAXN];

void DfsSize(int u, int p = 0) {
  vis[u] = 1;
  sz[u] = (u <= N);
  for (auto v : T[u]) if (v != p) {
    DfsSize(v, u);
    sz[u] += sz[v];
  }
}

void DfsCount(int u, long long &ans, int p = 0, int r = 0) {
  if (r == 0) {
    r = u;
    ans += 1ll * sz[u] * (sz[u] - 1) * (sz[u] - 2);
  }
  if (u <= N) {
    for (auto v : T[u]) {
      if (v == p) {
        ans -= 1ll * (compsz[v - N - 1] - 1) * sz[u] * (sz[u] - 1);
      } else {
        ans -= 1ll * (compsz[v - N - 1] - 1) * (sz[r] - sz[v]) * (sz[r] - sz[v] - 1);
      }
    }
  }
  for (auto v : T[u]) if (v != p) {
    DfsCount(v, ans, u, r);
  }
}

long long Solve() {
  InitBcc();
  long long res = 0;
  for (int i = 1; i <= N; i++) {
    if (!vis[i]) {
      DfsSize(i);
      DfsCount(i, res);
    }
  }
  return res;
}

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);

  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    int u, v;
    cin >> u >> v;
    G[u].emplace_back(v);
    G[v].emplace_back(u);
  }

  cout << Solve() << "\n";
  return 0;
}

Compilation message

count_triplets.cpp: In function 'void InitBcc()':
count_triplets.cpp:57:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i < comps.size(); i++) {
                   ~~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 12 ms 14464 KB Output is correct
2 Correct 12 ms 14464 KB Output is correct
3 Correct 12 ms 14464 KB Output is correct
4 Correct 13 ms 14464 KB Output is correct
5 Correct 12 ms 14464 KB Output is correct
6 Correct 12 ms 14464 KB Output is correct
7 Correct 12 ms 14464 KB Output is correct
8 Correct 12 ms 14464 KB Output is correct
9 Correct 12 ms 14464 KB Output is correct
10 Correct 12 ms 14464 KB Output is correct
11 Correct 12 ms 14464 KB Output is correct
12 Correct 13 ms 14464 KB Output is correct
13 Correct 12 ms 14464 KB Output is correct
14 Correct 13 ms 14464 KB Output is correct
15 Correct 12 ms 14464 KB Output is correct
16 Correct 12 ms 14464 KB Output is correct
17 Correct 12 ms 14464 KB Output is correct
18 Correct 12 ms 14464 KB Output is correct
19 Correct 13 ms 14464 KB Output is correct
20 Correct 12 ms 14464 KB Output is correct
21 Correct 12 ms 14464 KB Output is correct
22 Correct 12 ms 14464 KB Output is correct
23 Correct 12 ms 14464 KB Output is correct
24 Correct 12 ms 14464 KB Output is correct
25 Correct 12 ms 14464 KB Output is correct
26 Correct 12 ms 14464 KB Output is correct
27 Correct 12 ms 14464 KB Output is correct
28 Correct 12 ms 14464 KB Output is correct
29 Correct 12 ms 14464 KB Output is correct
30 Correct 12 ms 14464 KB Output is correct
31 Correct 12 ms 14412 KB Output is correct
32 Correct 13 ms 14464 KB Output is correct
33 Correct 12 ms 14464 KB Output is correct
34 Correct 12 ms 14464 KB Output is correct
35 Correct 12 ms 14464 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 12 ms 14464 KB Output is correct
2 Correct 12 ms 14464 KB Output is correct
3 Correct 12 ms 14464 KB Output is correct
4 Correct 13 ms 14464 KB Output is correct
5 Correct 12 ms 14464 KB Output is correct
6 Correct 12 ms 14464 KB Output is correct
7 Correct 12 ms 14464 KB Output is correct
8 Correct 12 ms 14464 KB Output is correct
9 Correct 12 ms 14464 KB Output is correct
10 Correct 12 ms 14464 KB Output is correct
11 Correct 12 ms 14464 KB Output is correct
12 Correct 13 ms 14464 KB Output is correct
13 Correct 12 ms 14464 KB Output is correct
14 Correct 13 ms 14464 KB Output is correct
15 Correct 12 ms 14464 KB Output is correct
16 Correct 12 ms 14464 KB Output is correct
17 Correct 12 ms 14464 KB Output is correct
18 Correct 12 ms 14464 KB Output is correct
19 Correct 13 ms 14464 KB Output is correct
20 Correct 12 ms 14464 KB Output is correct
21 Correct 12 ms 14464 KB Output is correct
22 Correct 12 ms 14464 KB Output is correct
23 Correct 12 ms 14464 KB Output is correct
24 Correct 12 ms 14464 KB Output is correct
25 Correct 12 ms 14464 KB Output is correct
26 Correct 12 ms 14464 KB Output is correct
27 Correct 12 ms 14464 KB Output is correct
28 Correct 12 ms 14464 KB Output is correct
29 Correct 12 ms 14464 KB Output is correct
30 Correct 12 ms 14464 KB Output is correct
31 Correct 12 ms 14412 KB Output is correct
32 Correct 13 ms 14464 KB Output is correct
33 Correct 12 ms 14464 KB Output is correct
34 Correct 12 ms 14464 KB Output is correct
35 Correct 12 ms 14464 KB Output is correct
36 Correct 13 ms 14464 KB Output is correct
37 Correct 13 ms 14464 KB Output is correct
38 Correct 13 ms 14464 KB Output is correct
39 Correct 12 ms 14464 KB Output is correct
40 Correct 12 ms 14512 KB Output is correct
41 Correct 12 ms 14464 KB Output is correct
42 Correct 12 ms 14464 KB Output is correct
43 Correct 12 ms 14464 KB Output is correct
44 Correct 13 ms 14464 KB Output is correct
45 Correct 13 ms 14464 KB Output is correct
46 Correct 13 ms 14464 KB Output is correct
47 Correct 12 ms 14464 KB Output is correct
48 Correct 12 ms 14464 KB Output is correct
49 Correct 12 ms 14464 KB Output is correct
50 Correct 12 ms 14464 KB Output is correct
51 Correct 13 ms 14464 KB Output is correct
52 Correct 12 ms 14464 KB Output is correct
53 Correct 13 ms 14464 KB Output is correct
54 Correct 12 ms 14464 KB Output is correct
55 Correct 13 ms 14464 KB Output is correct
56 Correct 12 ms 14464 KB Output is correct
57 Correct 12 ms 14464 KB Output is correct
58 Correct 12 ms 14464 KB Output is correct
59 Correct 12 ms 14464 KB Output is correct
60 Correct 12 ms 14464 KB Output is correct
61 Correct 12 ms 14464 KB Output is correct
62 Correct 12 ms 14464 KB Output is correct
63 Correct 12 ms 14464 KB Output is correct
64 Correct 13 ms 14464 KB Output is correct
65 Correct 12 ms 14464 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 96 ms 32624 KB Output is correct
2 Correct 103 ms 32624 KB Output is correct
3 Correct 126 ms 35496 KB Output is correct
4 Correct 128 ms 32692 KB Output is correct
5 Correct 107 ms 31704 KB Output is correct
6 Correct 119 ms 34724 KB Output is correct
7 Correct 127 ms 32796 KB Output is correct
8 Correct 115 ms 33320 KB Output is correct
9 Correct 135 ms 31400 KB Output is correct
10 Correct 126 ms 31144 KB Output is correct
11 Correct 106 ms 28368 KB Output is correct
12 Correct 93 ms 28628 KB Output is correct
13 Correct 92 ms 28332 KB Output is correct
14 Correct 94 ms 28336 KB Output is correct
15 Correct 77 ms 28200 KB Output is correct
16 Correct 69 ms 28328 KB Output is correct
17 Correct 36 ms 28976 KB Output is correct
18 Correct 37 ms 28976 KB Output is correct
19 Correct 37 ms 28976 KB Output is correct
20 Correct 36 ms 28968 KB Output is correct
21 Correct 37 ms 28968 KB Output is correct
22 Correct 36 ms 28976 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 13 ms 14592 KB Output is correct
2 Correct 13 ms 14592 KB Output is correct
3 Correct 13 ms 14592 KB Output is correct
4 Correct 13 ms 14720 KB Output is correct
5 Correct 14 ms 14720 KB Output is correct
6 Correct 14 ms 14720 KB Output is correct
7 Correct 13 ms 14848 KB Output is correct
8 Correct 13 ms 14720 KB Output is correct
9 Correct 14 ms 14720 KB Output is correct
10 Correct 14 ms 14592 KB Output is correct
11 Correct 13 ms 14592 KB Output is correct
12 Correct 13 ms 14720 KB Output is correct
13 Correct 13 ms 14592 KB Output is correct
14 Correct 13 ms 14592 KB Output is correct
15 Correct 13 ms 14592 KB Output is correct
16 Correct 13 ms 14592 KB Output is correct
17 Correct 13 ms 14592 KB Output is correct
18 Correct 13 ms 14592 KB Output is correct
19 Correct 13 ms 14720 KB Output is correct
20 Correct 13 ms 14592 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 145 ms 33548 KB Output is correct
2 Correct 147 ms 33716 KB Output is correct
3 Correct 143 ms 33572 KB Output is correct
4 Correct 131 ms 33548 KB Output is correct
5 Correct 143 ms 33580 KB Output is correct
6 Correct 145 ms 42212 KB Output is correct
7 Correct 143 ms 39200 KB Output is correct
8 Correct 151 ms 37696 KB Output is correct
9 Correct 155 ms 36388 KB Output is correct
10 Correct 134 ms 33568 KB Output is correct
11 Correct 141 ms 33568 KB Output is correct
12 Correct 146 ms 33572 KB Output is correct
13 Correct 127 ms 33568 KB Output is correct
14 Correct 113 ms 32420 KB Output is correct
15 Correct 117 ms 31400 KB Output is correct
16 Correct 83 ms 29476 KB Output is correct
17 Correct 110 ms 34140 KB Output is correct
18 Correct 100 ms 34208 KB Output is correct
19 Correct 102 ms 34204 KB Output is correct
20 Correct 104 ms 34084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 14 ms 14720 KB Output is correct
2 Correct 13 ms 14592 KB Output is correct
3 Correct 13 ms 14592 KB Output is correct
4 Correct 15 ms 14592 KB Output is correct
5 Correct 13 ms 14592 KB Output is correct
6 Correct 13 ms 14592 KB Output is correct
7 Correct 13 ms 14592 KB Output is correct
8 Correct 13 ms 14592 KB Output is correct
9 Correct 13 ms 14592 KB Output is correct
10 Correct 13 ms 14592 KB Output is correct
11 Correct 13 ms 14592 KB Output is correct
12 Correct 13 ms 14720 KB Output is correct
13 Correct 13 ms 14720 KB Output is correct
14 Correct 13 ms 14720 KB Output is correct
15 Correct 16 ms 14720 KB Output is correct
16 Correct 13 ms 14592 KB Output is correct
17 Correct 13 ms 14592 KB Output is correct
18 Correct 14 ms 14592 KB Output is correct
19 Correct 13 ms 14592 KB Output is correct
20 Correct 13 ms 14592 KB Output is correct
21 Correct 13 ms 14592 KB Output is correct
22 Correct 13 ms 14592 KB Output is correct
23 Correct 13 ms 14592 KB Output is correct
24 Correct 13 ms 14592 KB Output is correct
25 Correct 13 ms 14592 KB Output is correct
26 Correct 14 ms 14592 KB Output is correct
27 Correct 13 ms 14592 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 128 ms 33572 KB Output is correct
2 Correct 147 ms 33444 KB Output is correct
3 Correct 130 ms 32036 KB Output is correct
4 Correct 145 ms 29932 KB Output is correct
5 Correct 117 ms 27756 KB Output is correct
6 Correct 104 ms 26672 KB Output is correct
7 Correct 100 ms 26288 KB Output is correct
8 Correct 100 ms 25784 KB Output is correct
9 Correct 100 ms 25524 KB Output is correct
10 Correct 95 ms 25336 KB Output is correct
11 Correct 90 ms 25080 KB Output is correct
12 Correct 103 ms 24952 KB Output is correct
13 Correct 97 ms 25080 KB Output is correct
14 Correct 102 ms 26740 KB Output is correct
15 Correct 143 ms 38048 KB Output is correct
16 Correct 163 ms 36000 KB Output is correct
17 Correct 144 ms 35876 KB Output is correct
18 Correct 151 ms 34084 KB Output is correct
19 Correct 130 ms 29864 KB Output is correct
20 Correct 135 ms 29868 KB Output is correct
21 Correct 144 ms 30120 KB Output is correct
22 Correct 121 ms 28716 KB Output is correct
23 Correct 113 ms 27688 KB Output is correct
24 Correct 154 ms 32296 KB Output is correct
25 Correct 147 ms 32432 KB Output is correct
26 Correct 122 ms 31008 KB Output is correct
27 Correct 147 ms 31012 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 12 ms 14464 KB Output is correct
2 Correct 12 ms 14464 KB Output is correct
3 Correct 12 ms 14464 KB Output is correct
4 Correct 13 ms 14464 KB Output is correct
5 Correct 12 ms 14464 KB Output is correct
6 Correct 12 ms 14464 KB Output is correct
7 Correct 12 ms 14464 KB Output is correct
8 Correct 12 ms 14464 KB Output is correct
9 Correct 12 ms 14464 KB Output is correct
10 Correct 12 ms 14464 KB Output is correct
11 Correct 12 ms 14464 KB Output is correct
12 Correct 13 ms 14464 KB Output is correct
13 Correct 12 ms 14464 KB Output is correct
14 Correct 13 ms 14464 KB Output is correct
15 Correct 12 ms 14464 KB Output is correct
16 Correct 12 ms 14464 KB Output is correct
17 Correct 12 ms 14464 KB Output is correct
18 Correct 12 ms 14464 KB Output is correct
19 Correct 13 ms 14464 KB Output is correct
20 Correct 12 ms 14464 KB Output is correct
21 Correct 12 ms 14464 KB Output is correct
22 Correct 12 ms 14464 KB Output is correct
23 Correct 12 ms 14464 KB Output is correct
24 Correct 12 ms 14464 KB Output is correct
25 Correct 12 ms 14464 KB Output is correct
26 Correct 12 ms 14464 KB Output is correct
27 Correct 12 ms 14464 KB Output is correct
28 Correct 12 ms 14464 KB Output is correct
29 Correct 12 ms 14464 KB Output is correct
30 Correct 12 ms 14464 KB Output is correct
31 Correct 12 ms 14412 KB Output is correct
32 Correct 13 ms 14464 KB Output is correct
33 Correct 12 ms 14464 KB Output is correct
34 Correct 12 ms 14464 KB Output is correct
35 Correct 12 ms 14464 KB Output is correct
36 Correct 13 ms 14464 KB Output is correct
37 Correct 13 ms 14464 KB Output is correct
38 Correct 13 ms 14464 KB Output is correct
39 Correct 12 ms 14464 KB Output is correct
40 Correct 12 ms 14512 KB Output is correct
41 Correct 12 ms 14464 KB Output is correct
42 Correct 12 ms 14464 KB Output is correct
43 Correct 12 ms 14464 KB Output is correct
44 Correct 13 ms 14464 KB Output is correct
45 Correct 13 ms 14464 KB Output is correct
46 Correct 13 ms 14464 KB Output is correct
47 Correct 12 ms 14464 KB Output is correct
48 Correct 12 ms 14464 KB Output is correct
49 Correct 12 ms 14464 KB Output is correct
50 Correct 12 ms 14464 KB Output is correct
51 Correct 13 ms 14464 KB Output is correct
52 Correct 12 ms 14464 KB Output is correct
53 Correct 13 ms 14464 KB Output is correct
54 Correct 12 ms 14464 KB Output is correct
55 Correct 13 ms 14464 KB Output is correct
56 Correct 12 ms 14464 KB Output is correct
57 Correct 12 ms 14464 KB Output is correct
58 Correct 12 ms 14464 KB Output is correct
59 Correct 12 ms 14464 KB Output is correct
60 Correct 12 ms 14464 KB Output is correct
61 Correct 12 ms 14464 KB Output is correct
62 Correct 12 ms 14464 KB Output is correct
63 Correct 12 ms 14464 KB Output is correct
64 Correct 13 ms 14464 KB Output is correct
65 Correct 12 ms 14464 KB Output is correct
66 Correct 12 ms 14592 KB Output is correct
67 Correct 13 ms 14592 KB Output is correct
68 Correct 14 ms 14592 KB Output is correct
69 Correct 15 ms 14592 KB Output is correct
70 Correct 15 ms 14592 KB Output is correct
71 Correct 14 ms 14592 KB Output is correct
72 Correct 14 ms 14592 KB Output is correct
73 Correct 13 ms 14592 KB Output is correct
74 Correct 13 ms 14592 KB Output is correct
75 Correct 13 ms 14592 KB Output is correct
76 Correct 13 ms 14464 KB Output is correct
77 Correct 13 ms 14592 KB Output is correct
78 Correct 13 ms 14592 KB Output is correct
79 Correct 13 ms 14592 KB Output is correct
80 Correct 14 ms 14592 KB Output is correct
81 Correct 14 ms 14592 KB Output is correct
82 Correct 13 ms 14592 KB Output is correct
83 Correct 13 ms 14592 KB Output is correct
84 Correct 13 ms 14592 KB Output is correct
85 Correct 13 ms 14592 KB Output is correct
86 Correct 13 ms 14592 KB Output is correct
87 Correct 13 ms 14592 KB Output is correct
88 Correct 13 ms 14592 KB Output is correct
89 Correct 13 ms 14592 KB Output is correct
90 Correct 13 ms 14592 KB Output is correct
91 Correct 13 ms 14592 KB Output is correct
92 Correct 13 ms 14592 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 12 ms 14464 KB Output is correct
2 Correct 12 ms 14464 KB Output is correct
3 Correct 12 ms 14464 KB Output is correct
4 Correct 13 ms 14464 KB Output is correct
5 Correct 12 ms 14464 KB Output is correct
6 Correct 12 ms 14464 KB Output is correct
7 Correct 12 ms 14464 KB Output is correct
8 Correct 12 ms 14464 KB Output is correct
9 Correct 12 ms 14464 KB Output is correct
10 Correct 12 ms 14464 KB Output is correct
11 Correct 12 ms 14464 KB Output is correct
12 Correct 13 ms 14464 KB Output is correct
13 Correct 12 ms 14464 KB Output is correct
14 Correct 13 ms 14464 KB Output is correct
15 Correct 12 ms 14464 KB Output is correct
16 Correct 12 ms 14464 KB Output is correct
17 Correct 12 ms 14464 KB Output is correct
18 Correct 12 ms 14464 KB Output is correct
19 Correct 13 ms 14464 KB Output is correct
20 Correct 12 ms 14464 KB Output is correct
21 Correct 12 ms 14464 KB Output is correct
22 Correct 12 ms 14464 KB Output is correct
23 Correct 12 ms 14464 KB Output is correct
24 Correct 12 ms 14464 KB Output is correct
25 Correct 12 ms 14464 KB Output is correct
26 Correct 12 ms 14464 KB Output is correct
27 Correct 12 ms 14464 KB Output is correct
28 Correct 12 ms 14464 KB Output is correct
29 Correct 12 ms 14464 KB Output is correct
30 Correct 12 ms 14464 KB Output is correct
31 Correct 12 ms 14412 KB Output is correct
32 Correct 13 ms 14464 KB Output is correct
33 Correct 12 ms 14464 KB Output is correct
34 Correct 12 ms 14464 KB Output is correct
35 Correct 12 ms 14464 KB Output is correct
36 Correct 13 ms 14464 KB Output is correct
37 Correct 13 ms 14464 KB Output is correct
38 Correct 13 ms 14464 KB Output is correct
39 Correct 12 ms 14464 KB Output is correct
40 Correct 12 ms 14512 KB Output is correct
41 Correct 12 ms 14464 KB Output is correct
42 Correct 12 ms 14464 KB Output is correct
43 Correct 12 ms 14464 KB Output is correct
44 Correct 13 ms 14464 KB Output is correct
45 Correct 13 ms 14464 KB Output is correct
46 Correct 13 ms 14464 KB Output is correct
47 Correct 12 ms 14464 KB Output is correct
48 Correct 12 ms 14464 KB Output is correct
49 Correct 12 ms 14464 KB Output is correct
50 Correct 12 ms 14464 KB Output is correct
51 Correct 13 ms 14464 KB Output is correct
52 Correct 12 ms 14464 KB Output is correct
53 Correct 13 ms 14464 KB Output is correct
54 Correct 12 ms 14464 KB Output is correct
55 Correct 13 ms 14464 KB Output is correct
56 Correct 12 ms 14464 KB Output is correct
57 Correct 12 ms 14464 KB Output is correct
58 Correct 12 ms 14464 KB Output is correct
59 Correct 12 ms 14464 KB Output is correct
60 Correct 12 ms 14464 KB Output is correct
61 Correct 12 ms 14464 KB Output is correct
62 Correct 12 ms 14464 KB Output is correct
63 Correct 12 ms 14464 KB Output is correct
64 Correct 13 ms 14464 KB Output is correct
65 Correct 12 ms 14464 KB Output is correct
66 Correct 96 ms 32624 KB Output is correct
67 Correct 103 ms 32624 KB Output is correct
68 Correct 126 ms 35496 KB Output is correct
69 Correct 128 ms 32692 KB Output is correct
70 Correct 107 ms 31704 KB Output is correct
71 Correct 119 ms 34724 KB Output is correct
72 Correct 127 ms 32796 KB Output is correct
73 Correct 115 ms 33320 KB Output is correct
74 Correct 135 ms 31400 KB Output is correct
75 Correct 126 ms 31144 KB Output is correct
76 Correct 106 ms 28368 KB Output is correct
77 Correct 93 ms 28628 KB Output is correct
78 Correct 92 ms 28332 KB Output is correct
79 Correct 94 ms 28336 KB Output is correct
80 Correct 77 ms 28200 KB Output is correct
81 Correct 69 ms 28328 KB Output is correct
82 Correct 36 ms 28976 KB Output is correct
83 Correct 37 ms 28976 KB Output is correct
84 Correct 37 ms 28976 KB Output is correct
85 Correct 36 ms 28968 KB Output is correct
86 Correct 37 ms 28968 KB Output is correct
87 Correct 36 ms 28976 KB Output is correct
88 Correct 13 ms 14592 KB Output is correct
89 Correct 13 ms 14592 KB Output is correct
90 Correct 13 ms 14592 KB Output is correct
91 Correct 13 ms 14720 KB Output is correct
92 Correct 14 ms 14720 KB Output is correct
93 Correct 14 ms 14720 KB Output is correct
94 Correct 13 ms 14848 KB Output is correct
95 Correct 13 ms 14720 KB Output is correct
96 Correct 14 ms 14720 KB Output is correct
97 Correct 14 ms 14592 KB Output is correct
98 Correct 13 ms 14592 KB Output is correct
99 Correct 13 ms 14720 KB Output is correct
100 Correct 13 ms 14592 KB Output is correct
101 Correct 13 ms 14592 KB Output is correct
102 Correct 13 ms 14592 KB Output is correct
103 Correct 13 ms 14592 KB Output is correct
104 Correct 13 ms 14592 KB Output is correct
105 Correct 13 ms 14592 KB Output is correct
106 Correct 13 ms 14720 KB Output is correct
107 Correct 13 ms 14592 KB Output is correct
108 Correct 145 ms 33548 KB Output is correct
109 Correct 147 ms 33716 KB Output is correct
110 Correct 143 ms 33572 KB Output is correct
111 Correct 131 ms 33548 KB Output is correct
112 Correct 143 ms 33580 KB Output is correct
113 Correct 145 ms 42212 KB Output is correct
114 Correct 143 ms 39200 KB Output is correct
115 Correct 151 ms 37696 KB Output is correct
116 Correct 155 ms 36388 KB Output is correct
117 Correct 134 ms 33568 KB Output is correct
118 Correct 141 ms 33568 KB Output is correct
119 Correct 146 ms 33572 KB Output is correct
120 Correct 127 ms 33568 KB Output is correct
121 Correct 113 ms 32420 KB Output is correct
122 Correct 117 ms 31400 KB Output is correct
123 Correct 83 ms 29476 KB Output is correct
124 Correct 110 ms 34140 KB Output is correct
125 Correct 100 ms 34208 KB Output is correct
126 Correct 102 ms 34204 KB Output is correct
127 Correct 104 ms 34084 KB Output is correct
128 Correct 14 ms 14720 KB Output is correct
129 Correct 13 ms 14592 KB Output is correct
130 Correct 13 ms 14592 KB Output is correct
131 Correct 15 ms 14592 KB Output is correct
132 Correct 13 ms 14592 KB Output is correct
133 Correct 13 ms 14592 KB Output is correct
134 Correct 13 ms 14592 KB Output is correct
135 Correct 13 ms 14592 KB Output is correct
136 Correct 13 ms 14592 KB Output is correct
137 Correct 13 ms 14592 KB Output is correct
138 Correct 13 ms 14592 KB Output is correct
139 Correct 13 ms 14720 KB Output is correct
140 Correct 13 ms 14720 KB Output is correct
141 Correct 13 ms 14720 KB Output is correct
142 Correct 16 ms 14720 KB Output is correct
143 Correct 13 ms 14592 KB Output is correct
144 Correct 13 ms 14592 KB Output is correct
145 Correct 14 ms 14592 KB Output is correct
146 Correct 13 ms 14592 KB Output is correct
147 Correct 13 ms 14592 KB Output is correct
148 Correct 13 ms 14592 KB Output is correct
149 Correct 13 ms 14592 KB Output is correct
150 Correct 13 ms 14592 KB Output is correct
151 Correct 13 ms 14592 KB Output is correct
152 Correct 13 ms 14592 KB Output is correct
153 Correct 14 ms 14592 KB Output is correct
154 Correct 13 ms 14592 KB Output is correct
155 Correct 128 ms 33572 KB Output is correct
156 Correct 147 ms 33444 KB Output is correct
157 Correct 130 ms 32036 KB Output is correct
158 Correct 145 ms 29932 KB Output is correct
159 Correct 117 ms 27756 KB Output is correct
160 Correct 104 ms 26672 KB Output is correct
161 Correct 100 ms 26288 KB Output is correct
162 Correct 100 ms 25784 KB Output is correct
163 Correct 100 ms 25524 KB Output is correct
164 Correct 95 ms 25336 KB Output is correct
165 Correct 90 ms 25080 KB Output is correct
166 Correct 103 ms 24952 KB Output is correct
167 Correct 97 ms 25080 KB Output is correct
168 Correct 102 ms 26740 KB Output is correct
169 Correct 143 ms 38048 KB Output is correct
170 Correct 163 ms 36000 KB Output is correct
171 Correct 144 ms 35876 KB Output is correct
172 Correct 151 ms 34084 KB Output is correct
173 Correct 130 ms 29864 KB Output is correct
174 Correct 135 ms 29868 KB Output is correct
175 Correct 144 ms 30120 KB Output is correct
176 Correct 121 ms 28716 KB Output is correct
177 Correct 113 ms 27688 KB Output is correct
178 Correct 154 ms 32296 KB Output is correct
179 Correct 147 ms 32432 KB Output is correct
180 Correct 122 ms 31008 KB Output is correct
181 Correct 147 ms 31012 KB Output is correct
182 Correct 12 ms 14592 KB Output is correct
183 Correct 13 ms 14592 KB Output is correct
184 Correct 14 ms 14592 KB Output is correct
185 Correct 15 ms 14592 KB Output is correct
186 Correct 15 ms 14592 KB Output is correct
187 Correct 14 ms 14592 KB Output is correct
188 Correct 14 ms 14592 KB Output is correct
189 Correct 13 ms 14592 KB Output is correct
190 Correct 13 ms 14592 KB Output is correct
191 Correct 13 ms 14592 KB Output is correct
192 Correct 13 ms 14464 KB Output is correct
193 Correct 13 ms 14592 KB Output is correct
194 Correct 13 ms 14592 KB Output is correct
195 Correct 13 ms 14592 KB Output is correct
196 Correct 14 ms 14592 KB Output is correct
197 Correct 14 ms 14592 KB Output is correct
198 Correct 13 ms 14592 KB Output is correct
199 Correct 13 ms 14592 KB Output is correct
200 Correct 13 ms 14592 KB Output is correct
201 Correct 13 ms 14592 KB Output is correct
202 Correct 13 ms 14592 KB Output is correct
203 Correct 13 ms 14592 KB Output is correct
204 Correct 13 ms 14592 KB Output is correct
205 Correct 13 ms 14592 KB Output is correct
206 Correct 13 ms 14592 KB Output is correct
207 Correct 13 ms 14592 KB Output is correct
208 Correct 13 ms 14592 KB Output is correct
209 Correct 36 ms 28968 KB Output is correct
210 Correct 77 ms 30244 KB Output is correct
211 Correct 106 ms 30904 KB Output is correct
212 Correct 130 ms 31144 KB Output is correct
213 Correct 148 ms 32112 KB Output is correct
214 Correct 76 ms 27948 KB Output is correct
215 Correct 78 ms 27032 KB Output is correct
216 Correct 147 ms 30884 KB Output is correct
217 Correct 112 ms 28328 KB Output is correct
218 Correct 106 ms 25780 KB Output is correct
219 Correct 100 ms 25208 KB Output is correct
220 Correct 99 ms 25208 KB Output is correct
221 Correct 95 ms 24824 KB Output is correct
222 Correct 86 ms 25720 KB Output is correct
223 Correct 142 ms 30636 KB Output is correct
224 Correct 144 ms 29864 KB Output is correct
225 Correct 137 ms 27820 KB Output is correct
226 Correct 127 ms 27820 KB Output is correct
227 Correct 117 ms 27820 KB Output is correct
228 Correct 124 ms 27056 KB Output is correct
229 Correct 87 ms 26416 KB Output is correct
230 Correct 115 ms 28460 KB Output is correct
231 Correct 122 ms 28460 KB Output is correct