답안 #446645

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
446645 2021-07-22T22:19:36 Z LucaDantas 분수 공원 (IOI21_parks) C++17
70 / 100
1761 ms 186464 KB
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;

using pii = pair<int,int>;

template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { os << '['; string sep = ""; for (const auto &x : v) os << sep << x, sep = ", "; return os << ']'; }
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
template<typename A> ostream& operator<<(ostream &os, const set<A> &s) { os << '{'; string sep = ""; for (const auto &x : s) os << sep << x, sep = ", "; return os << '}'; }
template<typename A, typename B> ostream& operator<<(ostream &os, const map<A, B> &m) { os << '{'; string sep = ""; for (const auto &x : m) os << sep << x.first << " -> " << x.second, sep = ", "; return os << '}'; }

void debug() { cerr << endl; }
template<typename Ini, typename... Fim> void debug(Ini I, Fim... F) { cerr << I; if(sizeof...(F)) cerr << ", "; debug(F...);}
#define db(...) cerr << "DEBUG (" << #__VA_ARGS__ << ") == ", debug(__VA_ARGS__)

#define pb push_back
#define sz(a) ((int)(a).size())
#define all(a) (a).begin(),(a).end()
#define ff first
#define ss second

constexpr int inf = 0x3f3f3f3f;
constexpr int maxn = 8e5 + 10;

mt19937 rng(random_device{}());

int rnd(int x) { return (rng() % x + x) % x; }

vector<int> g[maxn];

int match[maxn];
bool mark[maxn];

int t, n, qtd_ruas;

bool dfs(int u) {
	mark[u] = 1;
	if(u >= qtd_ruas) return (match[u] == -1 ? 1 : dfs(match[u]));

	for(int v : g[u]) {
		if(mark[v] || !dfs(v)) continue;
		match[u] = v; match[v] = u;
		return 1;
	}

	return 0;
}

struct Road { // todas as ruas possiveis
	int x, y, tipo; // ponto inicial da rua e se é vertical ou horizontal
} ruas[maxn];

pii conecta[maxn];

struct Banco {
	int x, y;
} bancos[maxn];

map<pair<int,int>, int> mp; // salva o id dos pontos

inline void add(int a, int b) { g[a].pb(b), g[b].pb(a); }

int get(pii p) { 
	if(mp.count(p)) return mp[p];
	bancos[t] = {p.ff, p.ss};
	return mp[p] = t++;
}

bool mark2[maxn];
int vis = 0;

void vai(int x, int y) {
	++vis;
	int id = mp[pii(x, y)];
	mark2[id] = 1;
	vector<int> gld(4); iota(all(gld), 0); shuffle(all(gld), rng);
	for(int opa : gld) {
		if(opa == 0 && mp.count({x+2, y}) && !mark2[mp[pii(x+2, y)]]) {
			conecta[t] = {id, mp[pii(x+2, y)]};
			ruas[t++] = {x, y, 0};
			// db(x, y, x+2, y);
			vai(x+2, y);
		}
		if(opa == 1 && mp.count({x-2, y}) && !mark2[mp[pii(x-2, y)]]) {
			conecta[t] = {mp[pii(x-2, y)], id};
			ruas[t++] = {x-2, y, 0};
			// db(x, y, x-2, y);
			vai(x-2, y);
		}
		if(opa == 2 && mp.count({x, y+2}) && !mark2[mp[pii(x, y+2)]]) {
			conecta[t] = {id, mp[pii(x, y+2)]};
			ruas[t++] = {x, y, 1};
			// db(x, y, x, y+2);
			vai(x, y+2);
		}
		if(opa == 3 && mp.count({x, y-2}) && !mark2[mp[pii(x, y-2)]]) {
			conecta[t] = {mp[pii(x, y-2)], id};
			ruas[t++] = {x, y-2, 1};
			// db(x, y, x, y-2);
			vai(x, y-2);
		}
	}
}

