답안 #396656

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
396656 2021-04-30T14:20:25 Z AriaH 철인 이종 경기 (APIO18_duathlon) C++11
100 / 100
190 ms 73108 KB
/** vaziat sorati ghermeze **/

#pragma GCC optimize("O2")
#include <bits/stdc++.h>
using namespace std;

typedef long long                   ll;
typedef long double                 ld;
typedef pair<int,int>               pii;
typedef pair<ll,ll>                 pll;
#define all(x)                      (x).begin(),(x).end()
#define F                           first
#define S                           second
#define Mp                          make_pair
#define SZ(x)			    		(int)x.size()
#define fast_io                     ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define file_io                     freopen("in.txt" , "r+" , stdin) ; freopen("out.txt" , "w+" , stdout);

const int N = 1e6 + 10;
const ll mod = 1e9 + 7;
const ll mod2 = 998244353;
const ll inf = 8e18;
const int LOG = 22;

ll pw(ll a , ll b, ll M)  { return (!b ? 1 : (b & 1 ? (a * pw(a * a % M, b / 2, M)) % M : pw(a * a % M, b / 2, M))); }

ll tot;

int n, m, ts, H[N], Up[N], mark[N], sub[N];

vector < int > vec, G[N], adj[N];

void dfs(int v, int P = 0)
{
	Up[v] = H[v] = H[P] + 1;
	mark[v] = 1;
	for(auto u : G[v])
	{
		if(u == P) continue;
		if(mark[u])
		{
			Up[v] = min(Up[v], H[u]);
			continue;
		}
		int last = SZ(vec);
		dfs(u, v);
		if(Up[u] >= H[v])
		{
			ts ++;
			vec.push_back(v);
			while(SZ(vec) > last)
			{
				int node = vec.back();
				vec.pop_back();
				adj[ts].push_back(node);
				adj[node].push_back(ts);
				///printf("yal %d - %d\n", ts, node);
			}
		}
		Up[v] = min(Up[v], Up[u]);
	}
	vec.push_back(v);
}

void pre(int v, int P = 0)
{
	mark[v] = 1;
	sub[v] = (v <= n);
	for(auto u : adj[v])
	{
		if(u == P) continue;
		pre(u, v);
		sub[v] += sub[u];
	}
	///printf("v = %d sub = %d\n", v, sub[v]);
}

void calc(int v, int P, int _n)
{
	if(v <= n)
	{
		for(auto u : adj[v])
		{
			if(u == P) continue;
			calc(u, v, _n);
		}
		return;
	}
	ll p2 = 0;
	for(auto u : adj[v])
	{
		int cu = 0;
		if(u == P)
		{
			cu = _n - sub[v];
		}
		else
		{
			cu = sub[u];
		}
		///printf("v = %d u = %d cu = %d\n", v, u, cu);
		p2 += 1ll * cu *cu;
	}
	///printf("v = %d p2 = %lld\n", v, p2);
	for(auto u : adj[v])
	{
		int cu = 0;
		if(u == P)
		{
			cu = _n - sub[v];
		}
		else
		{
			cu = sub[u];
		}
		tot += 1ll * (_n - cu) * (_n - cu) - p2 + 1ll * cu * cu;
		tot += 1ll * (cu - 1) * (_n - cu);
	}
	for(auto u : adj[v]) 
	{
		if(u == P) continue;
		calc(u, v, _n);
	}
}

int main()
{
	scanf("%d%d", &n, &m);
	ts = n;
	for(int i = 1; i <= m; i ++)
	{
		int a, b;
		scanf("%d%d", &a, &b);
		G[a].push_back(b);
		G[b].push_back(a);
	}
	for(int i = 1; i <= n; i ++)
	{
		if(!mark[i])
		{
			dfs(i);
		}
	}
	memset(mark, 0, sizeof mark);
	for(int i = 1; i <= n; i ++)
	{
		if(!mark[i])
		{
			pre(i);
			calc(i, 0, sub[i]);
		}
	}
	printf("%lld", tot);
    return 0;
}

/** test corner cases(n = 1?) watch for overflow or minus indices **/

Compilation message

count_triplets.cpp: In function 'int main()':
count_triplets.cpp:128:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  128 |  scanf("%d%d", &n, &m);
      |  ~~~~~^~~~~~~~~~~~~~~~
