답안 #827021

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
827021 2023-08-16T08:03:45 Z NothingXD 분수 공원 (IOI21_parks) C++17
70 / 100
564 ms 98312 KB
#include "parks.h"
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

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 F first
#define S second
#define all(x) x.begin(), x.end()
#define MP(x, y) make_pair(x, y)

const int maxn = 2e5 + 10;

int n, x[maxn], y[maxn], dsu[maxn], cntedge[maxn], cntdot[maxn<<1], a[maxn], b[maxn];
vector<int> numx[maxn], numy[maxn];
vector<pair<pii,int>> p;
vector<pii> edge;
vector<pii> dot;
vector<int> gedge[maxn], gdot[maxn<<1];
bool markedge[maxn];
bool markdot[maxn<<1];
set<pii> st;
int getdsu(int v){
	return (dsu[v] < 0? v: dsu[v] = getdsu(dsu[v]));
}

bool merge(int u, int v){
	if ((u = getdsu(u)) == (v = getdsu(v))) return false;
	dsu[u] = v;
	return true;
}

pair<pii,pii> getdot(int u, int v){
	//debug(x[u], x[v], y[u], y[v]);
	if (x[u] == x[v]) return {{x[u]-1, (y[u]+y[v])/2}, {x[u]+1, (y[u]+y[v])/2}};
	return {{(x[u]+x[v])/2, y[u]-1}, {(x[u]+x[v])/2, y[u]+1}};
}

void rmdot(int idx){
	for (auto x: gdot[idx]){
		if (!markedge[x]){
			st.erase({cntedge[x], x});
			cntedge[x]--;
			st.insert({cntedge[x], x});
		}
	}
}

void rmedge(int idx){
	for (auto x: gedge[idx]){
		if (!markdot[x]){
			st.erase({cntdot[x], x+n});
			cntdot[x]--;
			st.insert({cntdot[x], x+n});
		}
	}
}


int construct_roads(std::vector<int> X, std::vector<int> Y) {
	memset(dsu, -1, sizeof dsu);
	n = X.size();
	for (int i = 0; i < n; i++){
		x[i] = X[i];
		y[i] = Y[i];
		p.push_back({{X[i], Y[i]}, i});
		numx[X[i]].push_back(Y[i]);
		numy[Y[i]].push_back(X[i]);
	}
	sort(all(p));
	for (int i = 0; i < maxn; i++){
		sort(all(numx[i]));
		for (int j = 1; j < numx[i].size(); j++){
			if (numx[i][j-1] + 2 == numx[i][j]){
				int u = (*lower_bound(all(p), MP(MP(i, numx[i][j-1]), 0))).S;
				int v = (*lower_bound(all(p), MP(MP(i, numx[i][j]), 0))).S;
				if (merge(u, v)) edge.push_back({u, v});
			}
		}
		sort(all(numy[i]));
		for (int j = 1; j < numy[i].size(); j++){
			if (numy[i][j-1] + 2 == numy[i][j]){
				int u = (*lower_bound(all(p), MP(MP(numy[i][j-1], i), 0))).S;
				int v = (*lower_bound(all(p), MP(MP(numy[i][j], i), 0))).S;
				if (merge(u, v)) edge.push_back({u, v});
			}
		}
	}
	if (edge.size() != n-1) return 0;
	for (int i = 0; i < n-1; i++){
		pair<pii,pii> tmp = getdot(edge[i].F, edge[i].S);
//		debug(edge[i].F, edge[i].S, tmp.F.F, tmp.F.S, tmp.S.F, tmp.S.S);
		dot.push_back(tmp.F);
		dot.push_back(tmp.S);
	}
	sort(all(dot));
	dot.resize(distance(dot.begin(), unique(all(dot))));
	for (int i = 0; i < n-1; i++){
		cntedge[i] = 2;
		pair<pii,pii> tmp = getdot(edge[i].F, edge[i].S);
		int idx = lower_bound(all(dot), tmp.F) - dot.begin();
	//	debug(i, idx);
		gdot[idx].push_back(i);
		gedge[i].push_back(idx);
		cntdot[idx]++;
		idx = lower_bound(all(dot), tmp.S) - dot.begin();
	//	debug(i, idx);
		gdot[idx].push_back(i);
		gedge[i].push_back(idx);
		cntdot[idx]++;
	}
	for (int i = 0; i < n-1; i++){
	//	debug(i, edge[i].F, edge[i].S, cntedge[i]);
		st.insert({cntedge[i], i});
	}
	for (int i = 0; i < dot.size(); i++){
		//debug(i, dot[i].F, dot[i].S, cntdot[i]);
		st.insert({cntdot[i], n+i});
	}
	while(!st.empty()){
		pii v = *st.begin();
		st.erase(st.begin());
		//debug(v.F, v.S);
		if (v.F == 0){
			assert(v.S >= n);
			continue;
		}
		if (v.S > n){
			v.S -= n;
			markdot[v.S] = true;
			for (auto x: gdot[v.S]){
//				debug(x);
				if (!markedge[x]){
//					debug(x, v.S);
					markedge[x] = true;
					a[x] = dot[v.S].F;
					b[x] = dot[v.S].S;
					st.erase({cntedge[x], x});
					rmdot(v.S);
					rmedge(x);
					break;
				}
			}
		}
		else{
			markedge[v.S] = true;
			for (auto x: gedge[v.S]){
				if (!markdot[x]){
//					debug(v.S, x);
					markdot[x] = true;
					a[v.S] = dot[x].F;
					b[v.S] = dot[x].S;
					st.erase({cntdot[x], x+n});
					rmdot(x);
					rmedge(v.S);
					break;
				}
			}
		}
	}
	vector<int> U, V, A, B;
	for (int i = 0; i < n-1; i++){
		U.push_back(edge[i].F);
		V.push_back(edge[i].S);
		A.push_back(a[i]);
		B.push_back(b[i]);
	}
	build(U, V, A, B);
	return 1;
}