int bonitao(vector<int> x, vector<int> y) {
	mp.clear(); vis = t = n = qtd_ruas = 0;
	memset(bancos, 0, sizeof bancos);
	memset(mark, 0, sizeof mark);
	memset(mark2, 0, sizeof mark2);
	memset(match, 0, sizeof match);
	for(int i = 0; i < maxn; i++)
		g[i].clear(), conecta[i] = {0, 0};
	n = sz(x);
	for(int i = 0; i < n; i++)
		mp[pii(x[i], y[i])] = i;
	int hm = rnd(n);
	vai(x[hm], y[hm]);
	if(vis != n) return -1; // impossivel, o grafo completo não é conexo
	
	qtd_ruas = t;
	for(int i = 0; i < qtd_ruas; i++) {
		auto [X, Y, tipo] = ruas[i];
		if(!tipo) {
			int aq = get({X+1, Y+1});
			add(i, aq);

			aq = get({X+1, Y-1});
			add(i, aq);
		} else {
			int aq = get({X+1, Y+1});
			add(i, aq);

			aq = get({X-1, Y+1});
			add(i, aq);
		}
	}

	int ans = 0;
	memset(match, -1, sizeof match);

	vector<int> p(qtd_ruas); iota(all(p), 0);

	for(int i = 0; i < t; i++)
		shuffle(all(g[i]), rng);

	for(int antes = -1; ans != antes;) {
		antes = ans;
		memset(mark, 0, sizeof mark);
		shuffle(all(p), rng);
		for(int i = 0; i < qtd_ruas; i++)
			if(!mark[p[i]] && match[p[i]] == -1 && dfs(p[i])) ++ans;
	}

	if(ans != qtd_ruas) return 0;
	
	vector<int> u(qtd_ruas), v(qtd_ruas), a(qtd_ruas), b(qtd_ruas);

	for(int i = 0; i < qtd_ruas; i++) {
		u[i] = conecta[i].ff, v[i] = conecta[i].ss;
		a[i] = bancos[match[i]].x, b[i] = bancos[match[i]].y;
	}
	build(u, v, a, b);
	return 1;
}

