답안 #1106829

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1106829 2024-10-31T07:26:30 Z mispertion 철인 이종 경기 (APIO18_duathlon) C++17
100 / 100
384 ms 85228 KB
#include<bits/stdc++.h>

using namespace std;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
using ll = long long;
#define int ll
using ld = long double;
using pii = pair<int, int>;
#define F first
#define S second

const ld PI = 3.1415926535;
const int N = 5e5 + 2;
const int M = 2e6 + 1;
int mod = 998244353;
const int infi = INT_MAX;
const ll infl = LLONG_MAX;

int mult(int a, int b) {
    return a * 1LL * b % mod;
}

int sum(int a, int b) {
    if (a + b < 0)
        return a + b + mod;
    if (a + b >= mod)
        return a + b - mod;
    return a + b;
}


ll binpow(ll a, ll n) {
    if (n == 0)
        return 1;
    if (n % 2 == 1) {
        return binpow(a, n - 1) * a % mod;
    } else {
        ll b = binpow(a, n / 2);
        return b * b % mod;
    }
}

int n, m, tin[N], used[N], low[N], cnt[N], cur, tick, art[N], sz[N], dp[N], ndp[N];
vector<int> g[N];
vector<int> ng[N];

void dfs(int v, int p){
    tin[v] = ++tick;
    low[v] = tin[v];
    used[v] = 1;
    int ch = 0;
    bool isart = false;
    for(auto u : g[v]){
        if(u == p) continue;
        if(used[u]){
            low[v] = min(low[v], tin[u]);
        }else{
            dfs(u, v);
            low[v] = min(low[v], low[u]);
            ch++;
            if(p != 0 && low[u] >= tin[v])
                isart = true;
        }
    }
    if(p == 0 && ch > 1)
        isart = true;
    if(isart)
        art[v] = 1;
}

map<pii, int> mp;

void dfs1(int v, int c){
    used[v] = 1;
    if(c == 0){
        for(auto u : g[v]){
            if(used[u]) continue;
            cur++;
            mp[{u, v}] = cur;
            mp[{v, u}] = cur;
            dfs1(u, cur);
        }
        return;
    }
    for(auto u : g[v]){
        if(used[u]){
            if(tin[u] < tin[v]){
                mp[{u, v}] = c;
                mp[{v, u}] = c;
            }
            continue;
        }
        if(low[u] >= tin[v]){
            cur++;
            mp[{u, v}] = cur;
            mp[{v, u}] = cur;
            dfs1(u, cur);
        }else{
            mp[{u, v}] = c;
            mp[{v, u}] = c;
            dfs1(u, c);
        }
    }
}

void dfs2(int v, int p){
    used[v] = 1;
    if(v <= n){
        sz[v] = 1;
    }else{
        dp[v] = cnt[v - n] * (cnt[v - n] - 1);
        sz[v] = cnt[v - n];
    }
    int cur = 0;
    for(auto u : ng[v]){
        if(u == p) continue;
        dfs2(u, v);
        sz[v] += sz[u];
        if(v > n){
            dp[v] += 2 * cnt[v - n] * sz[u];
            dp[v] += 2 * cur * sz[u];
            cur += sz[u];
        }
    }
}

void dfs3(int v, int p, int wh){
    used[v] = 1;
    if(v > n){
        int csm = (cnt[v - n]) * (cnt[v - n] - 1) / 2 + (wh - sz[v]) * (cnt[v - n]);
        int cs = wh - sz[v];
        for(auto u : ng[v]){
            if(u == p) continue;
            csm += (sz[u] * cnt[v - n]);
            csm += (cs * sz[u]);
            cs += sz[u];
        }
        for(auto u : ng[v]){
            if(u == p) continue;
            csm -= (sz[u] * cnt[v - n]);
            csm -= (sz[u] * (cs - sz[u]));
            ndp[u] = csm * 2;
            csm += (sz[u] * cnt[v - n]);
            csm += (sz[u] * (cs - sz[u]));
            dfs3(u, v, wh);
        }
    }else{
        for(auto u : ng[v]){
            if(u != p)
                dfs3(u, v, wh);
        }
    }
}