Compilation message

parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:84:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   84 |   for (int j = 1; j < numx[i].size(); j++){
      |                   ~~^~~~~~~~~~~~~~~~
parks.cpp:92:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   92 |   for (int j = 1; j < numy[i].size(); j++){
      |                   ~~^~~~~~~~~~~~~~~~
parks.cpp:100:18: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  100 |  if (edge.size() != n-1) return 0;
      |      ~~~~~~~~~~~~^~~~~~
parks.cpp:127:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  127 |  for (int i = 0; i < dot.size(); i++){
      |                  ~~^~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 24568 KB Output is correct
2 Correct 16 ms 24564 KB Output is correct
3 Correct 13 ms 24564 KB Output is correct
4 Correct 16 ms 24508 KB Output is correct
5 Correct 13 ms 24560 KB Output is correct
6 Correct 14 ms 24560 KB Output is correct
7 Correct 13 ms 24468 KB Output is correct
8 Correct 14 ms 24488 KB Output is correct
9 Correct 213 ms 61036 KB Output is correct
10 Correct 31 ms 28276 KB Output is correct
11 Correct 112 ms 44216 KB Output is correct
12 Correct 39 ms 30160 KB Output is correct
13 Correct 29 ms 28828 KB Output is correct
14 Correct 14 ms 24652 KB Output is correct
15 Correct 13 ms 24660 KB Output is correct
16 Correct 226 ms 61048 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 24568 KB Output is correct
2 Correct 16 ms 24564 KB Output is correct
3 Correct 13 ms 24564 KB Output is correct
4 Correct 16 ms 24508 KB Output is correct
5 Correct 13 ms 24560 KB Output is correct
6 Correct 14 ms 24560 KB Output is correct
7 Correct 13 ms 24468 KB Output is correct
8 Correct 14 ms 24488 KB Output is correct
9 Correct 213 ms 61036 KB Output is correct
10 Correct 31 ms 28276 KB Output is correct
11 Correct 112 ms 44216 KB Output is correct
12 Correct 39 ms 30160 KB Output is correct
13 Correct 29 ms 28828 KB Output is correct
14 Correct 14 ms 24652 KB Output is correct
15 Correct 13 ms 24660 KB Output is correct
16 Correct 226 ms 61048 KB Output is correct
17 Correct 12 ms 24532 KB Output is correct
18 Correct 14 ms 24560 KB Output is correct
19 Correct 13 ms 24568 KB Output is correct
20 Correct 16 ms 24516 KB Output is correct
21 Correct 14 ms 24572 KB Output is correct
22 Correct 13 ms 24568 KB Output is correct
23 Correct 458 ms 87824 KB Output is correct
24 Correct 17 ms 24532 KB Output is correct
25 Correct 16 ms 24968 KB Output is correct
26 Correct 16 ms 24844 KB Output is correct
27 Correct 15 ms 24780 KB Output is correct
28 Correct 169 ms 49840 KB Output is correct
29 Correct 276 ms 62528 KB Output is correct
30 Correct 378 ms 75224 KB Output is correct
31 Correct 450 ms 87764 KB Output is correct
32 Correct 13 ms 24568 KB Output is correct
33 Correct 13 ms 24564 KB Output is correct
34 Correct 11 ms 24564 KB Output is correct
35 Correct 11 ms 24532 KB Output is correct
36 Correct 13 ms 24536 KB Output is correct
37 Correct 14 ms 24496 KB Output is correct
38 Correct 14 ms 24608 KB Output is correct
39 Correct 18 ms 24564 KB Output is correct
40 Correct 14 ms 24532 KB Output is correct
41 Correct 16 ms 24532 KB Output is correct
42 Correct 14 ms 24608 KB Output is correct
43 Correct 19 ms 24660 KB Output is correct
44 Correct 20 ms 24752 KB Output is correct
45 Correct 242 ms 55008 KB Output is correct
46 Correct 322 ms 68788 KB Output is correct
47 Correct 308 ms 68764 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 24568 KB Output is correct
2 Correct 16 ms 24564 KB Output is correct
3 Correct 13 ms 24564 KB Output is correct
4 Correct 16 ms 24508 KB Output is correct
5 Correct 13 ms 24560 KB Output is correct
6 Correct 14 ms 24560 KB Output is correct
7 Correct 13 ms 24468 KB Output is correct
8 Correct 14 ms 24488 KB Output is correct
9 Correct 213 ms 61036 KB Output is correct
10 Correct 31 ms 28276 KB Output is correct
11 Correct 112 ms 44216 KB Output is correct
12 Correct 39 ms 30160 KB Output is correct
13 Correct 29 ms 28828 KB Output is correct
14 Correct 14 ms 24652 KB Output is correct
15 Correct 13 ms 24660 KB Output is correct
16 Correct 226 ms 61048 KB Output is correct
17 Correct 12 ms 24532 KB Output is correct
18 Correct 14 ms 24560 KB Output is correct
19 Correct 13 ms 24568 KB Output is correct
20 Correct 16 ms 24516 KB Output is correct
21 Correct 14 ms 24572 KB Output is correct
22 Correct 13 ms 24568 KB Output is correct
23 Correct 458 ms 87824 KB Output is correct
24 Correct 17 ms 24532 KB Output is correct
25 Correct 16 ms 24968 KB Output is correct
26 Correct 16 ms 24844 KB Output is correct
27 Correct 15 ms 24780 KB Output is correct
28 Correct 169 ms 49840 KB Output is correct
29 Correct 276 ms 62528 KB Output is correct
30 Correct 378 ms 75224 KB Output is correct
31 Correct 450 ms 87764 KB Output is correct
32 Correct 13 ms 24568 KB Output is correct
33 Correct 13 ms 24564 KB Output is correct
34 Correct 11 ms 24564 KB Output is correct
35 Correct 11 ms 24532 KB Output is correct
36 Correct 13 ms 24536 KB Output is correct
37 Correct 14 ms 24496 KB Output is correct
38 Correct 14 ms 24608 KB Output is correct
39 Correct 18 ms 24564 KB Output is correct
40 Correct 14 ms 24532 KB Output is correct
41 Correct 16 ms 24532 KB Output is correct
42 Correct 14 ms 24608 KB Output is correct
43 Correct 19 ms 24660 KB Output is correct
44 Correct 20 ms 24752 KB Output is correct
45 Correct 242 ms 55008 KB Output is correct
46 Correct 322 ms 68788 KB Output is correct
47 Correct 308 ms 68764 KB Output is correct
48 Correct 13 ms 24540 KB Output is correct
49 Correct 13 ms 24524 KB Output is correct
50 Correct 14 ms 24532 KB Output is correct
51 Correct 14 ms 24516 KB Output is correct
52 Correct 15 ms 24564 KB Output is correct
53 Correct 14 ms 24568 KB Output is correct
54 Correct 14 ms 24564 KB Output is correct
55 Correct 415 ms 83496 KB Output is correct
56 Correct 14 ms 24532 KB Output is correct
57 Correct 18 ms 25136 KB Output is correct
58 Correct 27 ms 26368 KB Output is correct
59 Correct 23 ms 25496 KB Output is correct
60 Correct 198 ms 53980 KB Output is correct
61 Correct 272 ms 64088 KB Output is correct
62 Correct 344 ms 73084 KB Output is correct
63 Correct 432 ms 83460 KB Output is correct
64 Correct 14 ms 24532 KB Output is correct
65 Correct 13 ms 24500 KB Output is correct
66 Correct 13 ms 24544 KB Output is correct
67 Correct 437 ms 94316 KB Output is correct
68 Correct 458 ms 96028 KB Output is correct
69 Correct 425 ms 94808 KB Output is correct
70 Correct 18 ms 24916 KB Output is correct
71 Correct 17 ms 25172 KB Output is correct
72 Correct 207 ms 53728 KB Output is correct
73 Correct 327 ms 68640 KB Output is correct
74 Correct 442 ms 83348 KB Output is correct
75 Correct 431 ms 89828 KB Output is correct
76 Correct 435 ms 97444 KB Output is correct
77 Correct 16 ms 24916 KB Output is correct
78 Correct 17 ms 25352 KB Output is correct
79 Correct 211 ms 55280 KB Output is correct
80 Correct 316 ms 71064 KB Output is correct
81 Correct 439 ms 86320 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 24568 KB Output is correct
2 Correct 16 ms 24564 KB Output is correct
3 Correct 13 ms 24564 KB Output is correct
4 Correct 16 ms 24508 KB Output is correct
5 Correct 13 ms 24560 KB Output is correct
6 Correct 14 ms 24560 KB Output is correct
7 Correct 13 ms 24468 KB Output is correct
8 Correct 14 ms 24488 KB Output is correct
9 Correct 213 ms 61036 KB Output is correct
10 Correct 31 ms 28276 KB Output is correct
11 Correct 112 ms 44216 KB Output is correct
12 Correct 39 ms 30160 KB Output is correct
13 Correct 29 ms 28828 KB Output is correct
14 Correct 14 ms 24652 KB Output is correct
15 Correct 13 ms 24660 KB Output is correct
16 Correct 226 ms 61048 KB Output is correct
17 Correct 13 ms 24532 KB Output is correct
18 Correct 14 ms 24532 KB Output is correct
19 Correct 14 ms 24568 KB Output is correct
20 Correct 405 ms 81328 KB Output is correct
21 Correct 392 ms 78036 KB Output is correct
22 Correct 430 ms 77976 KB Output is correct
23 Correct 362 ms 84608 KB Output is correct
24 Correct 79 ms 35396 KB Output is correct
25 Correct 119 ms 38920 KB Output is correct
26 Correct 104 ms 38844 KB Output is correct
27 Correct 410 ms 93784 KB Output is correct
28 Correct 394 ms 93784 KB Output is correct
29 Correct 564 ms 93548 KB Output is correct
30 Correct 538 ms 93880 KB Output is correct
31 Correct 14 ms 24532 KB Output is correct
32 Correct 42 ms 28888 KB Output is correct
33 Correct 62 ms 35632 KB Output is correct
34 Correct 365 ms 83496 KB Output is correct
35 Correct 19 ms 25428 KB Output is correct
36 Correct 45 ms 28548 KB Output is correct
37 Correct 66 ms 32512 KB Output is correct
38 Correct 180 ms 47768 KB Output is correct
39 Correct 249 ms 56560 KB Output is correct
40 Correct 324 ms 65412 KB Output is correct
41 Correct 403 ms 74140 KB Output is correct
42 Correct 478 ms 82672 KB Output is correct
43 Correct 13 ms 24588 KB Output is correct
44 Correct 13 ms 24616 KB Output is correct
45 Correct 14 ms 24500 KB Output is correct
46 Correct 14 ms 24576 KB Output is correct
47 Correct 14 ms 24540 KB Output is correct
48 Correct 14 ms 24516 KB Output is correct
49 Correct 14 ms 24572 KB Output is correct
50 Correct 14 ms 24564 KB Output is correct
51 Correct 14 ms 24532 KB Output is correct
52 Correct 14 ms 24568 KB Output is correct
53 Correct 14 ms 24572 KB Output is correct
54 Correct 15 ms 24700 KB Output is correct
55 Correct 15 ms 24788 KB Output is correct
56 Correct 202 ms 55728 KB Output is correct
57 Correct 301 ms 69768 KB Output is correct
58 Correct 301 ms 69768 KB Output is correct
59 Correct 14 ms 24532 KB Output is correct
60 Correct 16 ms 24504 KB Output is correct
61 Correct 14 ms 24568 KB Output is correct
62 Correct 454 ms 95860 KB Output is correct
63 Correct 431 ms 97388 KB Output is correct
64 Correct 428 ms 96276 KB Output is correct
65 Correct 15 ms 24836 KB Output is correct
66 Correct 19 ms 25220 KB Output is correct
67 Correct 206 ms 54508 KB Output is correct
68 Correct 316 ms 69780 KB Output is correct
69 Correct 439 ms 84824 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 24568 KB Output is correct
2 Correct 16 ms 24564 KB Output is correct
3 Correct 13 ms 24564 KB Output is correct
4 Correct 16 ms 24508 KB Output is correct
5 Correct 13 ms 24560 KB Output is correct
6 Correct 14 ms 24560 KB Output is correct
7 Correct 13 ms 24468 KB Output is correct
8 Correct 14 ms 24488 KB Output is correct
9 Correct 213 ms 61036 KB Output is correct
10 Correct 31 ms 28276 KB Output is correct
11 Correct 112 ms 44216 KB Output is correct
12 Correct 39 ms 30160 KB Output is correct
13 Correct 29 ms 28828 KB Output is correct
14 Correct 14 ms 24652 KB Output is correct
15 Correct 13 ms 24660 KB Output is correct
16 Correct 226 ms 61048 KB Output is correct
17 Correct 432 ms 96624 KB Output is correct
18 Correct 437 ms 98312 KB Output is correct
19 Correct 433 ms 79956 KB Output is correct
20 Correct 423 ms 81232 KB Output is correct
21 Correct 400 ms 82824 KB Output is correct
22 Correct 15 ms 24532 KB Output is correct
23 Correct 73 ms 34060 KB Output is correct
24 Correct 24 ms 26120 KB Output is correct
25 Correct 54 ms 30452 KB Output is correct
26 Correct 83 ms 33832 KB Output is correct
27 Correct 229 ms 54468 KB Output is correct
28 Correct 309 ms 62228 KB Output is correct
29 Correct 349 ms 69784 KB Output is correct
30 Correct 416 ms 76556 KB Output is correct
31 Correct 477 ms 84472 KB Output is correct
32 Correct 427 ms 89816 KB Output is correct
33 Correct 431 ms 97436 KB Output is correct
34 Correct 15 ms 25004 KB Output is correct
35 Correct 17 ms 25300 KB Output is correct
36 Correct 207 ms 55212 KB Output is correct
37 Correct 334 ms 70824 KB Output is correct
38 Correct 418 ms 86272 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 24568 KB Output is correct
2 Correct 16 ms 24564 KB Output is correct
3 Correct 13 ms 24564 KB Output is correct
4 Correct 16 ms 24508 KB Output is correct
5 Correct 13 ms 24560 KB Output is correct
6 Correct 14 ms 24560 KB Output is correct
7 Correct 13 ms 24468 KB Output is correct
8 Correct 14 ms 24488 KB Output is correct
9 Correct 213 ms 61036 KB Output is correct
10 Correct 31 ms 28276 KB Output is correct
11 Correct 112 ms 44216 KB Output is correct
12 Correct 39 ms 30160 KB Output is correct
13 Correct 29 ms 28828 KB Output is correct
14 Correct 14 ms 24652 KB Output is correct
15 Correct 13 ms 24660 KB Output is correct
16 Correct 226 ms 61048 KB Output is correct
17 Correct 12 ms 24532 KB Output is correct
18 Correct 14 ms 24560 KB Output is correct
19 Correct 13 ms 24568 KB Output is correct
20 Correct 16 ms 24516 KB Output is correct
21 Correct 14 ms 24572 KB Output is correct
22 Correct 13 ms 24568 KB Output is correct
23 Correct 458 ms 87824 KB Output is correct
24 Correct 17 ms 24532 KB Output is correct
25 Correct 16 ms 24968 KB Output is correct
26 Correct 16 ms 24844 KB Output is correct
27 Correct 15 ms 24780 KB Output is correct
28 Correct 169 ms 49840 KB Output is correct
29 Correct 276 ms 62528 KB Output is correct
30 Correct 378 ms 75224 KB Output is correct
31 Correct 450 ms 87764 KB Output is correct
32 Correct 13 ms 24568 KB Output is correct
33 Correct 13 ms 24564 KB Output is correct
34 Correct 11 ms 24564 KB Output is correct
35 Correct 11 ms 24532 KB Output is correct
36 Correct 13 ms 24536 KB Output is correct
37 Correct 14 ms 24496 KB Output is correct
38 Correct 14 ms 24608 KB Output is correct
39 Correct 18 ms 24564 KB Output is correct
40 Correct 14 ms 24532 KB Output is correct
41 Correct 16 ms 24532 KB Output is correct
42 Correct 14 ms 24608 KB Output is correct
43 Correct 19 ms 24660 KB Output is correct
44 Correct 20 ms 24752 KB Output is correct
45 Correct 242 ms 55008 KB Output is correct
46 Correct 322 ms 68788 KB Output is correct
47 Correct 308 ms 68764 KB Output is correct
48 Correct 13 ms 24540 KB Output is correct
49 Correct 13 ms 24524 KB Output is correct
50 Correct 14 ms 24532 KB Output is correct
51 Correct 14 ms 24516 KB Output is correct
52 Correct 15 ms 24564 KB Output is correct
53 Correct 14 ms 24568 KB Output is correct
54 Correct 14 ms 24564 KB Output is correct
55 Correct 415 ms 83496 KB Output is correct
56 Correct 14 ms 24532 KB Output is correct
57 Correct 18 ms 25136 KB Output is correct
58 Correct 27 ms 26368 KB Output is correct
59 Correct 23 ms 25496 KB Output is correct
60 Correct 198 ms 53980 KB Output is correct
61 Correct 272 ms 64088 KB Output is correct
62 Correct 344 ms 73084 KB Output is correct
63 Correct 432 ms 83460 KB Output is correct
64 Correct 14 ms 24532 KB Output is correct
65 Correct 13 ms 24500 KB Output is correct
66 Correct 13 ms 24544 KB Output is correct
67 Correct 437 ms 94316 KB Output is correct
68 Correct 458 ms 96028 KB Output is correct
69 Correct 425 ms 94808 KB Output is correct
70 Correct 18 ms 24916 KB Output is correct
71 Correct 17 ms 25172 KB Output is correct
72 Correct 207 ms 53728 KB Output is correct
73 Correct 327 ms 68640 KB Output is correct
74 Correct 442 ms 83348 KB Output is correct
75 Correct 431 ms 89828 KB Output is correct
76 Correct 435 ms 97444 KB Output is correct
77 Correct 16 ms 24916 KB Output is correct
78 Correct 17 ms 25352 KB Output is correct
79 Correct 211 ms 55280 KB Output is correct
80 Correct 316 ms 71064 KB Output is correct
81 Correct 439 ms 86320 KB Output is correct
82 Correct 13 ms 24532 KB Output is correct
83 Correct 14 ms 24532 KB Output is correct
84 Correct 14 ms 24568 KB Output is correct
85 Correct 405 ms 81328 KB Output is correct
86 Correct 392 ms 78036 KB Output is correct
87 Correct 430 ms 77976 KB Output is correct
88 Correct 362 ms 84608 KB Output is correct
89 Correct 79 ms 35396 KB Output is correct
90 Correct 119 ms 38920 KB Output is correct
91 Correct 104 ms 38844 KB Output is correct
92 Correct 410 ms 93784 KB Output is correct
93 Correct 394 ms 93784 KB Output is correct
94 Correct 564 ms 93548 KB Output is correct
95 Correct 538 ms 93880 KB Output is correct
96 Correct 14 ms 24532 KB Output is correct
97 Correct 42 ms 28888 KB Output is correct
98 Correct 62 ms 35632 KB Output is correct
99 Correct 365 ms 83496 KB Output is correct
100 Correct 19 ms 25428 KB Output is correct
101 Correct 45 ms 28548 KB Output is correct
102 Correct 66 ms 32512 KB Output is correct
103 Correct 180 ms 47768 KB Output is correct
104 Correct 249 ms 56560 KB Output is correct
105 Correct 324 ms 65412 KB Output is correct
106 Correct 403 ms 74140 KB Output is correct
107 Correct 478 ms 82672 KB Output is correct
108 Correct 13 ms 24588 KB Output is correct
109 Correct 13 ms 24616 KB Output is correct
110 Correct 14 ms 24500 KB Output is correct
111 Correct 14 ms 24576 KB Output is correct
112 Correct 14 ms 24540 KB Output is correct
113 Correct 14 ms 24516 KB Output is correct
114 Correct 14 ms 24572 KB Output is correct
115 Correct 14 ms 24564 KB Output is correct
116 Correct 14 ms 24532 KB Output is correct
117 Correct 14 ms 24568 KB Output is correct
118 Correct 14 ms 24572 KB Output is correct
119 Correct 15 ms 24700 KB Output is correct
120 Correct 15 ms 24788 KB Output is correct
121 Correct 202 ms 55728 KB Output is correct
122 Correct 301 ms 69768 KB Output is correct
123 Correct 301 ms 69768 KB Output is correct
124 Correct 14 ms 24532 KB Output is correct
125 Correct 16 ms 24504 KB Output is correct
126 Correct 14 ms 24568 KB Output is correct
127 Correct 454 ms 95860 KB Output is correct
128 Correct 431 ms 97388 KB Output is correct
129 Correct 428 ms 96276 KB Output is correct
130 Correct 15 ms 24836 KB Output is correct
131 Correct 19 ms 25220 KB Output is correct
132 Correct 206 ms 54508 KB Output is correct
133 Correct 316 ms 69780 KB Output is correct
134 Correct 439 ms 84824 KB Output is correct
135 Correct 432 ms 96624 KB Output is correct
136 Correct 437 ms 98312 KB Output is correct
137 Correct 433 ms 79956 KB Output is correct
138 Correct 423 ms 81232 KB Output is correct
139 Correct 400 ms 82824 KB Output is correct
140 Correct 15 ms 24532 KB Output is correct
141 Correct 73 ms 34060 KB Output is correct
142 Correct 24 ms 26120 KB Output is correct
143 Correct 54 ms 30452 KB Output is correct
144 Correct 83 ms 33832 KB Output is correct
145 Correct 229 ms 54468 KB Output is correct
146 Correct 309 ms 62228 KB Output is correct
147 Correct 349 ms 69784 KB Output is correct
148 Correct 416 ms 76556 KB Output is correct
149 Correct 477 ms 84472 KB Output is correct
150 Correct 427 ms 89816 KB Output is correct
151 Correct 431 ms 97436 KB Output is correct
152 Correct 15 ms 25004 KB Output is correct
153 Correct 17 ms 25300 KB Output is correct
154 Correct 207 ms 55212 KB Output is correct
155 Correct 334 ms 70824 KB Output is correct
156 Correct 418 ms 86272 KB Output is correct
157 Correct 12 ms 24532 KB Output is correct
158 Correct 14 ms 24532 KB Output is correct
159 Correct 12 ms 24532 KB Output is correct
160 Correct 16 ms 24564 KB Output is correct
161 Correct 414 ms 77980 KB Output is correct
162 Correct 380 ms 83536 KB Output is correct
163 Correct 385 ms 80988 KB Output is correct
164 Correct 394 ms 81376 KB Output is correct
165 Correct 393 ms 80316 KB Output is correct
166 Correct 372 ms 79456 KB Output is correct
167 Runtime error 118 ms 73944 KB Execution killed with signal 6
168 Halted 0 ms 0 KB -