int construct_roads(vector<int> x, vector<int> y) {
	for(int i = 0; i < 2; i++) {
		int a = bonitao(x, y);
		if(a == -1) return 0;
		if(a == 0) continue;
		return 1;
	}
	assert(0);
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 36300 KB Output is correct
2 Correct 22 ms 36300 KB Output is correct
3 Correct 23 ms 36292 KB Output is correct
4 Correct 23 ms 36220 KB Output is correct
5 Correct 23 ms 36300 KB Output is correct
6 Correct 23 ms 36224 KB Output is correct
7 Correct 22 ms 36268 KB Output is correct
8 Correct 22 ms 36300 KB Output is correct
9 Correct 355 ms 87776 KB Output is correct
10 Correct 50 ms 41388 KB Output is correct
11 Correct 201 ms 65480 KB Output is correct
12 Correct 71 ms 43972 KB Output is correct
13 Correct 72 ms 43892 KB Output is correct
14 Correct 25 ms 36360 KB Output is correct
15 Correct 24 ms 36428 KB Output is correct
16 Correct 351 ms 83988 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 36300 KB Output is correct
2 Correct 22 ms 36300 KB Output is correct
3 Correct 23 ms 36292 KB Output is correct
4 Correct 23 ms 36220 KB Output is correct
5 Correct 23 ms 36300 KB Output is correct
6 Correct 23 ms 36224 KB Output is correct
7 Correct 22 ms 36268 KB Output is correct
8 Correct 22 ms 36300 KB Output is correct
9 Correct 355 ms 87776 KB Output is correct
10 Correct 50 ms 41388 KB Output is correct
11 Correct 201 ms 65480 KB Output is correct
12 Correct 71 ms 43972 KB Output is correct
13 Correct 72 ms 43892 KB Output is correct
14 Correct 25 ms 36360 KB Output is correct
15 Correct 24 ms 36428 KB Output is correct
16 Correct 351 ms 83988 KB Output is correct
17 Correct 22 ms 36300 KB Output is correct
18 Correct 23 ms 36300 KB Output is correct
19 Correct 24 ms 36216 KB Output is correct
20 Correct 22 ms 36244 KB Output is correct
21 Correct 22 ms 36292 KB Output is correct
22 Correct 23 ms 36276 KB Output is correct
23 Correct 786 ms 116936 KB Output is correct
24 Correct 23 ms 36300 KB Output is correct
25 Correct 26 ms 36748 KB Output is correct
26 Correct 25 ms 36764 KB Output is correct
27 Correct 25 ms 36684 KB Output is correct
28 Correct 293 ms 68480 KB Output is correct
29 Correct 448 ms 85724 KB Output is correct
30 Correct 608 ms 95792 KB Output is correct
31 Correct 777 ms 117700 KB Output is correct
32 Correct 24 ms 36300 KB Output is correct
33 Correct 23 ms 36300 KB Output is correct
34 Correct 23 ms 36300 KB Output is correct
35 Correct 23 ms 36224 KB Output is correct
36 Correct 22 ms 36264 KB Output is correct
37 Correct 23 ms 36220 KB Output is correct
38 Correct 24 ms 36320 KB Output is correct
39 Correct 23 ms 36292 KB Output is correct
40 Correct 23 ms 36300 KB Output is correct
41 Correct 23 ms 36276 KB Output is correct
42 Correct 24 ms 36316 KB Output is correct
43 Correct 24 ms 36516 KB Output is correct
44 Correct 24 ms 36604 KB Output is correct
45 Correct 356 ms 80192 KB Output is correct
46 Correct 543 ms 97852 KB Output is correct
47 Correct 521 ms 93392 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 36300 KB Output is correct
2 Correct 22 ms 36300 KB Output is correct
3 Correct 23 ms 36292 KB Output is correct
4 Correct 23 ms 36220 KB Output is correct
5 Correct 23 ms 36300 KB Output is correct
6 Correct 23 ms 36224 KB Output is correct
7 Correct 22 ms 36268 KB Output is correct
8 Correct 22 ms 36300 KB Output is correct
9 Correct 355 ms 87776 KB Output is correct
10 Correct 50 ms 41388 KB Output is correct
11 Correct 201 ms 65480 KB Output is correct
12 Correct 71 ms 43972 KB Output is correct
13 Correct 72 ms 43892 KB Output is correct
14 Correct 25 ms 36360 KB Output is correct
15 Correct 24 ms 36428 KB Output is correct
16 Correct 351 ms 83988 KB Output is correct
17 Correct 22 ms 36300 KB Output is correct
18 Correct 23 ms 36300 KB Output is correct
19 Correct 24 ms 36216 KB Output is correct
20 Correct 22 ms 36244 KB Output is correct
21 Correct 22 ms 36292 KB Output is correct
22 Correct 23 ms 36276 KB Output is correct
23 Correct 786 ms 116936 KB Output is correct
24 Correct 23 ms 36300 KB Output is correct
25 Correct 26 ms 36748 KB Output is correct
26 Correct 25 ms 36764 KB Output is correct
27 Correct 25 ms 36684 KB Output is correct
28 Correct 293 ms 68480 KB Output is correct
29 Correct 448 ms 85724 KB Output is correct
30 Correct 608 ms 95792 KB Output is correct
31 Correct 777 ms 117700 KB Output is correct
32 Correct 24 ms 36300 KB Output is correct
33 Correct 23 ms 36300 KB Output is correct
34 Correct 23 ms 36300 KB Output is correct
35 Correct 23 ms 36224 KB Output is correct
36 Correct 22 ms 36264 KB Output is correct
37 Correct 23 ms 36220 KB Output is correct
38 Correct 24 ms 36320 KB Output is correct
39 Correct 23 ms 36292 KB Output is correct
40 Correct 23 ms 36300 KB Output is correct
41 Correct 23 ms 36276 KB Output is correct
42 Correct 24 ms 36316 KB Output is correct
43 Correct 24 ms 36516 KB Output is correct
44 Correct 24 ms 36604 KB Output is correct
45 Correct 356 ms 80192 KB Output is correct
46 Correct 543 ms 97852 KB Output is correct
47 Correct 521 ms 93392 KB Output is correct
48 Correct 24 ms 36224 KB Output is correct
49 Correct 25 ms 36200 KB Output is correct
50 Correct 23 ms 36296 KB Output is correct
51 Correct 24 ms 36212 KB Output is correct
52 Correct 23 ms 36236 KB Output is correct
53 Correct 23 ms 36280 KB Output is correct
54 Correct 23 ms 36300 KB Output is correct
55 Correct 833 ms 114628 KB Output is correct
56 Correct 23 ms 36300 KB Output is correct
57 Correct 30 ms 36996 KB Output is correct
58 Correct 40 ms 38536 KB Output is correct
59 Correct 29 ms 37324 KB Output is correct
60 Correct 381 ms 72708 KB Output is correct
61 Correct 531 ms 88124 KB Output is correct
62 Correct 642 ms 104364 KB Output is correct
63 Correct 806 ms 107528 KB Output is correct
64 Correct 22 ms 36300 KB Output is correct
65 Correct 23 ms 36244 KB Output is correct
66 Correct 22 ms 36312 KB Output is correct
67 Correct 763 ms 146344 KB Output is correct
68 Correct 771 ms 129228 KB Output is correct
69 Correct 765 ms 128920 KB Output is correct
70 Correct 26 ms 36804 KB Output is correct
71 Correct 29 ms 37184 KB Output is correct
72 Correct 379 ms 75412 KB Output is correct
73 Correct 577 ms 97988 KB Output is correct
74 Correct 800 ms 116704 KB Output is correct
75 Correct 794 ms 117348 KB Output is correct
76 Correct 791 ms 147452 KB Output is correct
77 Correct 28 ms 36948 KB Output is correct
78 Correct 30 ms 37368 KB Output is correct
79 Correct 383 ms 76332 KB Output is correct
80 Correct 591 ms 100140 KB Output is correct
81 Correct 811 ms 117940 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 36300 KB Output is correct
2 Correct 22 ms 36300 KB Output is correct
3 Correct 23 ms 36292 KB Output is correct
4 Correct 23 ms 36220 KB Output is correct
5 Correct 23 ms 36300 KB Output is correct
6 Correct 23 ms 36224 KB Output is correct
7 Correct 22 ms 36268 KB Output is correct
8 Correct 22 ms 36300 KB Output is correct
9 Correct 355 ms 87776 KB Output is correct
10 Correct 50 ms 41388 KB Output is correct
11 Correct 201 ms 65480 KB Output is correct
12 Correct 71 ms 43972 KB Output is correct
13 Correct 72 ms 43892 KB Output is correct
14 Correct 25 ms 36360 KB Output is correct
15 Correct 24 ms 36428 KB Output is correct
16 Correct 351 ms 83988 KB Output is correct
17 Correct 22 ms 36280 KB Output is correct
18 Correct 23 ms 36300 KB Output is correct
19 Correct 23 ms 36312 KB Output is correct
20 Correct 796 ms 126744 KB Output is correct
21 Correct 830 ms 112732 KB Output is correct
22 Correct 826 ms 115260 KB Output is correct
23 Correct 667 ms 121304 KB Output is correct
24 Correct 187 ms 53444 KB Output is correct
25 Correct 189 ms 53572 KB Output is correct
26 Correct 184 ms 53576 KB Output is correct
27 Correct 675 ms 110116 KB Output is correct
28 Correct 662 ms 110148 KB Output is correct
29 Correct 964 ms 110184 KB Output is correct
30 Correct 943 ms 110020 KB Output is correct
31 Correct 24 ms 36300 KB Output is correct
32 Correct 68 ms 42248 KB Output is correct
33 Correct 93 ms 44912 KB Output is correct
34 Correct 767 ms 118068 KB Output is correct
35 Correct 32 ms 37236 KB Output is correct
36 Correct 65 ms 40748 KB Output is correct
37 Correct 100 ms 44984 KB Output is correct
38 Correct 302 ms 59796 KB Output is correct
39 Correct 428 ms 68376 KB Output is correct
40 Correct 554 ms 77252 KB Output is correct
41 Correct 691 ms 86224 KB Output is correct
42 Correct 810 ms 94788 KB Output is correct
43 Correct 23 ms 36292 KB Output is correct
44 Correct 24 ms 36248 KB Output is correct
45 Correct 23 ms 36252 KB Output is correct
46 Correct 21 ms 36240 KB Output is correct
47 Correct 22 ms 36220 KB Output is correct
48 Correct 23 ms 36300 KB Output is correct
49 Correct 23 ms 36320 KB Output is correct
50 Correct 23 ms 36300 KB Output is correct
51 Correct 23 ms 36300 KB Output is correct
52 Correct 23 ms 36256 KB Output is correct
53 Correct 23 ms 36320 KB Output is correct
54 Correct 24 ms 36584 KB Output is correct
55 Correct 24 ms 36532 KB Output is correct
56 Correct 354 ms 77108 KB Output is correct
57 Correct 532 ms 101704 KB Output is correct
58 Correct 538 ms 102796 KB Output is correct
59 Correct 23 ms 36236 KB Output is correct
60 Correct 25 ms 36240 KB Output is correct
61 Correct 21 ms 36304 KB Output is correct
62 Correct 795 ms 144320 KB Output is correct
63 Correct 773 ms 147268 KB Output is correct
64 Correct 786 ms 145860 KB Output is correct
65 Correct 26 ms 36812 KB Output is correct
66 Correct 28 ms 37212 KB Output is correct
67 Correct 373 ms 73964 KB Output is correct
68 Correct 596 ms 95208 KB Output is correct
69 Correct 794 ms 110388 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 36300 KB Output is correct
2 Correct 22 ms 36300 KB Output is correct
3 Correct 23 ms 36292 KB Output is correct
4 Correct 23 ms 36220 KB Output is correct
5 Correct 23 ms 36300 KB Output is correct
6 Correct 23 ms 36224 KB Output is correct
7 Correct 22 ms 36268 KB Output is correct
8 Correct 22 ms 36300 KB Output is correct
9 Correct 355 ms 87776 KB Output is correct
10 Correct 50 ms 41388 KB Output is correct
11 Correct 201 ms 65480 KB Output is correct
12 Correct 71 ms 43972 KB Output is correct
13 Correct 72 ms 43892 KB Output is correct
14 Correct 25 ms 36360 KB Output is correct
15 Correct 24 ms 36428 KB Output is correct
16 Correct 351 ms 83988 KB Output is correct
17 Correct 797 ms 147480 KB Output is correct
18 Correct 795 ms 140484 KB Output is correct
19 Correct 838 ms 128708 KB Output is correct
20 Correct 827 ms 101012 KB Output is correct
21 Correct 724 ms 103424 KB Output is correct
22 Correct 22 ms 36300 KB Output is correct
23 Correct 124 ms 47600 KB Output is correct
24 Correct 46 ms 38708 KB Output is correct
25 Correct 81 ms 43208 KB Output is correct
26 Correct 118 ms 47428 KB Output is correct
27 Correct 401 ms 70116 KB Output is correct
28 Correct 504 ms 79052 KB Output is correct
29 Correct 623 ms 86016 KB Output is correct
30 Correct 723 ms 94532 KB Output is correct
31 Correct 857 ms 106168 KB Output is correct
32 Correct 808 ms 115012 KB Output is correct
33 Correct 779 ms 147428 KB Output is correct
34 Correct 27 ms 37068 KB Output is correct
35 Correct 31 ms 37572 KB Output is correct
36 Correct 380 ms 73476 KB Output is correct
37 Correct 579 ms 97940 KB Output is correct
38 Correct 799 ms 117204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 36300 KB Output is correct
2 Correct 22 ms 36300 KB Output is correct
3 Correct 23 ms 36292 KB Output is correct
4 Correct 23 ms 36220 KB Output is correct
5 Correct 23 ms 36300 KB Output is correct
6 Correct 23 ms 36224 KB Output is correct
7 Correct 22 ms 36268 KB Output is correct
8 Correct 22 ms 36300 KB Output is correct
9 Correct 355 ms 87776 KB Output is correct
10 Correct 50 ms 41388 KB Output is correct
11 Correct 201 ms 65480 KB Output is correct
12 Correct 71 ms 43972 KB Output is correct
13 Correct 72 ms 43892 KB Output is correct
14 Correct 25 ms 36360 KB Output is correct
15 Correct 24 ms 36428 KB Output is correct
16 Correct 351 ms 83988 KB Output is correct
17 Correct 22 ms 36300 KB Output is correct
18 Correct 23 ms 36300 KB Output is correct
19 Correct 24 ms 36216 KB Output is correct
20 Correct 22 ms 36244 KB Output is correct
21 Correct 22 ms 36292 KB Output is correct
22 Correct 23 ms 36276 KB Output is correct
23 Correct 786 ms 116936 KB Output is correct
24 Correct 23 ms 36300 KB Output is correct
25 Correct 26 ms 36748 KB Output is correct
26 Correct 25 ms 36764 KB Output is correct
27 Correct 25 ms 36684 KB Output is correct
28 Correct 293 ms 68480 KB Output is correct
29 Correct 448 ms 85724 KB Output is correct
30 Correct 608 ms 95792 KB Output is correct
31 Correct 777 ms 117700 KB Output is correct
32 Correct 24 ms 36300 KB Output is correct
33 Correct 23 ms 36300 KB Output is correct
34 Correct 23 ms 36300 KB Output is correct
35 Correct 23 ms 36224 KB Output is correct
36 Correct 22 ms 36264 KB Output is correct
37 Correct 23 ms 36220 KB Output is correct
38 Correct 24 ms 36320 KB Output is correct
39 Correct 23 ms 36292 KB Output is correct
40 Correct 23 ms 36300 KB Output is correct
41 Correct 23 ms 36276 KB Output is correct
42 Correct 24 ms 36316 KB Output is correct
43 Correct 24 ms 36516 KB Output is correct
44 Correct 24 ms 36604 KB Output is correct
45 Correct 356 ms 80192 KB Output is correct
46 Correct 543 ms 97852 KB Output is correct
47 Correct 521 ms 93392 KB Output is correct
48 Correct 24 ms 36224 KB Output is correct
49 Correct 25 ms 36200 KB Output is correct
50 Correct 23 ms 36296 KB Output is correct
51 Correct 24 ms 36212 KB Output is correct
52 Correct 23 ms 36236 KB Output is correct
53 Correct 23 ms 36280 KB Output is correct
54 Correct 23 ms 36300 KB Output is correct
55 Correct 833 ms 114628 KB Output is correct
56 Correct 23 ms 36300 KB Output is correct
57 Correct 30 ms 36996 KB Output is correct
58 Correct 40 ms 38536 KB Output is correct
59 Correct 29 ms 37324 KB Output is correct
60 Correct 381 ms 72708 KB Output is correct
61 Correct 531 ms 88124 KB Output is correct
62 Correct 642 ms 104364 KB Output is correct
63 Correct 806 ms 107528 KB Output is correct
64 Correct 22 ms 36300 KB Output is correct
65 Correct 23 ms 36244 KB Output is correct
66 Correct 22 ms 36312 KB Output is correct
67 Correct 763 ms 146344 KB Output is correct
68 Correct 771 ms 129228 KB Output is correct
69 Correct 765 ms 128920 KB Output is correct
70 Correct 26 ms 36804 KB Output is correct
71 Correct 29 ms 37184 KB Output is correct
72 Correct 379 ms 75412 KB Output is correct
73 Correct 577 ms 97988 KB Output is correct
74 Correct 800 ms 116704 KB Output is correct
75 Correct 794 ms 117348 KB Output is correct
76 Correct 791 ms 147452 KB Output is correct
77 Correct 28 ms 36948 KB Output is correct
78 Correct 30 ms 37368 KB Output is correct
79 Correct 383 ms 76332 KB Output is correct
80 Correct 591 ms 100140 KB Output is correct
81 Correct 811 ms 117940 KB Output is correct
82 Correct 22 ms 36280 KB Output is correct
83 Correct 23 ms 36300 KB Output is correct
84 Correct 23 ms 36312 KB Output is correct
85 Correct 796 ms 126744 KB Output is correct
86 Correct 830 ms 112732 KB Output is correct
87 Correct 826 ms 115260 KB Output is correct
88 Correct 667 ms 121304 KB Output is correct
89 Correct 187 ms 53444 KB Output is correct
90 Correct 189 ms 53572 KB Output is correct
91 Correct 184 ms 53576 KB Output is correct
92 Correct 675 ms 110116 KB Output is correct
93 Correct 662 ms 110148 KB Output is correct
94 Correct 964 ms 110184 KB Output is correct
95 Correct 943 ms 110020 KB Output is correct
96 Correct 24 ms 36300 KB Output is correct
97 Correct 68 ms 42248 KB Output is correct
98 Correct 93 ms 44912 KB Output is correct
99 Correct 767 ms 118068 KB Output is correct
100 Correct 32 ms 37236 KB Output is correct
101 Correct 65 ms 40748 KB Output is correct
102 Correct 100 ms 44984 KB Output is correct
103 Correct 302 ms 59796 KB Output is correct
104 Correct 428 ms 68376 KB Output is correct
105 Correct 554 ms 77252 KB Output is correct
106 Correct 691 ms 86224 KB Output is correct
107 Correct 810 ms 94788 KB Output is correct
108 Correct 23 ms 36292 KB Output is correct
109 Correct 24 ms 36248 KB Output is correct
110 Correct 23 ms 36252 KB Output is correct
111 Correct 21 ms 36240 KB Output is correct
112 Correct 22 ms 36220 KB Output is correct
113 Correct 23 ms 36300 KB Output is correct
114 Correct 23 ms 36320 KB Output is correct
115 Correct 23 ms 36300 KB Output is correct
116 Correct 23 ms 36300 KB Output is correct
117 Correct 23 ms 36256 KB Output is correct
118 Correct 23 ms 36320 KB Output is correct
119 Correct 24 ms 36584 KB Output is correct
120 Correct 24 ms 36532 KB Output is correct
121 Correct 354 ms 77108 KB Output is correct
122 Correct 532 ms 101704 KB Output is correct
123 Correct 538 ms 102796 KB Output is correct
124 Correct 23 ms 36236 KB Output is correct
125 Correct 25 ms 36240 KB Output is correct
126 Correct 21 ms 36304 KB Output is correct
127 Correct 795 ms 144320 KB Output is correct
128 Correct 773 ms 147268 KB Output is correct
129 Correct 786 ms 145860 KB Output is correct
130 Correct 26 ms 36812 KB Output is correct
131 Correct 28 ms 37212 KB Output is correct
132 Correct 373 ms 73964 KB Output is correct
133 Correct 596 ms 95208 KB Output is correct
134 Correct 794 ms 110388 KB Output is correct
135 Correct 797 ms 147480 KB Output is correct
136 Correct 795 ms 140484 KB Output is correct
137 Correct 838 ms 128708 KB Output is correct
138 Correct 827 ms 101012 KB Output is correct
139 Correct 724 ms 103424 KB Output is correct
140 Correct 22 ms 36300 KB Output is correct
141 Correct 124 ms 47600 KB Output is correct
142 Correct 46 ms 38708 KB Output is correct
143 Correct 81 ms 43208 KB Output is correct
144 Correct 118 ms 47428 KB Output is correct
145 Correct 401 ms 70116 KB Output is correct
146 Correct 504 ms 79052 KB Output is correct
147 Correct 623 ms 86016 KB Output is correct
148 Correct 723 ms 94532 KB Output is correct
149 Correct 857 ms 106168 KB Output is correct
150 Correct 808 ms 115012 KB Output is correct
151 Correct 779 ms 147428 KB Output is correct
152 Correct 27 ms 37068 KB Output is correct
153 Correct 31 ms 37572 KB Output is correct
154 Correct 380 ms 73476 KB Output is correct
155 Correct 579 ms 97940 KB Output is correct
156 Correct 799 ms 117204 KB Output is correct
157 Correct 24 ms 36300 KB Output is correct
158 Correct 22 ms 36244 KB Output is correct
159 Correct 22 ms 36300 KB Output is correct
160 Correct 23 ms 36248 KB Output is correct
161 Runtime error 1761 ms 186464 KB Execution killed with signal 6
162 Halted 0 ms 0 KB -