답안 #721374

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
721374 2023-04-10T18:59:56 Z NothingXD 철인 이종 경기 (APIO18_duathlon) C++17
100 / 100
118 ms 50172 KB
/*

   Wei Wai Wei Wai
   Zumigat nan damu dimi kwayt rayt

*/

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

typedef long long ll;
typedef double ld;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef complex<ld> point;
/*typedef __uint128_t L;
  struct FastMod {
  ull b, m;
  FastMod(ull b) : b(b), m(ull((L(1) << 64) / b)) {}
  ull reduce(ull a) {
  ull q = (ull)((L(m) * a) >> 64);
  ull r = a - q * b; // can be proven that 0 <= r < 2*b
  return r >= b ? r - b : r;
  }
  };
  FastMod FM(2);
  */
void debug_out() { cerr << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
	cerr << " " << H;
	debug_out(T...);
}

#define debug(...) cerr << "(" << #__VA_ARGS__ << "):", debug_out(__VA_ARGS__)
#define all(x) x.begin(), x.end()
#define MP(x, y) make_pair(x, y)
#define F first
#define S second

//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const int maxn = 2e5 + 10;
const int inf = 1e9;

int n, m, a[maxn], cnt[maxn], sz[maxn], st[maxn], lw[maxn], tme, cmcnt, vercnt;
vector<int> g[maxn], t[maxn], comp[maxn], stk, going;
bool vis[maxn], mark[maxn];
ll ans = 0;

void dfs(int v){
	lw[v] = st[v] = ++tme;
	vis[v] = true;
	going.push_back(v);
	stk.push_back(v);
	for (auto u: g[v]){
		if (!vis[u]){
			dfs(u);
			lw[v] = min(lw[v], lw[u]);
			if (lw[u] >= st[v]){
				if (st[v] > 1 || st[u] > 2) mark[v] = true;
				cmcnt++;
				comp[cmcnt].push_back(v);
				while(comp[cmcnt].back() != u){
					comp[cmcnt].push_back(stk.back());
					stk.pop_back();
				}
			}
		}
		else lw[v] = min(lw[v], st[u]);
	}
}

void solve(int v, int p = -1){
	vis[v] = true;
	sz[v] = cnt[v];
	for (auto u: t[v]){
		if (u != p){
			solve(u, v);
			sz[v] += sz[u];
		}
	}
}

void Calc(int v, int r, int p = -1){
	if (mark[v]){
		ans += 1ll * (sz[r] - 1) * (sz[r] - 2);
		for (auto u: t[v]){
			if (u != p){
				ans -= 1ll * sz[u] * (sz[u] - 1);
			}
			else{
				ans -= 1ll * (sz[r] - sz[v]) * (sz[r] - sz[v] - 1);
			}
		}

	}
	else{
		ans += 1ll * cnt[v] * (cnt[v]-1) * (cnt[v]-2);
		ans += 1ll * (sz[r] - cnt[v]) * (sz[r] - cnt[v] - 1) * (cnt[v] - 2 + (int)t[v].size());
		ans += 1ll * cnt[v] * (cnt[v] - 1) * ((int)t[v].size());
		for (auto u: t[v]){
			if (u != p){
				ans += 2ll * sz[u] * cnt[v] * ((int)t[v].size() - 1);
				ans += 2ll * sz[u] * cnt[v] * (cnt[v] - 1);
				ans -= 1ll * sz[u] * (sz[u] - 1) * (cnt[v] - 2 + (int)t[v].size());
			}
			else{
				ans += 2ll * (sz[r] - sz[v]) * cnt[v] * ((int)t[v].size() - 1);
				ans += 2ll * (sz[r] - sz[v]) * cnt[v] * (cnt[v] - 1);
				ans -= 1ll * (sz[r] - sz[v]) * (sz[r] - sz[v] - 1) * (cnt[v] - 2 + (int)t[v].size());
			}
		}
	}
	for (auto u: t[v]) if (u != p) Calc(u, r, v);
}