int ans = 0;
void dfs4(int v, int p, int wh){
    used[v] = 1;
    if(v <= n){
        ans += ndp[v];
        int cs = wh - sz[v];
        for(auto u : ng[v]){
            if(u == p) continue;
            ans += dp[u];
            ans += 2 * sz[u] * cs;
            cs += sz[u];
        }
    }else{
        ans += cnt[v - n] * (cnt[v - n] - 1) * (cnt[v - n] - 2);
        int cs = wh - sz[v];
        ans += 2 * (cnt[v - n] * (cnt[v - n] - 1) * (wh - sz[v]));
        for(auto u : ng[v]){
            if(u == p) continue;
            ans += 2 * (cnt[v - n] * (cnt[v - n] - 1) * sz[u]);
            ans += (cnt[v - n] * (2 * (cs * sz[u])));
            cs += sz[u];
        }
    }
    for(auto u : ng[v]){
        if(u == p) continue;
        dfs4(u, v, wh);
    }
}

void solve() {
    cin >> n >> m;
    for(int i = 1; i <= m; i++){
        int u, v;
        cin >> u >> v;
        g[v].push_back(u);
        g[u].push_back(v);
    }
    for(int i = 1; i <= n; i++){
        if(!used[i])
            dfs(i, 0);
    }
    for(int i = 1; i <= n; i++)
        used[i] = 0;
    for(int i = 1; i <= n; i++)
        if(!used[i])
            dfs1(i, 0);
    for(int i = 1; i <= n; i++){
        if(art[i]){
            for(auto e : g[i]){
                ng[i].push_back(n + mp[{i, e}]);
                ng[n + mp[{i, e}]].push_back(i);
            }
            sort(ng[i].begin(), ng[i].end());
            ng[i].resize(unique(ng[i].begin(), ng[i].end()) - ng[i].begin());
        }else{
            if(g[i].size() > 0){
                cnt[mp[{g[i][0], i}]]++;
            }
        }
    }
    for(int i = n + 1; i <= n + cur; i++){
        ng[i].resize(unique(ng[i].begin(), ng[i].end()) - ng[i].begin());
    }
    for(int i = n + 1; i <= n + cur; i++){
        if(!used[i])
            dfs2(i, 0);
    }
    for(int i = 1; i <= n + cur; i++)
        used[i] = 0;
    for(int i = n + 1; i <= n + cur; i++){
        if(!used[i])
            dfs3(i, 0, sz[i]);
    }
    for(int i = 1; i <= n + cur; i++)
        used[i] = 0;
    for(int i = n + 1; i <= n + cur; i++){
        if(!used[i])
            dfs4(i, 0, sz[i]);
    }
    for(int i = 1; i <= n + cur; i++)
        used[i] = 0;
    cout << ans << '\n';
}