count_triplets.cpp:133:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  133 |   scanf("%d%d", &a, &b);
      |   ~~~~~^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 51152 KB Output is correct
2 Correct 32 ms 51208 KB Output is correct
3 Correct 33 ms 51180 KB Output is correct
4 Correct 32 ms 51088 KB Output is correct
5 Correct 34 ms 51196 KB Output is correct
6 Correct 32 ms 51140 KB Output is correct
7 Correct 35 ms 51168 KB Output is correct
8 Correct 34 ms 51096 KB Output is correct
9 Correct 33 ms 51108 KB Output is correct
10 Correct 37 ms 51204 KB Output is correct
11 Correct 32 ms 51176 KB Output is correct
12 Correct 31 ms 51188 KB Output is correct
13 Correct 31 ms 51120 KB Output is correct
14 Correct 33 ms 51148 KB Output is correct
15 Correct 35 ms 51232 KB Output is correct
16 Correct 31 ms 51188 KB Output is correct
17 Correct 34 ms 51208 KB Output is correct
18 Correct 31 ms 51148 KB Output is correct
19 Correct 35 ms 51140 KB Output is correct
20 Correct 32 ms 51148 KB Output is correct
21 Correct 35 ms 51092 KB Output is correct
22 Correct 33 ms 51116 KB Output is correct
23 Correct 31 ms 51132 KB Output is correct
24 Correct 30 ms 51116 KB Output is correct
25 Correct 32 ms 51160 KB Output is correct
26 Correct 34 ms 51184 KB Output is correct
27 Correct 31 ms 51112 KB Output is correct
28 Correct 31 ms 51148 KB Output is correct
29 Correct 34 ms 51080 KB Output is correct
30 Correct 28 ms 51148 KB Output is correct
31 Correct 28 ms 51148 KB Output is correct
32 Correct 28 ms 51108 KB Output is correct
33 Correct 28 ms 51108 KB Output is correct
34 Correct 28 ms 51140 KB Output is correct
35 Correct 27 ms 51140 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 51152 KB Output is correct
2 Correct 32 ms 51208 KB Output is correct
3 Correct 33 ms 51180 KB Output is correct
4 Correct 32 ms 51088 KB Output is correct
5 Correct 34 ms 51196 KB Output is correct
6 Correct 32 ms 51140 KB Output is correct
7 Correct 35 ms 51168 KB Output is correct
8 Correct 34 ms 51096 KB Output is correct
9 Correct 33 ms 51108 KB Output is correct
10 Correct 37 ms 51204 KB Output is correct
11 Correct 32 ms 51176 KB Output is correct
12 Correct 31 ms 51188 KB Output is correct
13 Correct 31 ms 51120 KB Output is correct
14 Correct 33 ms 51148 KB Output is correct
15 Correct 35 ms 51232 KB Output is correct
16 Correct 31 ms 51188 KB Output is correct
17 Correct 34 ms 51208 KB Output is correct
18 Correct 31 ms 51148 KB Output is correct
19 Correct 35 ms 51140 KB Output is correct
20 Correct 32 ms 51148 KB Output is correct
21 Correct 35 ms 51092 KB Output is correct
22 Correct 33 ms 51116 KB Output is correct
23 Correct 31 ms 51132 KB Output is correct
24 Correct 30 ms 51116 KB Output is correct
25 Correct 32 ms 51160 KB Output is correct
26 Correct 34 ms 51184 KB Output is correct
27 Correct 31 ms 51112 KB Output is correct
28 Correct 31 ms 51148 KB Output is correct
29 Correct 34 ms 51080 KB Output is correct
30 Correct 28 ms 51148 KB Output is correct
31 Correct 28 ms 51148 KB Output is correct
32 Correct 28 ms 51108 KB Output is correct
33 Correct 28 ms 51108 KB Output is correct
34 Correct 28 ms 51140 KB Output is correct
35 Correct 27 ms 51140 KB Output is correct
36 Correct 35 ms 51192 KB Output is correct
37 Correct 33 ms 51096 KB Output is correct
38 Correct 32 ms 51148 KB Output is correct
39 Correct 32 ms 51148 KB Output is correct
40 Correct 31 ms 51148 KB Output is correct
41 Correct 33 ms 51140 KB Output is correct
42 Correct 32 ms 51200 KB Output is correct
43 Correct 33 ms 51104 KB Output is correct
44 Correct 32 ms 51192 KB Output is correct
45 Correct 35 ms 51108 KB Output is correct
46 Correct 32 ms 51104 KB Output is correct
47 Correct 32 ms 51200 KB Output is correct
48 Correct 33 ms 51064 KB Output is correct
49 Correct 33 ms 51120 KB Output is correct
50 Correct 32 ms 51140 KB Output is correct
51 Correct 33 ms 51160 KB Output is correct
52 Correct 32 ms 51140 KB Output is correct
53 Correct 32 ms 51180 KB Output is correct
54 Correct 32 ms 51200 KB Output is correct
55 Correct 32 ms 51148 KB Output is correct
56 Correct 33 ms 51148 KB Output is correct
57 Correct 32 ms 51084 KB Output is correct
58 Correct 34 ms 51140 KB Output is correct
59 Correct 31 ms 51084 KB Output is correct
60 Correct 32 ms 51168 KB Output is correct
61 Correct 30 ms 51144 KB Output is correct
62 Correct 32 ms 51144 KB Output is correct
63 Correct 32 ms 51184 KB Output is correct
64 Correct 32 ms 51148 KB Output is correct
65 Correct 32 ms 51192 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 145 ms 72004 KB Output is correct
2 Correct 119 ms 73108 KB Output is correct
3 Correct 127 ms 68404 KB Output is correct
4 Correct 119 ms 70708 KB Output is correct
5 Correct 127 ms 65620 KB Output is correct
6 Correct 134 ms 67396 KB Output is correct
7 Correct 130 ms 65216 KB Output is correct
8 Correct 149 ms 65756 KB Output is correct
9 Correct 173 ms 63772 KB Output is correct
10 Correct 127 ms 64208 KB Output is correct
11 Correct 106 ms 61468 KB Output is correct
12 Correct 113 ms 61288 KB Output is correct
13 Correct 110 ms 61128 KB Output is correct
14 Correct 103 ms 60864 KB Output is correct
15 Correct 86 ms 59796 KB Output is correct
16 Correct 90 ms 59548 KB Output is correct
17 Correct 35 ms 52804 KB Output is correct
18 Correct 35 ms 52796 KB Output is correct
19 Correct 35 ms 52816 KB Output is correct
20 Correct 34 ms 52892 KB Output is correct
21 Correct 36 ms 52884 KB Output is correct
22 Correct 34 ms 52912 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 36 ms 51272 KB Output is correct
2 Correct 36 ms 51276 KB Output is correct
3 Correct 33 ms 51244 KB Output is correct
4 Correct 33 ms 51440 KB Output is correct
5 Correct 32 ms 51400 KB Output is correct
6 Correct 33 ms 51280 KB Output is correct
7 Correct 31 ms 51268 KB Output is correct
8 Correct 36 ms 51244 KB Output is correct
9 Correct 32 ms 51220 KB Output is correct
10 Correct 34 ms 51244 KB Output is correct
11 Correct 32 ms 51348 KB Output is correct
12 Correct 33 ms 51268 KB Output is correct
13 Correct 32 ms 51328 KB Output is correct
14 Correct 32 ms 51276 KB Output is correct
15 Correct 32 ms 51276 KB Output is correct
16 Correct 32 ms 51216 KB Output is correct
17 Correct 32 ms 51276 KB Output is correct
18 Correct 31 ms 51196 KB Output is correct
19 Correct 33 ms 51344 KB Output is correct
20 Correct 33 ms 51272 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 146 ms 62476 KB Output is correct
2 Correct 142 ms 62456 KB Output is correct
3 Correct 138 ms 62580 KB Output is correct
4 Correct 140 ms 62480 KB Output is correct
5 Correct 143 ms 62380 KB Output is correct
6 Correct 153 ms 70792 KB Output is correct
7 Correct 153 ms 67920 KB Output is correct
8 Correct 147 ms 66500 KB Output is correct
9 Correct 155 ms 65060 KB Output is correct
10 Correct 139 ms 62408 KB Output is correct
11 Correct 142 ms 62404 KB Output is correct
12 Correct 182 ms 62404 KB Output is correct
13 Correct 139 ms 62480 KB Output is correct
14 Correct 128 ms 61892 KB Output is correct
15 Correct 117 ms 61424 KB Output is correct
16 Correct 79 ms 59068 KB Output is correct
17 Correct 101 ms 63012 KB Output is correct
18 Correct 101 ms 62996 KB Output is correct
19 Correct 120 ms 63044 KB Output is correct
20 Correct 105 ms 62992 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 51296 KB Output is correct
2 Correct 30 ms 51244 KB Output is correct
3 Correct 31 ms 51228 KB Output is correct
4 Correct 31 ms 51244 KB Output is correct
5 Correct 32 ms 51276 KB Output is correct
6 Correct 29 ms 51276 KB Output is correct
7 Correct 30 ms 51252 KB Output is correct
8 Correct 29 ms 51268 KB Output is correct
9 Correct 30 ms 51312 KB Output is correct
10 Correct 29 ms 51184 KB Output is correct
11 Correct 29 ms 51176 KB Output is correct
12 Correct 29 ms 51244 KB Output is correct
13 Correct 30 ms 51276 KB Output is correct
14 Correct 29 ms 51364 KB Output is correct
15 Correct 29 ms 51320 KB Output is correct
16 Correct 29 ms 51432 KB Output is correct
17 Correct 30 ms 51312 KB Output is correct
18 Correct 32 ms 51300 KB Output is correct
19 Correct 29 ms 51248 KB Output is correct
20 Correct 29 ms 51224 KB Output is correct
21 Correct 30 ms 51236 KB Output is correct
22 Correct 29 ms 51268 KB Output is correct
23 Correct 34 ms 51208 KB Output is correct
24 Correct 29 ms 51248 KB Output is correct
25 Correct 29 ms 51188 KB Output is correct
26 Correct 32 ms 51152 KB Output is correct
27 Correct 28 ms 51216 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 135 ms 62416 KB Output is correct
2 Correct 138 ms 62396 KB Output is correct
3 Correct 140 ms 61736 KB Output is correct
4 Correct 177 ms 62424 KB Output is correct
5 Correct 126 ms 61592 KB Output is correct
6 Correct 124 ms 61136 KB Output is correct
7 Correct 129 ms 60952 KB Output is correct
8 Correct 119 ms 60784 KB Output is correct
9 Correct 152 ms 60728 KB Output is correct
10 Correct 122 ms 60632 KB Output is correct
11 Correct 118 ms 60576 KB Output is correct
12 Correct 110 ms 60812 KB Output is correct
13 Correct 107 ms 60816 KB Output is correct
14 Correct 106 ms 63704 KB Output is correct
15 Correct 175 ms 69060 KB Output is correct
16 Correct 144 ms 66976 KB Output is correct
17 Correct 142 ms 67752 KB Output is correct
18 Correct 142 ms 65836 KB Output is correct
19 Correct 141 ms 62348 KB Output is correct
20 Correct 136 ms 62308 KB Output is correct
21 Correct 143 ms 62336 KB Output is correct
22 Correct 131 ms 61868 KB Output is correct
23 Correct 127 ms 61216 KB Output is correct
24 Correct 164 ms 63416 KB Output is correct
25 Correct 139 ms 63448 KB Output is correct
26 Correct 140 ms 62916 KB Output is correct
27 Correct 136 ms 62908 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 51152 KB Output is correct
2 Correct 32 ms 51208 KB Output is correct
3 Correct 33 ms 51180 KB Output is correct
4 Correct 32 ms 51088 KB Output is correct
5 Correct 34 ms 51196 KB Output is correct
6 Correct 32 ms 51140 KB Output is correct
7 Correct 35 ms 51168 KB Output is correct
8 Correct 34 ms 51096 KB Output is correct
9 Correct 33 ms 51108 KB Output is correct
10 Correct 37 ms 51204 KB Output is correct
11 Correct 32 ms 51176 KB Output is correct
12 Correct 31 ms 51188 KB Output is correct
13 Correct 31 ms 51120 KB Output is correct
14 Correct 33 ms 51148 KB Output is correct
15 Correct 35 ms 51232 KB Output is correct
16 Correct 31 ms 51188 KB Output is correct
17 Correct 34 ms 51208 KB Output is correct
18 Correct 31 ms 51148 KB Output is correct
19 Correct 35 ms 51140 KB Output is correct
20 Correct 32 ms 51148 KB Output is correct
21 Correct 35 ms 51092 KB Output is correct
22 Correct 33 ms 51116 KB Output is correct
23 Correct 31 ms 51132 KB Output is correct
24 Correct 30 ms 51116 KB Output is correct
25 Correct 32 ms 51160 KB Output is correct
26 Correct 34 ms 51184 KB Output is correct
27 Correct 31 ms 51112 KB Output is correct
28 Correct 31 ms 51148 KB Output is correct
29 Correct 34 ms 51080 KB Output is correct
30 Correct 28 ms 51148 KB Output is correct
31 Correct 28 ms 51148 KB Output is correct
32 Correct 28 ms 51108 KB Output is correct
33 Correct 28 ms 51108 KB Output is correct
34 Correct 28 ms 51140 KB Output is correct
35 Correct 27 ms 51140 KB Output is correct
36 Correct 35 ms 51192 KB Output is correct
37 Correct 33 ms 51096 KB Output is correct
38 Correct 32 ms 51148 KB Output is correct
39 Correct 32 ms 51148 KB Output is correct
40 Correct 31 ms 51148 KB Output is correct
41 Correct 33 ms 51140 KB Output is correct
42 Correct 32 ms 51200 KB Output is correct
43 Correct 33 ms 51104 KB Output is correct
44 Correct 32 ms 51192 KB Output is correct
45 Correct 35 ms 51108 KB Output is correct
46 Correct 32 ms 51104 KB Output is correct
47 Correct 32 ms 51200 KB Output is correct
48 Correct 33 ms 51064 KB Output is correct
49 Correct 33 ms 51120 KB Output is correct
50 Correct 32 ms 51140 KB Output is correct
51 Correct 33 ms 51160 KB Output is correct
52 Correct 32 ms 51140 KB Output is correct
53 Correct 32 ms 51180 KB Output is correct
54 Correct 32 ms 51200 KB Output is correct
55 Correct 32 ms 51148 KB Output is correct
56 Correct 33 ms 51148 KB Output is correct
57 Correct 32 ms 51084 KB Output is correct
58 Correct 34 ms 51140 KB Output is correct
59 Correct 31 ms 51084 KB Output is correct
60 Correct 32 ms 51168 KB Output is correct
61 Correct 30 ms 51144 KB Output is correct
62 Correct 32 ms 51144 KB Output is correct
63 Correct 32 ms 51184 KB Output is correct
64 Correct 32 ms 51148 KB Output is correct
65 Correct 32 ms 51192 KB Output is correct
66 Correct 27 ms 51148 KB Output is correct
67 Correct 27 ms 51144 KB Output is correct
68 Correct 29 ms 51268 KB Output is correct
69 Correct 31 ms 51340 KB Output is correct
70 Correct 30 ms 51324 KB Output is correct
71 Correct 32 ms 51276 KB Output is correct
72 Correct 29 ms 51304 KB Output is correct
73 Correct 30 ms 51240 KB Output is correct
74 Correct 29 ms 51284 KB Output is correct
75 Correct 31 ms 51300 KB Output is correct
76 Correct 29 ms 51136 KB Output is correct
77 Correct 29 ms 51256 KB Output is correct
78 Correct 29 ms 51304 KB Output is correct
79 Correct 29 ms 51224 KB Output is correct
80 Correct 31 ms 51276 KB Output is correct
81 Correct 30 ms 51192 KB Output is correct
82 Correct 30 ms 51288 KB Output is correct
83 Correct 29 ms 51276 KB Output is correct
84 Correct 29 ms 51304 KB Output is correct
85 Correct 29 ms 51268 KB Output is correct
86 Correct 29 ms 51252 KB Output is correct
87 Correct 30 ms 51248 KB Output is correct
88 Correct 31 ms 51372 KB Output is correct
89 Correct 29 ms 51276 KB Output is correct
90 Correct 29 ms 51276 KB Output is correct
91 Correct 29 ms 51276 KB Output is correct
92 Correct 32 ms 51288 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 51152 KB Output is correct
2 Correct 32 ms 51208 KB Output is correct
3 Correct 33 ms 51180 KB Output is correct
4 Correct 32 ms 51088 KB Output is correct
5 Correct 34 ms 51196 KB Output is correct
6 Correct 32 ms 51140 KB Output is correct
7 Correct 35 ms 51168 KB Output is correct
8 Correct 34 ms 51096 KB Output is correct
9 Correct 33 ms 51108 KB Output is correct
10 Correct 37 ms 51204 KB Output is correct
11 Correct 32 ms 51176 KB Output is correct
12 Correct 31 ms 51188 KB Output is correct
13 Correct 31 ms 51120 KB Output is correct
14 Correct 33 ms 51148 KB Output is correct
15 Correct 35 ms 51232 KB Output is correct
16 Correct 31 ms 51188 KB Output is correct
17 Correct 34 ms 51208 KB Output is correct
18 Correct 31 ms 51148 KB Output is correct
19 Correct 35 ms 51140 KB Output is correct
20 Correct 32 ms 51148 KB Output is correct
21 Correct 35 ms 51092 KB Output is correct
22 Correct 33 ms 51116 KB Output is correct
23 Correct 31 ms 51132 KB Output is correct
24 Correct 30 ms 51116 KB Output is correct
25 Correct 32 ms 51160 KB Output is correct
26 Correct 34 ms 51184 KB Output is correct
27 Correct 31 ms 51112 KB Output is correct
28 Correct 31 ms 51148 KB Output is correct
29 Correct 34 ms 51080 KB Output is correct
30 Correct 28 ms 51148 KB Output is correct
31 Correct 28 ms 51148 KB Output is correct
32 Correct 28 ms 51108 KB Output is correct
33 Correct 28 ms 51108 KB Output is correct
34 Correct 28 ms 51140 KB Output is correct
35 Correct 27 ms 51140 KB Output is correct
36 Correct 35 ms 51192 KB Output is correct
37 Correct 33 ms 51096 KB Output is correct
38 Correct 32 ms 51148 KB Output is correct
39 Correct 32 ms 51148 KB Output is correct
40 Correct 31 ms 51148 KB Output is correct
41 Correct 33 ms 51140 KB Output is correct
42 Correct 32 ms 51200 KB Output is correct
43 Correct 33 ms 51104 KB Output is correct
44 Correct 32 ms 51192 KB Output is correct
45 Correct 35 ms 51108 KB Output is correct
46 Correct 32 ms 51104 KB Output is correct
47 Correct 32 ms 51200 KB Output is correct
48 Correct 33 ms 51064 KB Output is correct
49 Correct 33 ms 51120 KB Output is correct
50 Correct 32 ms 51140 KB Output is correct
51 Correct 33 ms 51160 KB Output is correct
52 Correct 32 ms 51140 KB Output is correct
53 Correct 32 ms 51180 KB Output is correct
54 Correct 32 ms 51200 KB Output is correct
55 Correct 32 ms 51148 KB Output is correct
56 Correct 33 ms 51148 KB Output is correct
57 Correct 32 ms 51084 KB Output is correct
58 Correct 34 ms 51140 KB Output is correct
59 Correct 31 ms 51084 KB Output is correct
60 Correct 32 ms 51168 KB Output is correct
61 Correct 30 ms 51144 KB Output is correct
62 Correct 32 ms 51144 KB Output is correct
63 Correct 32 ms 51184 KB Output is correct
64 Correct 32 ms 51148 KB Output is correct
65 Correct 32 ms 51192 KB Output is correct
66 Correct 145 ms 72004 KB Output is correct
67 Correct 119 ms 73108 KB Output is correct
68 Correct 127 ms 68404 KB Output is correct
69 Correct 119 ms 70708 KB Output is correct
70 Correct 127 ms 65620 KB Output is correct
71 Correct 134 ms 67396 KB Output is correct
72 Correct 130 ms 65216 KB Output is correct
73 Correct 149 ms 65756 KB Output is correct
74 Correct 173 ms 63772 KB Output is correct
75 Correct 127 ms 64208 KB Output is correct
76 Correct 106 ms 61468 KB Output is correct
77 Correct 113 ms 61288 KB Output is correct
78 Correct 110 ms 61128 KB Output is correct
79 Correct 103 ms 60864 KB Output is correct
80 Correct 86 ms 59796 KB Output is correct
81 Correct 90 ms 59548 KB Output is correct
82 Correct 35 ms 52804 KB Output is correct
83 Correct 35 ms 52796 KB Output is correct
84 Correct 35 ms 52816 KB Output is correct
85 Correct 34 ms 52892 KB Output is correct
86 Correct 36 ms 52884 KB Output is correct
87 Correct 34 ms 52912 KB Output is correct
88 Correct 36 ms 51272 KB Output is correct
89 Correct 36 ms 51276 KB Output is correct
90 Correct 33 ms 51244 KB Output is correct
91 Correct 33 ms 51440 KB Output is correct
92 Correct 32 ms 51400 KB Output is correct
93 Correct 33 ms 51280 KB Output is correct
94 Correct 31 ms 51268 KB Output is correct
95 Correct 36 ms 51244 KB Output is correct
96 Correct 32 ms 51220 KB Output is correct
97 Correct 34 ms 51244 KB Output is correct
98 Correct 32 ms 51348 KB Output is correct
99 Correct 33 ms 51268 KB Output is correct
100 Correct 32 ms 51328 KB Output is correct
101 Correct 32 ms 51276 KB Output is correct
102 Correct 32 ms 51276 KB Output is correct
103 Correct 32 ms 51216 KB Output is correct
104 Correct 32 ms 51276 KB Output is correct
105 Correct 31 ms 51196 KB Output is correct
106 Correct 33 ms 51344 KB Output is correct
107 Correct 33 ms 51272 KB Output is correct
108 Correct 146 ms 62476 KB Output is correct
109 Correct 142 ms 62456 KB Output is correct
110 Correct 138 ms 62580 KB Output is correct
111 Correct 140 ms 62480 KB Output is correct
112 Correct 143 ms 62380 KB Output is correct
113 Correct 153 ms 70792 KB Output is correct
114 Correct 153 ms 67920 KB Output is correct
115 Correct 147 ms 66500 KB Output is correct
116 Correct 155 ms 65060 KB Output is correct
117 Correct 139 ms 62408 KB Output is correct
118 Correct 142 ms 62404 KB Output is correct
119 Correct 182 ms 62404 KB Output is correct
120 Correct 139 ms 62480 KB Output is correct
121 Correct 128 ms 61892 KB Output is correct
122 Correct 117 ms 61424 KB Output is correct
123 Correct 79 ms 59068 KB Output is correct
124 Correct 101 ms 63012 KB Output is correct
125 Correct 101 ms 62996 KB Output is correct
126 Correct 120 ms 63044 KB Output is correct
127 Correct 105 ms 62992 KB Output is correct
128 Correct 28 ms 51296 KB Output is correct
129 Correct 30 ms 51244 KB Output is correct
130 Correct 31 ms 51228 KB Output is correct
131 Correct 31 ms 51244 KB Output is correct
132 Correct 32 ms 51276 KB Output is correct
133 Correct 29 ms 51276 KB Output is correct
134 Correct 30 ms 51252 KB Output is correct
135 Correct 29 ms 51268 KB Output is correct
136 Correct 30 ms 51312 KB Output is correct
137 Correct 29 ms 51184 KB Output is correct
138 Correct 29 ms 51176 KB Output is correct
139 Correct 29 ms 51244 KB Output is correct
140 Correct 30 ms 51276 KB Output is correct
141 Correct 29 ms 51364 KB Output is correct
142 Correct 29 ms 51320 KB Output is correct
143 Correct 29 ms 51432 KB Output is correct
144 Correct 30 ms 51312 KB Output is correct
145 Correct 32 ms 51300 KB Output is correct
146 Correct 29 ms 51248 KB Output is correct
147 Correct 29 ms 51224 KB Output is correct
148 Correct 30 ms 51236 KB Output is correct
149 Correct 29 ms 51268 KB Output is correct
150 Correct 34 ms 51208 KB Output is correct
151 Correct 29 ms 51248 KB Output is correct
152 Correct 29 ms 51188 KB Output is correct
153 Correct 32 ms 51152 KB Output is correct
154 Correct 28 ms 51216 KB Output is correct
155 Correct 135 ms 62416 KB Output is correct
156 Correct 138 ms 62396 KB Output is correct
157 Correct 140 ms 61736 KB Output is correct
158 Correct 177 ms 62424 KB Output is correct
159 Correct 126 ms 61592 KB Output is correct
160 Correct 124 ms 61136 KB Output is correct
161 Correct 129 ms 60952 KB Output is correct
162 Correct 119 ms 60784 KB Output is correct
163 Correct 152 ms 60728 KB Output is correct
164 Correct 122 ms 60632 KB Output is correct
165 Correct 118 ms 60576 KB Output is correct
166 Correct 110 ms 60812 KB Output is correct
167 Correct 107 ms 60816 KB Output is correct
168 Correct 106 ms 63704 KB Output is correct
169 Correct 175 ms 69060 KB Output is correct
170 Correct 144 ms 66976 KB Output is correct
171 Correct 142 ms 67752 KB Output is correct
172 Correct 142 ms 65836 KB Output is correct
173 Correct 141 ms 62348 KB Output is correct
174 Correct 136 ms 62308 KB Output is correct
175 Correct 143 ms 62336 KB Output is correct
176 Correct 131 ms 61868 KB Output is correct
177 Correct 127 ms 61216 KB Output is correct
178 Correct 164 ms 63416 KB Output is correct
179 Correct 139 ms 63448 KB Output is correct
180 Correct 140 ms 62916 KB Output is correct
181 Correct 136 ms 62908 KB Output is correct
182 Correct 27 ms 51148 KB Output is correct
183 Correct 27 ms 51144 KB Output is correct
184 Correct 29 ms 51268 KB Output is correct
185 Correct 31 ms 51340 KB Output is correct
186 Correct 30 ms 51324 KB Output is correct
187 Correct 32 ms 51276 KB Output is correct
188 Correct 29 ms 51304 KB Output is correct
189 Correct 30 ms 51240 KB Output is correct
190 Correct 29 ms 51284 KB Output is correct
191 Correct 31 ms 51300 KB Output is correct
192 Correct 29 ms 51136 KB Output is correct
193 Correct 29 ms 51256 KB Output is correct
194 Correct 29 ms 51304 KB Output is correct
195 Correct 29 ms 51224 KB Output is correct
196 Correct 31 ms 51276 KB Output is correct
197 Correct 30 ms 51192 KB Output is correct
198 Correct 30 ms 51288 KB Output is correct
199 Correct 29 ms 51276 KB Output is correct
200 Correct 29 ms 51304 KB Output is correct
201 Correct 29 ms 51268 KB Output is correct
202 Correct 29 ms 51252 KB Output is correct
203 Correct 30 ms 51248 KB Output is correct
204 Correct 31 ms 51372 KB Output is correct
205 Correct 29 ms 51276 KB Output is correct
206 Correct 29 ms 51276 KB Output is correct
207 Correct 29 ms 51276 KB Output is correct
208 Correct 32 ms 51288 KB Output is correct
209 Correct 34 ms 52804 KB Output is correct
210 Correct 87 ms 58932 KB Output is correct
211 Correct 123 ms 64144 KB Output is correct
212 Correct 141 ms 67492 KB Output is correct
213 Correct 190 ms 70032 KB Output is correct
214 Correct 84 ms 61380 KB Output is correct
215 Correct 88 ms 61252 KB Output is correct
216 Correct 150 ms 63092 KB Output is correct
217 Correct 137 ms 62056 KB Output is correct
218 Correct 146 ms 60832 KB Output is correct
219 Correct 138 ms 60728 KB Output is correct
220 Correct 120 ms 60612 KB Output is correct
221 Correct 105 ms 60684 KB Output is correct
222 Correct 125 ms 62328 KB Output is correct
223 Correct 162 ms 65452 KB Output is correct
224 Correct 157 ms 64284 KB Output is correct
225 Correct 148 ms 61764 KB Output is correct
226 Correct 145 ms 61764 KB Output is correct
227 Correct 153 ms 61728 KB Output is correct
228 Correct 144 ms 61364 KB Output is correct
229 Correct 129 ms 61124 KB Output is correct
230 Correct 134 ms 62252 KB Output is correct
231 Correct 135 ms 62332 KB Output is correct