int main(){
	ios_base::sync_with_stdio(false); cin.tie(0);

	cin >> n >> m;
	for (int i = 1; i <= m; i++){
		int u, v; cin >> u >> v;
		g[u].push_back(v);
		g[v].push_back(u);
	}

	for (int i = 1; i <= n; i++){
		if (!vis[i]){
			stk.clear();
			going.clear();
			tme = 0;
			dfs(i);
			if (going.size() == 1){
				cmcnt++;
				comp[cmcnt].push_back(i);
			}
		}
	}


	for (int i = 1; i <= cmcnt; i++){
		cnt[n+i] = comp[i].size();
		for (auto x: comp[i]){
			if (mark[x]){
				cnt[n+i]--;
				t[x].push_back(n+i);
				t[n+i].push_back(x);
			}
		}
	}


	memset(vis, false, sizeof vis);

	for (int i = 1; i <= n; i++) cnt[i] = 1;

	for (int i = 1; i <= cmcnt; i++){
		if (!vis[n+i]){
			solve(n+i);
			Calc(n+i, n+i);
		}
	}

	cout << ans << '\n';

	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 14548 KB Output is correct
2 Correct 7 ms 14548 KB Output is correct
3 Correct 8 ms 14548 KB Output is correct
4 Correct 8 ms 14548 KB Output is correct
5 Correct 9 ms 14608 KB Output is correct
6 Correct 8 ms 14548 KB Output is correct
7 Correct 8 ms 14548 KB Output is correct
8 Correct 8 ms 14548 KB Output is correct
9 Correct 9 ms 14552 KB Output is correct
10 Correct 8 ms 14548 KB Output is correct
11 Correct 8 ms 14548 KB Output is correct
12 Correct 8 ms 14544 KB Output is correct
13 Correct 8 ms 14544 KB Output is correct
14 Correct 8 ms 14548 KB Output is correct
15 Correct 7 ms 14544 KB Output is correct
16 Correct 8 ms 14548 KB Output is correct
17 Correct 8 ms 14544 KB Output is correct
18 Correct 8 ms 14548 KB Output is correct
19 Correct 8 ms 14516 KB Output is correct
20 Correct 7 ms 14548 KB Output is correct
21 Correct 8 ms 14548 KB Output is correct
22 Correct 8 ms 14548 KB Output is correct
23 Correct 8 ms 14548 KB Output is correct
24 Correct 8 ms 14548 KB Output is correct
25 Correct 8 ms 14552 KB Output is correct
26 Correct 9 ms 14548 KB Output is correct
27 Correct 9 ms 14552 KB Output is correct
28 Correct 8 ms 14548 KB Output is correct
29 Correct 8 ms 14552 KB Output is correct
30 Correct 9 ms 14552 KB Output is correct
31 Correct 8 ms 14548 KB Output is correct
32 Correct 8 ms 14548 KB Output is correct
33 Correct 8 ms 14548 KB Output is correct
34 Correct 8 ms 14548 KB Output is correct
35 Correct 8 ms 14548 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 14548 KB Output is correct
2 Correct 7 ms 14548 KB Output is correct
3 Correct 8 ms 14548 KB Output is correct
4 Correct 8 ms 14548 KB Output is correct
5 Correct 9 ms 14608 KB Output is correct
6 Correct 8 ms 14548 KB Output is correct
7 Correct 8 ms 14548 KB Output is correct
8 Correct 8 ms 14548 KB Output is correct
9 Correct 9 ms 14552 KB Output is correct
10 Correct 8 ms 14548 KB Output is correct
11 Correct 8 ms 14548 KB Output is correct
12 Correct 8 ms 14544 KB Output is correct
13 Correct 8 ms 14544 KB Output is correct
14 Correct 8 ms 14548 KB Output is correct
15 Correct 7 ms 14544 KB Output is correct
16 Correct 8 ms 14548 KB Output is correct
17 Correct 8 ms 14544 KB Output is correct
18 Correct 8 ms 14548 KB Output is correct
19 Correct 8 ms 14516 KB Output is correct
20 Correct 7 ms 14548 KB Output is correct
21 Correct 8 ms 14548 KB Output is correct
22 Correct 8 ms 14548 KB Output is correct
23 Correct 8 ms 14548 KB Output is correct
24 Correct 8 ms 14548 KB Output is correct
25 Correct 8 ms 14552 KB Output is correct
26 Correct 9 ms 14548 KB Output is correct
27 Correct 9 ms 14552 KB Output is correct
28 Correct 8 ms 14548 KB Output is correct
29 Correct 8 ms 14552 KB Output is correct
30 Correct 9 ms 14552 KB Output is correct
31 Correct 8 ms 14548 KB Output is correct
32 Correct 8 ms 14548 KB Output is correct
33 Correct 8 ms 14548 KB Output is correct
34 Correct 8 ms 14548 KB Output is correct
35 Correct 8 ms 14548 KB Output is correct
36 Correct 7 ms 14548 KB Output is correct
37 Correct 7 ms 14624 KB Output is correct
38 Correct 9 ms 14576 KB Output is correct
39 Correct 9 ms 14548 KB Output is correct
40 Correct 8 ms 14548 KB Output is correct
41 Correct 8 ms 14628 KB Output is correct
42 Correct 8 ms 14572 KB Output is correct
43 Correct 9 ms 14560 KB Output is correct
44 Correct 9 ms 14548 KB Output is correct
45 Correct 8 ms 14548 KB Output is correct
46 Correct 8 ms 14544 KB Output is correct
47 Correct 9 ms 14548 KB Output is correct
48 Correct 8 ms 14576 KB Output is correct
49 Correct 8 ms 14548 KB Output is correct
50 Correct 9 ms 14548 KB Output is correct
51 Correct 8 ms 14548 KB Output is correct
52 Correct 8 ms 14548 KB Output is correct
53 Correct 7 ms 14548 KB Output is correct
54 Correct 8 ms 14548 KB Output is correct
55 Correct 8 ms 14548 KB Output is correct
56 Correct 9 ms 14556 KB Output is correct
57 Correct 8 ms 14548 KB Output is correct
58 Correct 8 ms 14548 KB Output is correct
59 Correct 8 ms 14548 KB Output is correct
60 Correct 8 ms 14676 KB Output is correct
61 Correct 8 ms 14548 KB Output is correct
62 Correct 8 ms 14588 KB Output is correct
63 Correct 8 ms 14548 KB Output is correct
64 Correct 8 ms 14560 KB Output is correct
65 Correct 8 ms 14548 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 57 ms 29248 KB Output is correct
2 Correct 65 ms 29252 KB Output is correct
3 Correct 83 ms 35656 KB Output is correct
4 Correct 69 ms 29960 KB Output is correct
5 Correct 78 ms 30756 KB Output is correct
6 Correct 85 ms 37216 KB Output is correct
7 Correct 84 ms 30808 KB Output is correct
8 Correct 87 ms 33864 KB Output is correct
9 Correct 82 ms 28876 KB Output is correct
10 Correct 81 ms 29240 KB Output is correct
11 Correct 66 ms 24260 KB Output is correct
12 Correct 63 ms 24392 KB Output is correct
13 Correct 57 ms 23756 KB Output is correct
14 Correct 59 ms 23784 KB Output is correct
15 Correct 41 ms 22580 KB Output is correct
16 Correct 43 ms 22604 KB Output is correct
17 Correct 16 ms 19572 KB Output is correct
18 Correct 15 ms 19668 KB Output is correct
19 Correct 16 ms 19668 KB Output is correct
20 Correct 17 ms 19680 KB Output is correct
21 Correct 16 ms 19668 KB Output is correct
22 Correct 16 ms 19668 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 14684 KB Output is correct
2 Correct 9 ms 14684 KB Output is correct
3 Correct 8 ms 14676 KB Output is correct
4 Correct 8 ms 14932 KB Output is correct
5 Correct 8 ms 14804 KB Output is correct
6 Correct 8 ms 14804 KB Output is correct
7 Correct 8 ms 14932 KB Output is correct
8 Correct 8 ms 14804 KB Output is correct
9 Correct 8 ms 14804 KB Output is correct
10 Correct 9 ms 14732 KB Output is correct
11 Correct 9 ms 14724 KB Output is correct
12 Correct 8 ms 14676 KB Output is correct
13 Correct 8 ms 14676 KB Output is correct
14 Correct 8 ms 14680 KB Output is correct
15 Correct 8 ms 14680 KB Output is correct
16 Correct 8 ms 14676 KB Output is correct
17 Correct 8 ms 14676 KB Output is correct
18 Correct 8 ms 14720 KB Output is correct
19 Correct 8 ms 14680 KB Output is correct
20 Correct 8 ms 14676 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 100 ms 29764 KB Output is correct
2 Correct 97 ms 29940 KB Output is correct
3 Correct 95 ms 29876 KB Output is correct
4 Correct 94 ms 29836 KB Output is correct
5 Correct 98 ms 29964 KB Output is correct
6 Correct 118 ms 50172 KB Output is correct
7 Correct 110 ms 37396 KB Output is correct
8 Correct 102 ms 35452 KB Output is correct
9 Correct 100 ms 33668 KB Output is correct
10 Correct 98 ms 29820 KB Output is correct
11 Correct 88 ms 29784 KB Output is correct
12 Correct 88 ms 29516 KB Output is correct
13 Correct 93 ms 29576 KB Output is correct
14 Correct 85 ms 28312 KB Output is correct
15 Correct 80 ms 27240 KB Output is correct
16 Correct 53 ms 23884 KB Output is correct
17 Correct 62 ms 28344 KB Output is correct
18 Correct 61 ms 28352 KB Output is correct
19 Correct 57 ms 28496 KB Output is correct
20 Correct 66 ms 28368 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 9 ms 14684 KB Output is correct
2 Correct 9 ms 14676 KB Output is correct
3 Correct 8 ms 14752 KB Output is correct
4 Correct 8 ms 14668 KB Output is correct
5 Correct 8 ms 14676 KB Output is correct
6 Correct 8 ms 14728 KB Output is correct
7 Correct 8 ms 14676 KB Output is correct
8 Correct 8 ms 14676 KB Output is correct
9 Correct 8 ms 14676 KB Output is correct
10 Correct 8 ms 14616 KB Output is correct
11 Correct 8 ms 14616 KB Output is correct
12 Correct 9 ms 14816 KB Output is correct
13 Correct 9 ms 14804 KB Output is correct
14 Correct 8 ms 14812 KB Output is correct
15 Correct 8 ms 14700 KB Output is correct
16 Correct 9 ms 14696 KB Output is correct
17 Correct 9 ms 14676 KB Output is correct
18 Correct 8 ms 14684 KB Output is correct
19 Correct 8 ms 14676 KB Output is correct
20 Correct 8 ms 14676 KB Output is correct
21 Correct 8 ms 14700 KB Output is correct
22 Correct 8 ms 14676 KB Output is correct
23 Correct 8 ms 14764 KB Output is correct
24 Correct 8 ms 14684 KB Output is correct
25 Correct 8 ms 14676 KB Output is correct
26 Correct 8 ms 14672 KB Output is correct
27 Correct 7 ms 14676 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 94 ms 29808 KB Output is correct
2 Correct 88 ms 30104 KB Output is correct
3 Correct 88 ms 28892 KB Output is correct
4 Correct 83 ms 27084 KB Output is correct
5 Correct 84 ms 24820 KB Output is correct
6 Correct 79 ms 23840 KB Output is correct
7 Correct 75 ms 23400 KB Output is correct
8 Correct 65 ms 22724 KB Output is correct
9 Correct 63 ms 22608 KB Output is correct
10 Correct 55 ms 22340 KB Output is correct
11 Correct 57 ms 21980 KB Output is correct
12 Correct 52 ms 21816 KB Output is correct
13 Correct 58 ms 21880 KB Output is correct
14 Correct 52 ms 23532 KB Output is correct
15 Correct 105 ms 36548 KB Output is correct
16 Correct 110 ms 33960 KB Output is correct
17 Correct 97 ms 34280 KB Output is correct
18 Correct 101 ms 32068 KB Output is correct
19 Correct 82 ms 27036 KB Output is correct
20 Correct 104 ms 26848 KB Output is correct
21 Correct 99 ms 26708 KB Output is correct
22 Correct 82 ms 25340 KB Output is correct
23 Correct 73 ms 23844 KB Output is correct
24 Correct 92 ms 28528 KB Output is correct
25 Correct 92 ms 28624 KB Output is correct
26 Correct 90 ms 27504 KB Output is correct
27 Correct 78 ms 27396 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 14548 KB Output is correct
2 Correct 7 ms 14548 KB Output is correct
3 Correct 8 ms 14548 KB Output is correct
4 Correct 8 ms 14548 KB Output is correct
5 Correct 9 ms 14608 KB Output is correct
6 Correct 8 ms 14548 KB Output is correct
7 Correct 8 ms 14548 KB Output is correct
8 Correct 8 ms 14548 KB Output is correct
9 Correct 9 ms 14552 KB Output is correct
10 Correct 8 ms 14548 KB Output is correct
11 Correct 8 ms 14548 KB Output is correct
12 Correct 8 ms 14544 KB Output is correct
13 Correct 8 ms 14544 KB Output is correct
14 Correct 8 ms 14548 KB Output is correct
15 Correct 7 ms 14544 KB Output is correct
16 Correct 8 ms 14548 KB Output is correct
17 Correct 8 ms 14544 KB Output is correct
18 Correct 8 ms 14548 KB Output is correct
19 Correct 8 ms 14516 KB Output is correct
20 Correct 7 ms 14548 KB Output is correct
21 Correct 8 ms 14548 KB Output is correct
22 Correct 8 ms 14548 KB Output is correct
23 Correct 8 ms 14548 KB Output is correct
24 Correct 8 ms 14548 KB Output is correct
25 Correct 8 ms 14552 KB Output is correct
26 Correct 9 ms 14548 KB Output is correct
27 Correct 9 ms 14552 KB Output is correct
28 Correct 8 ms 14548 KB Output is correct
29 Correct 8 ms 14552 KB Output is correct
30 Correct 9 ms 14552 KB Output is correct
31 Correct 8 ms 14548 KB Output is correct
32 Correct 8 ms 14548 KB Output is correct
33 Correct 8 ms 14548 KB Output is correct
34 Correct 8 ms 14548 KB Output is correct
35 Correct 8 ms 14548 KB Output is correct
36 Correct 7 ms 14548 KB Output is correct
37 Correct 7 ms 14624 KB Output is correct
38 Correct 9 ms 14576 KB Output is correct
39 Correct 9 ms 14548 KB Output is correct
40 Correct 8 ms 14548 KB Output is correct
41 Correct 8 ms 14628 KB Output is correct
42 Correct 8 ms 14572 KB Output is correct
43 Correct 9 ms 14560 KB Output is correct
44 Correct 9 ms 14548 KB Output is correct
45 Correct 8 ms 14548 KB Output is correct
46 Correct 8 ms 14544 KB Output is correct
47 Correct 9 ms 14548 KB Output is correct
48 Correct 8 ms 14576 KB Output is correct
49 Correct 8 ms 14548 KB Output is correct
50 Correct 9 ms 14548 KB Output is correct
51 Correct 8 ms 14548 KB Output is correct
52 Correct 8 ms 14548 KB Output is correct
53 Correct 7 ms 14548 KB Output is correct
54 Correct 8 ms 14548 KB Output is correct
55 Correct 8 ms 14548 KB Output is correct
56 Correct 9 ms 14556 KB Output is correct
57 Correct 8 ms 14548 KB Output is correct
58 Correct 8 ms 14548 KB Output is correct
59 Correct 8 ms 14548 KB Output is correct
60 Correct 8 ms 14676 KB Output is correct
61 Correct 8 ms 14548 KB Output is correct
62 Correct 8 ms 14588 KB Output is correct
63 Correct 8 ms 14548 KB Output is correct
64 Correct 8 ms 14560 KB Output is correct
65 Correct 8 ms 14548 KB Output is correct
66 Correct 7 ms 14676 KB Output is correct
67 Correct 9 ms 14668 KB Output is correct
68 Correct 9 ms 14760 KB Output is correct
69 Correct 8 ms 14676 KB Output is correct
70 Correct 8 ms 14772 KB Output is correct
71 Correct 8 ms 14676 KB Output is correct
72 Correct 8 ms 14676 KB Output is correct
73 Correct 8 ms 14644 KB Output is correct
74 Correct 7 ms 14676 KB Output is correct
75 Correct 7 ms 14676 KB Output is correct
76 Correct 8 ms 14548 KB Output is correct
77 Correct 8 ms 14684 KB Output is correct
78 Correct 9 ms 14660 KB Output is correct
79 Correct 8 ms 14676 KB Output is correct
80 Correct 9 ms 14676 KB Output is correct
81 Correct 8 ms 14676 KB Output is correct
82 Correct 8 ms 14760 KB Output is correct
83 Correct 8 ms 14680 KB Output is correct
84 Correct 9 ms 14688 KB Output is correct
85 Correct 8 ms 14688 KB Output is correct
86 Correct 8 ms 14676 KB Output is correct
87 Correct 8 ms 14684 KB Output is correct
88 Correct 8 ms 14676 KB Output is correct
89 Correct 8 ms 14676 KB Output is correct
90 Correct 7 ms 14612 KB Output is correct
91 Correct 7 ms 14688 KB Output is correct
92 Correct 8 ms 14676 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 14548 KB Output is correct
2 Correct 7 ms 14548 KB Output is correct
3 Correct 8 ms 14548 KB Output is correct
4 Correct 8 ms 14548 KB Output is correct
5 Correct 9 ms 14608 KB Output is correct
6 Correct 8 ms 14548 KB Output is correct
7 Correct 8 ms 14548 KB Output is correct
8 Correct 8 ms 14548 KB Output is correct
9 Correct 9 ms 14552 KB Output is correct
10 Correct 8 ms 14548 KB Output is correct
11 Correct 8 ms 14548 KB Output is correct
12 Correct 8 ms 14544 KB Output is correct
13 Correct 8 ms 14544 KB Output is correct
14 Correct 8 ms 14548 KB Output is correct
15 Correct 7 ms 14544 KB Output is correct
16 Correct 8 ms 14548 KB Output is correct
17 Correct 8 ms 14544 KB Output is correct
18 Correct 8 ms 14548 KB Output is correct
19 Correct 8 ms 14516 KB Output is correct
20 Correct 7 ms 14548 KB Output is correct
21 Correct 8 ms 14548 KB Output is correct
22 Correct 8 ms 14548 KB Output is correct
23 Correct 8 ms 14548 KB Output is correct
24 Correct 8 ms 14548 KB Output is correct
25 Correct 8 ms 14552 KB Output is correct
26 Correct 9 ms 14548 KB Output is correct
27 Correct 9 ms 14552 KB Output is correct
28 Correct 8 ms 14548 KB Output is correct
29 Correct 8 ms 14552 KB Output is correct
30 Correct 9 ms 14552 KB Output is correct
31 Correct 8 ms 14548 KB Output is correct
32 Correct 8 ms 14548 KB Output is correct
33 Correct 8 ms 14548 KB Output is correct
34 Correct 8 ms 14548 KB Output is correct
35 Correct 8 ms 14548 KB Output is correct
36 Correct 7 ms 14548 KB Output is correct
37 Correct 7 ms 14624 KB Output is correct
38 Correct 9 ms 14576 KB Output is correct
39 Correct 9 ms 14548 KB Output is correct
40 Correct 8 ms 14548 KB Output is correct
41 Correct 8 ms 14628 KB Output is correct
42 Correct 8 ms 14572 KB Output is correct
43 Correct 9 ms 14560 KB Output is correct
44 Correct 9 ms 14548 KB Output is correct
45 Correct 8 ms 14548 KB Output is correct
46 Correct 8 ms 14544 KB Output is correct
47 Correct 9 ms 14548 KB Output is correct
48 Correct 8 ms 14576 KB Output is correct
49 Correct 8 ms 14548 KB Output is correct
50 Correct 9 ms 14548 KB Output is correct
51 Correct 8 ms 14548 KB Output is correct
52 Correct 8 ms 14548 KB Output is correct
53 Correct 7 ms 14548 KB Output is correct
54 Correct 8 ms 14548 KB Output is correct
55 Correct 8 ms 14548 KB Output is correct
56 Correct 9 ms 14556 KB Output is correct
57 Correct 8 ms 14548 KB Output is correct
58 Correct 8 ms 14548 KB Output is correct
59 Correct 8 ms 14548 KB Output is correct
60 Correct 8 ms 14676 KB Output is correct
61 Correct 8 ms 14548 KB Output is correct
62 Correct 8 ms 14588 KB Output is correct
63 Correct 8 ms 14548 KB Output is correct
64 Correct 8 ms 14560 KB Output is correct
65 Correct 8 ms 14548 KB Output is correct
66 Correct 57 ms 29248 KB Output is correct
67 Correct 65 ms 29252 KB Output is correct
68 Correct 83 ms 35656 KB Output is correct
69 Correct 69 ms 29960 KB Output is correct
70 Correct 78 ms 30756 KB Output is correct
71 Correct 85 ms 37216 KB Output is correct
72 Correct 84 ms 30808 KB Output is correct
73 Correct 87 ms 33864 KB Output is correct
74 Correct 82 ms 28876 KB Output is correct
75 Correct 81 ms 29240 KB Output is correct
76 Correct 66 ms 24260 KB Output is correct
77 Correct 63 ms 24392 KB Output is correct
78 Correct 57 ms 23756 KB Output is correct
79 Correct 59 ms 23784 KB Output is correct
80 Correct 41 ms 22580 KB Output is correct
81 Correct 43 ms 22604 KB Output is correct
82 Correct 16 ms 19572 KB Output is correct
83 Correct 15 ms 19668 KB Output is correct
84 Correct 16 ms 19668 KB Output is correct
85 Correct 17 ms 19680 KB Output is correct
86 Correct 16 ms 19668 KB Output is correct
87 Correct 16 ms 19668 KB Output is correct
88 Correct 8 ms 14684 KB Output is correct
89 Correct 9 ms 14684 KB Output is correct
90 Correct 8 ms 14676 KB Output is correct
91 Correct 8 ms 14932 KB Output is correct
92 Correct 8 ms 14804 KB Output is correct
93 Correct 8 ms 14804 KB Output is correct
94 Correct 8 ms 14932 KB Output is correct
95 Correct 8 ms 14804 KB Output is correct
96 Correct 8 ms 14804 KB Output is correct
97 Correct 9 ms 14732 KB Output is correct
98 Correct 9 ms 14724 KB Output is correct
99 Correct 8 ms 14676 KB Output is correct
100 Correct 8 ms 14676 KB Output is correct
101 Correct 8 ms 14680 KB Output is correct
102 Correct 8 ms 14680 KB Output is correct
103 Correct 8 ms 14676 KB Output is correct
104 Correct 8 ms 14676 KB Output is correct
105 Correct 8 ms 14720 KB Output is correct
106 Correct 8 ms 14680 KB Output is correct
107 Correct 8 ms 14676 KB Output is correct
108 Correct 100 ms 29764 KB Output is correct
109 Correct 97 ms 29940 KB Output is correct
110 Correct 95 ms 29876 KB Output is correct
111 Correct 94 ms 29836 KB Output is correct
112 Correct 98 ms 29964 KB Output is correct
113 Correct 118 ms 50172 KB Output is correct
114 Correct 110 ms 37396 KB Output is correct
115 Correct 102 ms 35452 KB Output is correct
116 Correct 100 ms 33668 KB Output is correct
117 Correct 98 ms 29820 KB Output is correct
118 Correct 88 ms 29784 KB Output is correct
119 Correct 88 ms 29516 KB Output is correct
120 Correct 93 ms 29576 KB Output is correct
121 Correct 85 ms 28312 KB Output is correct
122 Correct 80 ms 27240 KB Output is correct
123 Correct 53 ms 23884 KB Output is correct
124 Correct 62 ms 28344 KB Output is correct
125 Correct 61 ms 28352 KB Output is correct
126 Correct 57 ms 28496 KB Output is correct
127 Correct 66 ms 28368 KB Output is correct
128 Correct 9 ms 14684 KB Output is correct
129 Correct 9 ms 14676 KB Output is correct
130 Correct 8 ms 14752 KB Output is correct
131 Correct 8 ms 14668 KB Output is correct
132 Correct 8 ms 14676 KB Output is correct
133 Correct 8 ms 14728 KB Output is correct
134 Correct 8 ms 14676 KB Output is correct
135 Correct 8 ms 14676 KB Output is correct
136 Correct 8 ms 14676 KB Output is correct
137 Correct 8 ms 14616 KB Output is correct
138 Correct 8 ms 14616 KB Output is correct
139 Correct 9 ms 14816 KB Output is correct
140 Correct 9 ms 14804 KB Output is correct
141 Correct 8 ms 14812 KB Output is correct
142 Correct 8 ms 14700 KB Output is correct
143 Correct 9 ms 14696 KB Output is correct
144 Correct 9 ms 14676 KB Output is correct
145 Correct 8 ms 14684 KB Output is correct
146 Correct 8 ms 14676 KB Output is correct
147 Correct 8 ms 14676 KB Output is correct
148 Correct 8 ms 14700 KB Output is correct
149 Correct 8 ms 14676 KB Output is correct
150 Correct 8 ms 14764 KB Output is correct
151 Correct 8 ms 14684 KB Output is correct
152 Correct 8 ms 14676 KB Output is correct
153 Correct 8 ms 14672 KB Output is correct
154 Correct 7 ms 14676 KB Output is correct
155 Correct 94 ms 29808 KB Output is correct
156 Correct 88 ms 30104 KB Output is correct
157 Correct 88 ms 28892 KB Output is correct
158 Correct 83 ms 27084 KB Output is correct
159 Correct 84 ms 24820 KB Output is correct
160 Correct 79 ms 23840 KB Output is correct
161 Correct 75 ms 23400 KB Output is correct
162 Correct 65 ms 22724 KB Output is correct
163 Correct 63 ms 22608 KB Output is correct
164 Correct 55 ms 22340 KB Output is correct
165 Correct 57 ms 21980 KB Output is correct
166 Correct 52 ms 21816 KB Output is correct
167 Correct 58 ms 21880 KB Output is correct
168 Correct 52 ms 23532 KB Output is correct
169 Correct 105 ms 36548 KB Output is correct
170 Correct 110 ms 33960 KB Output is correct
171 Correct 97 ms 34280 KB Output is correct
172 Correct 101 ms 32068 KB Output is correct
173 Correct 82 ms 27036 KB Output is correct
174 Correct 104 ms 26848 KB Output is correct
175 Correct 99 ms 26708 KB Output is correct
176 Correct 82 ms 25340 KB Output is correct
177 Correct 73 ms 23844 KB Output is correct
178 Correct 92 ms 28528 KB Output is correct
179 Correct 92 ms 28624 KB Output is correct
180 Correct 90 ms 27504 KB Output is correct
181 Correct 78 ms 27396 KB Output is correct
182 Correct 7 ms 14676 KB Output is correct
183 Correct 9 ms 14668 KB Output is correct
184 Correct 9 ms 14760 KB Output is correct
185 Correct 8 ms 14676 KB Output is correct
186 Correct 8 ms 14772 KB Output is correct
187 Correct 8 ms 14676 KB Output is correct
188 Correct 8 ms 14676 KB Output is correct
189 Correct 8 ms 14644 KB Output is correct
190 Correct 7 ms 14676 KB Output is correct
191 Correct 7 ms 14676 KB Output is correct
192 Correct 8 ms 14548 KB Output is correct
193 Correct 8 ms 14684 KB Output is correct
194 Correct 9 ms 14660 KB Output is correct
195 Correct 8 ms 14676 KB Output is correct
196 Correct 9 ms 14676 KB Output is correct
197 Correct 8 ms 14676 KB Output is correct
198 Correct 8 ms 14760 KB Output is correct
199 Correct 8 ms 14680 KB Output is correct
200 Correct 9 ms 14688 KB Output is correct
201 Correct 8 ms 14688 KB Output is correct
202 Correct 8 ms 14676 KB Output is correct
203 Correct 8 ms 14684 KB Output is correct
204 Correct 8 ms 14676 KB Output is correct
205 Correct 8 ms 14676 KB Output is correct
206 Correct 7 ms 14612 KB Output is correct
207 Correct 7 ms 14688 KB Output is correct
208 Correct 8 ms 14676 KB Output is correct
209 Correct 15 ms 19668 KB Output is correct
210 Correct 53 ms 24436 KB Output is correct
211 Correct 75 ms 26944 KB Output is correct
212 Correct 107 ms 28092 KB Output is correct
213 Correct 112 ms 29140 KB Output is correct
214 Correct 54 ms 24092 KB Output is correct
215 Correct 50 ms 23360 KB Output is correct
216 Correct 93 ms 27488 KB Output is correct
217 Correct 79 ms 25300 KB Output is correct
218 Correct 70 ms 22852 KB Output is correct
219 Correct 68 ms 22256 KB Output is correct
220 Correct 59 ms 21980 KB Output is correct
221 Correct 52 ms 21744 KB Output is correct
222 Correct 57 ms 22468 KB Output is correct
223 Correct 93 ms 28468 KB Output is correct
224 Correct 83 ms 27316 KB Output is correct
225 Correct 83 ms 24616 KB Output is correct
226 Correct 72 ms 24560 KB Output is correct
227 Correct 82 ms 24480 KB Output is correct
228 Correct 73 ms 23524 KB Output is correct
229 Correct 59 ms 22428 KB Output is correct
230 Correct 82 ms 24340 KB Output is correct
231 Correct 67 ms 24468 KB Output is correct