signed main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 33360 KB Output is correct
2 Correct 5 ms 33488 KB Output is correct
3 Correct 5 ms 33360 KB Output is correct
4 Correct 5 ms 33360 KB Output is correct
5 Correct 5 ms 33376 KB Output is correct
6 Correct 5 ms 33360 KB Output is correct
7 Correct 5 ms 35408 KB Output is correct
8 Correct 5 ms 35576 KB Output is correct
9 Correct 5 ms 33360 KB Output is correct
10 Correct 5 ms 33360 KB Output is correct
11 Correct 5 ms 35408 KB Output is correct
12 Correct 7 ms 35408 KB Output is correct
13 Correct 5 ms 35408 KB Output is correct
14 Correct 5 ms 35408 KB Output is correct
15 Correct 5 ms 35408 KB Output is correct
16 Correct 7 ms 35408 KB Output is correct
17 Correct 5 ms 35408 KB Output is correct
18 Correct 6 ms 35408 KB Output is correct
19 Correct 5 ms 35408 KB Output is correct
20 Correct 5 ms 33360 KB Output is correct
21 Correct 5 ms 33360 KB Output is correct
22 Correct 6 ms 35408 KB Output is correct
23 Correct 6 ms 35408 KB Output is correct
24 Correct 5 ms 35408 KB Output is correct
25 Correct 5 ms 35408 KB Output is correct
26 Correct 5 ms 35408 KB Output is correct
27 Correct 5 ms 35576 KB Output is correct
28 Correct 5 ms 35408 KB Output is correct
29 Correct 7 ms 35408 KB Output is correct
30 Correct 7 ms 35408 KB Output is correct
31 Correct 5 ms 35580 KB Output is correct
32 Correct 6 ms 35408 KB Output is correct
33 Correct 6 ms 35420 KB Output is correct
34 Correct 7 ms 33360 KB Output is correct
35 Correct 5 ms 33360 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 33360 KB Output is correct
2 Correct 5 ms 33488 KB Output is correct
3 Correct 5 ms 33360 KB Output is correct
4 Correct 5 ms 33360 KB Output is correct
5 Correct 5 ms 33376 KB Output is correct
6 Correct 5 ms 33360 KB Output is correct
7 Correct 5 ms 35408 KB Output is correct
8 Correct 5 ms 35576 KB Output is correct
9 Correct 5 ms 33360 KB Output is correct
10 Correct 5 ms 33360 KB Output is correct
11 Correct 5 ms 35408 KB Output is correct
12 Correct 7 ms 35408 KB Output is correct
13 Correct 5 ms 35408 KB Output is correct
14 Correct 5 ms 35408 KB Output is correct
15 Correct 5 ms 35408 KB Output is correct
16 Correct 7 ms 35408 KB Output is correct
17 Correct 5 ms 35408 KB Output is correct
18 Correct 6 ms 35408 KB Output is correct
19 Correct 5 ms 35408 KB Output is correct
20 Correct 5 ms 33360 KB Output is correct
21 Correct 5 ms 33360 KB Output is correct
22 Correct 6 ms 35408 KB Output is correct
23 Correct 6 ms 35408 KB Output is correct
24 Correct 5 ms 35408 KB Output is correct
25 Correct 5 ms 35408 KB Output is correct
26 Correct 5 ms 35408 KB Output is correct
27 Correct 5 ms 35576 KB Output is correct
28 Correct 5 ms 35408 KB Output is correct
29 Correct 7 ms 35408 KB Output is correct
30 Correct 7 ms 35408 KB Output is correct
31 Correct 5 ms 35580 KB Output is correct
32 Correct 6 ms 35408 KB Output is correct
33 Correct 6 ms 35420 KB Output is correct
34 Correct 7 ms 33360 KB Output is correct
35 Correct 5 ms 33360 KB Output is correct
36 Correct 5 ms 33360 KB Output is correct
37 Correct 6 ms 35408 KB Output is correct
38 Correct 5 ms 35408 KB Output is correct
39 Correct 6 ms 35408 KB Output is correct
40 Correct 5 ms 35408 KB Output is correct
41 Correct 6 ms 35408 KB Output is correct
42 Correct 6 ms 35408 KB Output is correct
43 Correct 5 ms 35496 KB Output is correct
44 Correct 6 ms 35408 KB Output is correct
45 Correct 6 ms 35408 KB Output is correct
46 Correct 6 ms 35460 KB Output is correct
47 Correct 5 ms 33360 KB Output is correct
48 Correct 5 ms 35408 KB Output is correct
49 Correct 5 ms 33360 KB Output is correct
50 Correct 6 ms 33360 KB Output is correct
51 Correct 5 ms 35408 KB Output is correct
52 Correct 6 ms 35408 KB Output is correct
53 Correct 6 ms 35408 KB Output is correct
54 Correct 6 ms 35540 KB Output is correct
55 Correct 5 ms 35408 KB Output is correct
56 Correct 6 ms 35408 KB Output is correct
57 Correct 6 ms 35576 KB Output is correct
58 Correct 6 ms 35408 KB Output is correct
59 Correct 6 ms 35408 KB Output is correct
60 Correct 6 ms 35408 KB Output is correct
61 Correct 7 ms 35408 KB Output is correct
62 Correct 5 ms 35408 KB Output is correct
63 Correct 6 ms 35520 KB Output is correct
64 Correct 7 ms 35408 KB Output is correct
65 Correct 6 ms 35524 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 196 ms 68004 KB Output is correct
2 Correct 200 ms 68136 KB Output is correct
3 Correct 205 ms 68680 KB Output is correct
4 Correct 238 ms 71660 KB Output is correct
5 Correct 223 ms 66388 KB Output is correct
6 Correct 203 ms 68424 KB Output is correct
7 Correct 201 ms 66556 KB Output is correct
8 Correct 213 ms 67448 KB Output is correct
9 Correct 224 ms 65148 KB Output is correct
10 Correct 195 ms 65476 KB Output is correct
11 Correct 159 ms 59472 KB Output is correct
12 Correct 165 ms 59292 KB Output is correct
13 Correct 166 ms 57664 KB Output is correct
14 Correct 136 ms 57668 KB Output is correct
15 Correct 100 ms 53832 KB Output is correct
16 Correct 98 ms 53696 KB Output is correct
17 Correct 8 ms 38224 KB Output is correct
18 Correct 9 ms 38480 KB Output is correct
19 Correct 9 ms 38224 KB Output is correct
20 Correct 8 ms 38264 KB Output is correct
21 Correct 9 ms 40272 KB Output is correct
22 Correct 9 ms 38224 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 35664 KB Output is correct
2 Correct 7 ms 35664 KB Output is correct
3 Correct 6 ms 35664 KB Output is correct
4 Correct 6 ms 35708 KB Output is correct
5 Correct 7 ms 35664 KB Output is correct
6 Correct 7 ms 35664 KB Output is correct
7 Correct 9 ms 35920 KB Output is correct
8 Correct 6 ms 35664 KB Output is correct
9 Correct 6 ms 35676 KB Output is correct
10 Correct 7 ms 35836 KB Output is correct
11 Correct 7 ms 35664 KB Output is correct
12 Correct 7 ms 35836 KB Output is correct
13 Correct 6 ms 35664 KB Output is correct
14 Correct 6 ms 35668 KB Output is correct
15 Correct 6 ms 35832 KB Output is correct
16 Correct 6 ms 35664 KB Output is correct
17 Correct 6 ms 35664 KB Output is correct
18 Correct 6 ms 35664 KB Output is correct
19 Correct 6 ms 35664 KB Output is correct
20 Correct 6 ms 35664 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 228 ms 66640 KB Output is correct
2 Correct 216 ms 66804 KB Output is correct
3 Correct 229 ms 66728 KB Output is correct
4 Correct 206 ms 66720 KB Output is correct
5 Correct 206 ms 66632 KB Output is correct
6 Correct 244 ms 75668 KB Output is correct
7 Correct 230 ms 72776 KB Output is correct
8 Correct 259 ms 71244 KB Output is correct
9 Correct 249 ms 69704 KB Output is correct
10 Correct 220 ms 66788 KB Output is correct
11 Correct 229 ms 67928 KB Output is correct
12 Correct 233 ms 67932 KB Output is correct
13 Correct 231 ms 67940 KB Output is correct
14 Correct 197 ms 63652 KB Output is correct
15 Correct 161 ms 61256 KB Output is correct
16 Correct 101 ms 53832 KB Output is correct
17 Correct 174 ms 66748 KB Output is correct
18 Correct 186 ms 66716 KB Output is correct
19 Correct 174 ms 66992 KB Output is correct
20 Correct 185 ms 66920 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 35664 KB Output is correct
2 Correct 7 ms 35664 KB Output is correct
3 Correct 8 ms 35664 KB Output is correct
4 Correct 7 ms 35676 KB Output is correct
5 Correct 7 ms 35664 KB Output is correct
6 Correct 7 ms 35664 KB Output is correct
7 Correct 8 ms 35836 KB Output is correct
8 Correct 8 ms 35664 KB Output is correct
9 Correct 6 ms 35664 KB Output is correct
10 Correct 6 ms 35664 KB Output is correct
11 Correct 6 ms 35664 KB Output is correct
12 Correct 7 ms 35748 KB Output is correct
13 Correct 8 ms 35716 KB Output is correct
14 Correct 8 ms 35664 KB Output is correct
15 Correct 7 ms 35664 KB Output is correct
16 Correct 7 ms 35832 KB Output is correct
17 Correct 8 ms 35664 KB Output is correct
18 Correct 7 ms 35664 KB Output is correct
19 Correct 8 ms 35664 KB Output is correct
20 Correct 7 ms 35664 KB Output is correct
21 Correct 7 ms 35664 KB Output is correct
22 Correct 7 ms 35664 KB Output is correct
23 Correct 8 ms 35664 KB Output is correct
24 Correct 7 ms 35664 KB Output is correct
25 Correct 6 ms 35464 KB Output is correct
26 Correct 6 ms 35408 KB Output is correct
27 Correct 5 ms 35408 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 260 ms 66888 KB Output is correct
2 Correct 229 ms 66744 KB Output is correct
3 Correct 277 ms 66632 KB Output is correct
4 Correct 245 ms 65880 KB Output is correct
5 Correct 236 ms 63148 KB Output is correct
6 Correct 210 ms 61784 KB Output is correct
7 Correct 181 ms 61004 KB Output is correct
8 Correct 177 ms 59976 KB Output is correct
9 Correct 193 ms 59720 KB Output is correct
10 Correct 160 ms 59276 KB Output is correct
11 Correct 167 ms 58696 KB Output is correct
12 Correct 154 ms 56648 KB Output is correct
13 Correct 163 ms 56580 KB Output is correct
14 Correct 158 ms 59728 KB Output is correct
15 Correct 279 ms 72800 KB Output is correct
16 Correct 264 ms 70756 KB Output is correct
17 Correct 267 ms 72016 KB Output is correct
18 Correct 287 ms 70236 KB Output is correct
19 Correct 250 ms 65864 KB Output is correct
20 Correct 245 ms 67408 KB Output is correct
21 Correct 225 ms 67196 KB Output is correct
22 Correct 212 ms 64496 KB Output is correct
23 Correct 165 ms 61736 KB Output is correct
24 Correct 242 ms 67036 KB Output is correct
25 Correct 267 ms 67292 KB Output is correct
26 Correct 297 ms 67008 KB Output is correct
27 Correct 322 ms 67100 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 33360 KB Output is correct
2 Correct 5 ms 33488 KB Output is correct
3 Correct 5 ms 33360 KB Output is correct
4 Correct 5 ms 33360 KB Output is correct
5 Correct 5 ms 33376 KB Output is correct
6 Correct 5 ms 33360 KB Output is correct
7 Correct 5 ms 35408 KB Output is correct
8 Correct 5 ms 35576 KB Output is correct
9 Correct 5 ms 33360 KB Output is correct
10 Correct 5 ms 33360 KB Output is correct
11 Correct 5 ms 35408 KB Output is correct
12 Correct 7 ms 35408 KB Output is correct
13 Correct 5 ms 35408 KB Output is correct
14 Correct 5 ms 35408 KB Output is correct
15 Correct 5 ms 35408 KB Output is correct
16 Correct 7 ms 35408 KB Output is correct
17 Correct 5 ms 35408 KB Output is correct
18 Correct 6 ms 35408 KB Output is correct
19 Correct 5 ms 35408 KB Output is correct
20 Correct 5 ms 33360 KB Output is correct
21 Correct 5 ms 33360 KB Output is correct
22 Correct 6 ms 35408 KB Output is correct
23 Correct 6 ms 35408 KB Output is correct
24 Correct 5 ms 35408 KB Output is correct
25 Correct 5 ms 35408 KB Output is correct
26 Correct 5 ms 35408 KB Output is correct
27 Correct 5 ms 35576 KB Output is correct
28 Correct 5 ms 35408 KB Output is correct
29 Correct 7 ms 35408 KB Output is correct
30 Correct 7 ms 35408 KB Output is correct
31 Correct 5 ms 35580 KB Output is correct
32 Correct 6 ms 35408 KB Output is correct
33 Correct 6 ms 35420 KB Output is correct
34 Correct 7 ms 33360 KB Output is correct
35 Correct 5 ms 33360 KB Output is correct
36 Correct 5 ms 33360 KB Output is correct
37 Correct 6 ms 35408 KB Output is correct
38 Correct 5 ms 35408 KB Output is correct
39 Correct 6 ms 35408 KB Output is correct
40 Correct 5 ms 35408 KB Output is correct
41 Correct 6 ms 35408 KB Output is correct
42 Correct 6 ms 35408 KB Output is correct
43 Correct 5 ms 35496 KB Output is correct
44 Correct 6 ms 35408 KB Output is correct
45 Correct 6 ms 35408 KB Output is correct
46 Correct 6 ms 35460 KB Output is correct
47 Correct 5 ms 33360 KB Output is correct
48 Correct 5 ms 35408 KB Output is correct
49 Correct 5 ms 33360 KB Output is correct
50 Correct 6 ms 33360 KB Output is correct
51 Correct 5 ms 35408 KB Output is correct
52 Correct 6 ms 35408 KB Output is correct
53 Correct 6 ms 35408 KB Output is correct
54 Correct 6 ms 35540 KB Output is correct
55 Correct 5 ms 35408 KB Output is correct
56 Correct 6 ms 35408 KB Output is correct
57 Correct 6 ms 35576 KB Output is correct
58 Correct 6 ms 35408 KB Output is correct
59 Correct 6 ms 35408 KB Output is correct
60 Correct 6 ms 35408 KB Output is correct
61 Correct 7 ms 35408 KB Output is correct
62 Correct 5 ms 35408 KB Output is correct
63 Correct 6 ms 35520 KB Output is correct
64 Correct 7 ms 35408 KB Output is correct
65 Correct 6 ms 35524 KB Output is correct
66 Correct 6 ms 33360 KB Output is correct
67 Correct 6 ms 35664 KB Output is correct
68 Correct 7 ms 35664 KB Output is correct
69 Correct 9 ms 35664 KB Output is correct
70 Correct 7 ms 35764 KB Output is correct
71 Correct 7 ms 35452 KB Output is correct
72 Correct 7 ms 35664 KB Output is correct
73 Correct 6 ms 35736 KB Output is correct
74 Correct 6 ms 35892 KB Output is correct
75 Correct 6 ms 35664 KB Output is correct
76 Correct 7 ms 35568 KB Output is correct
77 Correct 8 ms 35664 KB Output is correct
78 Correct 7 ms 35664 KB Output is correct
79 Correct 6 ms 35664 KB Output is correct
80 Correct 7 ms 35664 KB Output is correct
81 Correct 6 ms 35748 KB Output is correct
82 Correct 7 ms 35664 KB Output is correct
83 Correct 6 ms 35664 KB Output is correct
84 Correct 7 ms 35664 KB Output is correct
85 Correct 6 ms 35664 KB Output is correct
86 Correct 8 ms 35664 KB Output is correct
87 Correct 9 ms 35664 KB Output is correct
88 Correct 10 ms 35696 KB Output is correct
89 Correct 8 ms 35664 KB Output is correct
90 Correct 7 ms 35664 KB Output is correct
91 Correct 8 ms 35664 KB Output is correct
92 Correct 8 ms 35664 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 33360 KB Output is correct
2 Correct 5 ms 33488 KB Output is correct
3 Correct 5 ms 33360 KB Output is correct
4 Correct 5 ms 33360 KB Output is correct
5 Correct 5 ms 33376 KB Output is correct
6 Correct 5 ms 33360 KB Output is correct
7 Correct 5 ms 35408 KB Output is correct
8 Correct 5 ms 35576 KB Output is correct
9 Correct 5 ms 33360 KB Output is correct
10 Correct 5 ms 33360 KB Output is correct
11 Correct 5 ms 35408 KB Output is correct
12 Correct 7 ms 35408 KB Output is correct
13 Correct 5 ms 35408 KB Output is correct
14 Correct 5 ms 35408 KB Output is correct
15 Correct 5 ms 35408 KB Output is correct
16 Correct 7 ms 35408 KB Output is correct
17 Correct 5 ms 35408 KB Output is correct
18 Correct 6 ms 35408 KB Output is correct
19 Correct 5 ms 35408 KB Output is correct
20 Correct 5 ms 33360 KB Output is correct
21 Correct 5 ms 33360 KB Output is correct
22 Correct 6 ms 35408 KB Output is correct
23 Correct 6 ms 35408 KB Output is correct
24 Correct 5 ms 35408 KB Output is correct
25 Correct 5 ms 35408 KB Output is correct
26 Correct 5 ms 35408 KB Output is correct
27 Correct 5 ms 35576 KB Output is correct
28 Correct 5 ms 35408 KB Output is correct
29 Correct 7 ms 35408 KB Output is correct
30 Correct 7 ms 35408 KB Output is correct
31 Correct 5 ms 35580 KB Output is correct
32 Correct 6 ms 35408 KB Output is correct
33 Correct 6 ms 35420 KB Output is correct
34 Correct 7 ms 33360 KB Output is correct
35 Correct 5 ms 33360 KB Output is correct
36 Correct 5 ms 33360 KB Output is correct
37 Correct 6 ms 35408 KB Output is correct
38 Correct 5 ms 35408 KB Output is correct
39 Correct 6 ms 35408 KB Output is correct
40 Correct 5 ms 35408 KB Output is correct
41 Correct 6 ms 35408 KB Output is correct
42 Correct 6 ms 35408 KB Output is correct
43 Correct 5 ms 35496 KB Output is correct
44 Correct 6 ms 35408 KB Output is correct
45 Correct 6 ms 35408 KB Output is correct
46 Correct 6 ms 35460 KB Output is correct
47 Correct 5 ms 33360 KB Output is correct
48 Correct 5 ms 35408 KB Output is correct
49 Correct 5 ms 33360 KB Output is correct
50 Correct 6 ms 33360 KB Output is correct
51 Correct 5 ms 35408 KB Output is correct
52 Correct 6 ms 35408 KB Output is correct
53 Correct 6 ms 35408 KB Output is correct
54 Correct 6 ms 35540 KB Output is correct
55 Correct 5 ms 35408 KB Output is correct
56 Correct 6 ms 35408 KB Output is correct
57 Correct 6 ms 35576 KB Output is correct
58 Correct 6 ms 35408 KB Output is correct
59 Correct 6 ms 35408 KB Output is correct
60 Correct 6 ms 35408 KB Output is correct
61 Correct 7 ms 35408 KB Output is correct
62 Correct 5 ms 35408 KB Output is correct
63 Correct 6 ms 35520 KB Output is correct
64 Correct 7 ms 35408 KB Output is correct
65 Correct 6 ms 35524 KB Output is correct
66 Correct 196 ms 68004 KB Output is correct
67 Correct 200 ms 68136 KB Output is correct
68 Correct 205 ms 68680 KB Output is correct
69 Correct 238 ms 71660 KB Output is correct
70 Correct 223 ms 66388 KB Output is correct
71 Correct 203 ms 68424 KB Output is correct
72 Correct 201 ms 66556 KB Output is correct
73 Correct 213 ms 67448 KB Output is correct
74 Correct 224 ms 65148 KB Output is correct
75 Correct 195 ms 65476 KB Output is correct
76 Correct 159 ms 59472 KB Output is correct
77 Correct 165 ms 59292 KB Output is correct
78 Correct 166 ms 57664 KB Output is correct
79 Correct 136 ms 57668 KB Output is correct
80 Correct 100 ms 53832 KB Output is correct
81 Correct 98 ms 53696 KB Output is correct
82 Correct 8 ms 38224 KB Output is correct
83 Correct 9 ms 38480 KB Output is correct
84 Correct 9 ms 38224 KB Output is correct
85 Correct 8 ms 38264 KB Output is correct
86 Correct 9 ms 40272 KB Output is correct
87 Correct 9 ms 38224 KB Output is correct
88 Correct 7 ms 35664 KB Output is correct
89 Correct 7 ms 35664 KB Output is correct
90 Correct 6 ms 35664 KB Output is correct
91 Correct 6 ms 35708 KB Output is correct
92 Correct 7 ms 35664 KB Output is correct
93 Correct 7 ms 35664 KB Output is correct
94 Correct 9 ms 35920 KB Output is correct
95 Correct 6 ms 35664 KB Output is correct
96 Correct 6 ms 35676 KB Output is correct
97 Correct 7 ms 35836 KB Output is correct
98 Correct 7 ms 35664 KB Output is correct
99 Correct 7 ms 35836 KB Output is correct
100 Correct 6 ms 35664 KB Output is correct
101 Correct 6 ms 35668 KB Output is correct
102 Correct 6 ms 35832 KB Output is correct
103 Correct 6 ms 35664 KB Output is correct
104 Correct 6 ms 35664 KB Output is correct
105 Correct 6 ms 35664 KB Output is correct
106 Correct 6 ms 35664 KB Output is correct
107 Correct 6 ms 35664 KB Output is correct
108 Correct 228 ms 66640 KB Output is correct
109 Correct 216 ms 66804 KB Output is correct
110 Correct 229 ms 66728 KB Output is correct
111 Correct 206 ms 66720 KB Output is correct
112 Correct 206 ms 66632 KB Output is correct
113 Correct 244 ms 75668 KB Output is correct
114 Correct 230 ms 72776 KB Output is correct
115 Correct 259 ms 71244 KB Output is correct
116 Correct 249 ms 69704 KB Output is correct
117 Correct 220 ms 66788 KB Output is correct
118 Correct 229 ms 67928 KB Output is correct
119 Correct 233 ms 67932 KB Output is correct
120 Correct 231 ms 67940 KB Output is correct
121 Correct 197 ms 63652 KB Output is correct
122 Correct 161 ms 61256 KB Output is correct
123 Correct 101 ms 53832 KB Output is correct
124 Correct 174 ms 66748 KB Output is correct
125 Correct 186 ms 66716 KB Output is correct
126 Correct 174 ms 66992 KB Output is correct
127 Correct 185 ms 66920 KB Output is correct
128 Correct 7 ms 35664 KB Output is correct
129 Correct 7 ms 35664 KB Output is correct
130 Correct 8 ms 35664 KB Output is correct
131 Correct 7 ms 35676 KB Output is correct
132 Correct 7 ms 35664 KB Output is correct
133 Correct 7 ms 35664 KB Output is correct
134 Correct 8 ms 35836 KB Output is correct
135 Correct 8 ms 35664 KB Output is correct
136 Correct 6 ms 35664 KB Output is correct
137 Correct 6 ms 35664 KB Output is correct
138 Correct 6 ms 35664 KB Output is correct
139 Correct 7 ms 35748 KB Output is correct
140 Correct 8 ms 35716 KB Output is correct
141 Correct 8 ms 35664 KB Output is correct
142 Correct 7 ms 35664 KB Output is correct
143 Correct 7 ms 35832 KB Output is correct
144 Correct 8 ms 35664 KB Output is correct
145 Correct 7 ms 35664 KB Output is correct
146 Correct 8 ms 35664 KB Output is correct
147 Correct 7 ms 35664 KB Output is correct
148 Correct 7 ms 35664 KB Output is correct
149 Correct 7 ms 35664 KB Output is correct
150 Correct 8 ms 35664 KB Output is correct
151 Correct 7 ms 35664 KB Output is correct
152 Correct 6 ms 35464 KB Output is correct
153 Correct 6 ms 35408 KB Output is correct
154 Correct 5 ms 35408 KB Output is correct
155 Correct 260 ms 66888 KB Output is correct
156 Correct 229 ms 66744 KB Output is correct
157 Correct 277 ms 66632 KB Output is correct
158 Correct 245 ms 65880 KB Output is correct
159 Correct 236 ms 63148 KB Output is correct
160 Correct 210 ms 61784 KB Output is correct
161 Correct 181 ms 61004 KB Output is correct
162 Correct 177 ms 59976 KB Output is correct
163 Correct 193 ms 59720 KB Output is correct
164 Correct 160 ms 59276 KB Output is correct
165 Correct 167 ms 58696 KB Output is correct
166 Correct 154 ms 56648 KB Output is correct
167 Correct 163 ms 56580 KB Output is correct
168 Correct 158 ms 59728 KB Output is correct
169 Correct 279 ms 72800 KB Output is correct
170 Correct 264 ms 70756 KB Output is correct
171 Correct 267 ms 72016 KB Output is correct
172 Correct 287 ms 70236 KB Output is correct
173 Correct 250 ms 65864 KB Output is correct
174 Correct 245 ms 67408 KB Output is correct
175 Correct 225 ms 67196 KB Output is correct
176 Correct 212 ms 64496 KB Output is correct
177 Correct 165 ms 61736 KB Output is correct
178 Correct 242 ms 67036 KB Output is correct
179 Correct 267 ms 67292 KB Output is correct
180 Correct 297 ms 67008 KB Output is correct
181 Correct 322 ms 67100 KB Output is correct
182 Correct 6 ms 33360 KB Output is correct
183 Correct 6 ms 35664 KB Output is correct
184 Correct 7 ms 35664 KB Output is correct
185 Correct 9 ms 35664 KB Output is correct
186 Correct 7 ms 35764 KB Output is correct
187 Correct 7 ms 35452 KB Output is correct
188 Correct 7 ms 35664 KB Output is correct
189 Correct 6 ms 35736 KB Output is correct
190 Correct 6 ms 35892 KB Output is correct
191 Correct 6 ms 35664 KB Output is correct
192 Correct 7 ms 35568 KB Output is correct
193 Correct 8 ms 35664 KB Output is correct
194 Correct 7 ms 35664 KB Output is correct
195 Correct 6 ms 35664 KB Output is correct
196 Correct 7 ms 35664 KB Output is correct
197 Correct 6 ms 35748 KB Output is correct
198 Correct 7 ms 35664 KB Output is correct
199 Correct 6 ms 35664 KB Output is correct
200 Correct 7 ms 35664 KB Output is correct
201 Correct 6 ms 35664 KB Output is correct
202 Correct 8 ms 35664 KB Output is correct
203 Correct 9 ms 35664 KB Output is correct
204 Correct 10 ms 35696 KB Output is correct
205 Correct 8 ms 35664 KB Output is correct
206 Correct 7 ms 35664 KB Output is correct
207 Correct 8 ms 35664 KB Output is correct
208 Correct 8 ms 35664 KB Output is correct
209 Correct 8 ms 38224 KB Output is correct
210 Correct 124 ms 54064 KB Output is correct
211 Correct 227 ms 66240 KB Output is correct
212 Correct 303 ms 75968 KB Output is correct
213 Correct 384 ms 85228 KB Output is correct
214 Correct 109 ms 64400 KB Output is correct
215 Correct 99 ms 65608 KB Output is correct
216 Correct 261 ms 69704 KB Output is correct
217 Correct 227 ms 67400 KB Output is correct
218 Correct 195 ms 62536 KB Output is correct
219 Correct 168 ms 61000 KB Output is correct
220 Correct 167 ms 60232 KB Output is correct
221 Correct 161 ms 57672 KB Output is correct
222 Correct 172 ms 59464 KB Output is correct
223 Correct 251 ms 73228 KB Output is correct
224 Correct 243 ms 71752 KB Output is correct
225 Correct 232 ms 67400 KB Output is correct
226 Correct 244 ms 67400 KB Output is correct
227 Correct 265 ms 67400 KB Output is correct
228 Correct 225 ms 64584 KB Output is correct
229 Correct 178 ms 61256 KB Output is correct
230 Correct 252 ms 67772 KB Output is correct
231 Correct 264 ms 67668 KB Output is correct