답안 #492806

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
492806 2021-12-09T02:46:42 Z fhvirus Building Skyscrapers (CEOI19_skyscrapers) C++17
51 / 100
556 ms 257504 KB
// Knapsack DP is harder than FFT.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll;
#define ff first
#define ss second
#define pb emplace_back
#define AI(x) begin(x),end(x)
template<class I>bool chmax(I&a,I b){return a<b?(a=b,true):false;}
template<class I>bool chmin(I&a,I b){return b<a?(a=b,true):false;} 
#ifdef OWO
#define debug(args...) SDF(#args, args)
#define OIU(args...) ostream& operator<<(ostream&O,args)
#define LKJ(S,B,E,F) template<class...T>OIU(S<T...>s){O<<B;int c=0;for(auto i:s)O<<(c++?", ":"")<<F;return O<<E;}
LKJ(vector,'[',']',i)LKJ(deque,'[',']',i)LKJ(set,'{','}',i)LKJ(multiset,'{','}',i)LKJ(unordered_set,'{','}',i)LKJ(map,'{','}',i.ff<<':'<<i.ss)LKJ(unordered_map,'{','}',i.ff<<':'<<i.ss)
template<class...T>void SDF(const char* s,T...a){int c=sizeof...(T);if(!c){cerr<<"\033[1;32mvoid\033[0m\n";return;}(cerr<<"\033[1;32m("<<s<<") = (",...,(cerr<<a<<(--c?", ":")\033[0m\n")));}
template<class T,size_t N>OIU(array<T,N>a){return O<<vector<T>(AI(a));}template<class...T>OIU(pair<T...>p){return O<<'('<<p.ff<<','<<p.ss<<')';}template<class...T>OIU(tuple<T...>t){return O<<'(',apply([&O](T...s){int c=0;(...,(O<<(c++?", ":"")<<s));},t),O<<')';}
#else
#pragma GCC optimize("Ofast")
#define debug(...) ((void)0)
#endif

#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
namespace Map {
	// from https://gist.github.com/Chillee/3bd6ee4429abb4a2e7c19959fb1490ae#file-hash-table-cpp
	struct chash {
    const int RANDOM = (long long)(make_unique<char>().get()) ^ chrono::high_resolution_clock::now().time_since_epoch().count();
    static unsigned long long hash_f(pii p) {
			unsigned long long x = p.first * 1000696969LL + p.second;
      x += 0x9e3779b97f4a7c15;
      x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
      x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
      return x ^ (x >> 31);
    }
    unsigned long long operator()(pii x) const { return hash_f(x) ^ RANDOM; }
	};
	typedef gp_hash_table<pii, int, chash> gp;
}

const int kN = 150051;
const int kB = kN * 9;
int n, t;
pii pos[kB];
Map::gp ids;

int tot = 0;
int skyToBlock[kN];
int blockToSky[kB];
bool built[kB];
int component[kB];
vector<int> inComponent[kB];
vector<int> G4[kB], G8[kB];
int infinity;

void newBlock(int r, int c) {
	pii p(r, c);
	auto it = ids.find(p);
	if (it != end(ids)) return;
	ids[p] = ++tot;
	pos[tot] = p;
	component[tot] = tot;
	inComponent[tot].pb(tot);
}

bool isAP(int i) {
	debug(i, pos[i]);
	static bool has[3][3];
	static  int com[3][3];
	static  int cu, cd, cl, cr, ci;
	for (int &j: G8[i]) {
		int x = pos[j].ff - pos[i].ff + 1;
		int y = pos[j].ss - pos[i].ss + 1;
		has[x][y] = built[j];
		com[x][y] = component[j];
	}
	cu = com[0][1]; cd = com[2][1];
	cl = com[1][0]; cr = com[1][2];
	// debug(cu, cd, cl, cr);
	// debug(has[0][0], has[0][1], has[0][2]);
	// debug(has[1][0], has[1][1], has[1][2]);
	// debug(has[2][0], has[2][1], has[2][2]);
	
	if (!has[0][1] and !has[1][2] and cu == cr and has[0][2] and
			(has[0][0] or has[1][0] or has[2][0] or has[2][1] or has[2][2]))
		return true;
	if (!has[0][1] and !has[1][0] and cu == cl and has[0][0] and
			(has[0][2] or has[1][2] or has[2][0] or has[2][1] or has[2][2]))
		return true;
	if (!has[2][1] and !has[1][2] and cd == cr and has[2][2] and
			(has[0][0] or has[1][0] or has[2][0] or has[0][1] or has[0][2]))
		return true;
	if (!has[2][1] and !has[1][0] and cd == cl and has[2][0] and
			(has[0][2] or has[1][2] or has[2][2] or has[0][0] or has[0][1]))
		return true;

	if (!has[0][1] and !has[2][1] and cu == cd and
			(has[0][0] or has[1][0] or has[2][0]) and
			(has[0][2] or has[1][2] or has[2][2]))
		return true;
	if (!has[1][0] and !has[1][2] and cl == cr and
			(has[0][0] or has[0][1] or has[0][2]) and
			(has[2][0] or has[2][1] or has[2][2]))
		return true;

	ci = component[infinity];
	if (cu == ci or cd == ci or cl == ci or cr == ci)
		return false;

	return true;
}
bool canErase[kN];
set<int, greater<int>> choose;
void updateSky(int i) {
	bool ap = isAP(skyToBlock[i]);
	if (ap and canErase[i])
		choose.erase(i);
	if (!ap and !canErase[i])
		choose.insert(i);
	canErase[i] = !ap;
}

// tissue is just a random name for timestamp
int lastUpdate[kN], tissue;
void merge(int i, int j, bool u) {
	if (i == j) return;
	if (inComponent[i].size() < inComponent[j].size())
		swap(i, j);

	for (int &v: inComponent[j]) {
		component[v] = i;
		inComponent[i].pb(v);
	}

	if (u) {
		++tissue;
		for (int &v: inComponent[j])
			for (int &w: G8[v])
				if (built[w] and lastUpdate[w] < tissue) {
					debug(w, built[w], pos[w], skyToBlock[w]);
					lastUpdate[w] = tissue;
					updateSky(blockToSky[w]);
				}
	}

	inComponent[j].clear();
}
void remove(int i) {
	built[i] = false;
	for (int &j: G4[i]) if (!built[j])
		merge(component[i], component[j], true);
}

bool vis[kB];
void dfs(int u, int &reach) {
	++reach; vis[u] = true;
	for (int &v: G8[u])
		if (built[v] and !vis[v])
			dfs(v, reach);
}

signed main(){
	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

	cin >> n >> t;

	pii minPos(1e9 + 7, 1e9 + 7);
	for (int r, c, i = 1; i <= n; ++i) {
		cin >> r >> c;
		for (int dx = -1; dx <= 1; ++dx)
			for (int dy = -1; dy <= 1; ++dy)
				newBlock(r + dx, c + dy);
		int id = ids[pii(r, c)];
		skyToBlock[i] = id;
		blockToSky[id] = i;
		built[id] = true;
		minPos = min(minPos, pii(r, c));
	}
	--minPos.ff;
	infinity = ids[minPos];
	debug("Done 1");

	for (int i = 1; i <= tot; ++i) {
		auto &[r, c] = pos[i];
		for (int dx = -1; dx <= 1; ++dx)
			for (int dy = -1; dy <= 1; ++dy) {
				if (dx == 0 and dy == 0) continue;
				pii np(r + dx, c + dy);
				auto it = ids.find(np);
				if (it == end(ids)) continue;
				int j = ids[np];

				G8[i].pb(j);
				if (dx == 0 or dy == 0) {
					G4[i].pb(j);
					if (!built[i] and !built[j])
						merge(component[i], component[j], false);
				}
			}
	}
	//for (int i = 1; i <= n; ++i)
	//	debug(i, skyToBlock[i], pos[skyToBlock[i]]);
	//for (int i = 1; i <= tot; ++i)
	//	debug(i, pos[i], built[i], G4[i], G8[i]);
	debug("Done 2");

	int reach = 0;
	dfs(skyToBlock[1], reach);
	if (reach != n) {
		cout << "NO\n";
		return 0;
	}
	debug("Done 3");

	for (int i = 1; i <= n; ++i)
		updateSky(i);

	cout << "YES\n";
	vector<int> ans;
	for (int i = 1; i <= n; ++i) {
		//debug(choose);
		int u = *begin(choose);
		choose.erase(u);
		ans.pb(u);
		remove(skyToBlock[u]);
	}

	reverse(AI(ans));
	for (int &u: ans)
		cout << u << '\n';
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 42 ms 95488 KB ans=YES N=1
2 Correct 43 ms 95456 KB ans=YES N=4
3 Correct 44 ms 95356 KB ans=NO N=4
4 Correct 45 ms 95500 KB ans=YES N=5
5 Correct 44 ms 95432 KB ans=YES N=9
6 Correct 43 ms 95420 KB ans=YES N=5
7 Correct 45 ms 95476 KB ans=NO N=9
8 Correct 45 ms 95460 KB ans=NO N=10
9 Correct 46 ms 95476 KB ans=YES N=10
10 Correct 44 ms 95392 KB ans=YES N=10
11 Correct 46 ms 95432 KB ans=YES N=10
12 Correct 44 ms 95392 KB ans=YES N=9
13 Correct 50 ms 95460 KB ans=YES N=9
14 Correct 43 ms 95428 KB ans=YES N=8
15 Correct 44 ms 95404 KB ans=YES N=8
16 Correct 44 ms 95480 KB ans=NO N=2
# 결과 실행 시간 메모리 Grader output
1 Correct 42 ms 95488 KB ans=YES N=1
2 Correct 43 ms 95456 KB ans=YES N=4
3 Correct 44 ms 95356 KB ans=NO N=4
4 Correct 45 ms 95500 KB ans=YES N=5
5 Correct 44 ms 95432 KB ans=YES N=9
6 Correct 43 ms 95420 KB ans=YES N=5
7 Correct 45 ms 95476 KB ans=NO N=9
8 Correct 45 ms 95460 KB ans=NO N=10
9 Correct 46 ms 95476 KB ans=YES N=10
10 Correct 44 ms 95392 KB ans=YES N=10
11 Correct 46 ms 95432 KB ans=YES N=10
12 Correct 44 ms 95392 KB ans=YES N=9
13 Correct 50 ms 95460 KB ans=YES N=9
14 Correct 43 ms 95428 KB ans=YES N=8
15 Correct 44 ms 95404 KB ans=YES N=8
16 Correct 44 ms 95480 KB ans=NO N=2
17 Correct 44 ms 95580 KB ans=YES N=17
18 Correct 46 ms 95504 KB ans=YES N=25
19 Correct 48 ms 95428 KB ans=YES N=100
20 Correct 45 ms 95424 KB ans=YES N=185
21 Correct 44 ms 95708 KB ans=NO N=174
22 Correct 44 ms 95420 KB ans=YES N=90
23 Correct 44 ms 95404 KB ans=YES N=63
24 Correct 45 ms 95500 KB ans=YES N=87
25 Correct 44 ms 95536 KB ans=YES N=183
26 Correct 44 ms 95600 KB ans=YES N=188
27 Correct 51 ms 95452 KB ans=YES N=183
28 Correct 49 ms 95620 KB ans=YES N=189
29 Correct 46 ms 95552 KB ans=YES N=200
30 Correct 45 ms 95604 KB ans=YES N=190
31 Correct 45 ms 95448 KB ans=YES N=187
32 Correct 46 ms 95556 KB ans=YES N=187
33 Correct 44 ms 95556 KB ans=YES N=182
34 Correct 46 ms 95492 KB ans=YES N=184
35 Correct 44 ms 95620 KB ans=YES N=188
36 Correct 48 ms 95692 KB ans=YES N=181
37 Correct 45 ms 95552 KB ans=YES N=188
38 Correct 46 ms 95552 KB ans=YES N=191
39 Correct 45 ms 95568 KB ans=YES N=196
40 Correct 46 ms 95496 KB ans=YES N=196
41 Correct 44 ms 95540 KB ans=YES N=196
42 Correct 45 ms 95484 KB ans=YES N=196
43 Correct 48 ms 95588 KB ans=YES N=195
# 결과 실행 시간 메모리 Grader output
1 Correct 42 ms 95488 KB ans=YES N=1
2 Correct 43 ms 95456 KB ans=YES N=4
3 Correct 44 ms 95356 KB ans=NO N=4
4 Correct 45 ms 95500 KB ans=YES N=5
5 Correct 44 ms 95432 KB ans=YES N=9
6 Correct 43 ms 95420 KB ans=YES N=5
7 Correct 45 ms 95476 KB ans=NO N=9
8 Correct 45 ms 95460 KB ans=NO N=10
9 Correct 46 ms 95476 KB ans=YES N=10
10 Correct 44 ms 95392 KB ans=YES N=10
11 Correct 46 ms 95432 KB ans=YES N=10
12 Correct 44 ms 95392 KB ans=YES N=9
13 Correct 50 ms 95460 KB ans=YES N=9
14 Correct 43 ms 95428 KB ans=YES N=8
15 Correct 44 ms 95404 KB ans=YES N=8
16 Correct 44 ms 95480 KB ans=NO N=2
17 Correct 44 ms 95580 KB ans=YES N=17
18 Correct 46 ms 95504 KB ans=YES N=25
19 Correct 48 ms 95428 KB ans=YES N=100
20 Correct 45 ms 95424 KB ans=YES N=185
21 Correct 44 ms 95708 KB ans=NO N=174
22 Correct 44 ms 95420 KB ans=YES N=90
23 Correct 44 ms 95404 KB ans=YES N=63
24 Correct 45 ms 95500 KB ans=YES N=87
25 Correct 44 ms 95536 KB ans=YES N=183
26 Correct 44 ms 95600 KB ans=YES N=188
27 Correct 51 ms 95452 KB ans=YES N=183
28 Correct 49 ms 95620 KB ans=YES N=189
29 Correct 46 ms 95552 KB ans=YES N=200
30 Correct 45 ms 95604 KB ans=YES N=190
31 Correct 45 ms 95448 KB ans=YES N=187
32 Correct 46 ms 95556 KB ans=YES N=187
33 Correct 44 ms 95556 KB ans=YES N=182
34 Correct 46 ms 95492 KB ans=YES N=184
35 Correct 44 ms 95620 KB ans=YES N=188
36 Correct 48 ms 95692 KB ans=YES N=181
37 Correct 45 ms 95552 KB ans=YES N=188
38 Correct 46 ms 95552 KB ans=YES N=191
39 Correct 45 ms 95568 KB ans=YES N=196
40 Correct 46 ms 95496 KB ans=YES N=196
41 Correct 44 ms 95540 KB ans=YES N=196
42 Correct 45 ms 95484 KB ans=YES N=196
43 Correct 48 ms 95588 KB ans=YES N=195
44 Correct 59 ms 98600 KB ans=NO N=1934
45 Correct 52 ms 96484 KB ans=NO N=1965
46 Correct 50 ms 95976 KB ans=YES N=1824
47 Correct 52 ms 96068 KB ans=YES N=1981
48 Correct 47 ms 95920 KB ans=YES N=1814
49 Correct 50 ms 96068 KB ans=YES N=1854
50 Correct 47 ms 96032 KB ans=YES N=1831
51 Correct 48 ms 96120 KB ans=YES N=2000
52 Correct 49 ms 96260 KB ans=YES N=1847
53 Correct 49 ms 96228 KB ans=YES N=1819
54 Correct 48 ms 96076 KB ans=YES N=1986
55 Correct 51 ms 96716 KB ans=YES N=2000
56 Correct 50 ms 96708 KB ans=YES N=1834
57 Correct 51 ms 96732 KB ans=YES N=1860
58 Correct 59 ms 96680 KB ans=YES N=1898
59 Correct 50 ms 96556 KB ans=YES N=1832
60 Correct 52 ms 96964 KB ans=YES N=1929
61 Correct 47 ms 96068 KB ans=YES N=1919
62 Correct 50 ms 96628 KB ans=YES N=1882
63 Correct 52 ms 96940 KB ans=YES N=1922
64 Correct 53 ms 96332 KB ans=YES N=1989
65 Correct 49 ms 96516 KB ans=YES N=1978
66 Correct 49 ms 96708 KB ans=YES N=1867
67 Correct 49 ms 96492 KB ans=YES N=1942
# 결과 실행 시간 메모리 Grader output
1 Correct 54 ms 98568 KB ans=NO N=1934
2 Correct 47 ms 96468 KB ans=NO N=1965
3 Correct 49 ms 96024 KB ans=YES N=1824
4 Correct 46 ms 96020 KB ans=YES N=1981
5 Correct 48 ms 95960 KB ans=YES N=1814
6 Correct 48 ms 96120 KB ans=YES N=1854
7 Correct 47 ms 96020 KB ans=YES N=1831
8 Correct 47 ms 96008 KB ans=YES N=2000
9 Correct 48 ms 96200 KB ans=YES N=1847
10 Correct 53 ms 96324 KB ans=YES N=1819
11 Correct 47 ms 96076 KB ans=YES N=1986
12 Correct 50 ms 96652 KB ans=YES N=2000
13 Correct 50 ms 96764 KB ans=YES N=1834
14 Correct 51 ms 96748 KB ans=YES N=1860
15 Correct 50 ms 96716 KB ans=YES N=1898
16 Correct 52 ms 96588 KB ans=YES N=1832
17 Correct 51 ms 96868 KB ans=YES N=1929
18 Correct 48 ms 96056 KB ans=YES N=1919
19 Correct 50 ms 96620 KB ans=YES N=1882
20 Correct 51 ms 96972 KB ans=YES N=1922
21 Correct 49 ms 96260 KB ans=YES N=1989
22 Correct 47 ms 96580 KB ans=YES N=1978
23 Correct 49 ms 96748 KB ans=YES N=1867
# 결과 실행 시간 메모리 Grader output
1 Correct 42 ms 95488 KB ans=YES N=1
2 Correct 43 ms 95456 KB ans=YES N=4
3 Correct 44 ms 95356 KB ans=NO N=4
4 Correct 45 ms 95500 KB ans=YES N=5
5 Correct 44 ms 95432 KB ans=YES N=9
6 Correct 43 ms 95420 KB ans=YES N=5
7 Correct 45 ms 95476 KB ans=NO N=9
8 Correct 45 ms 95460 KB ans=NO N=10
9 Correct 46 ms 95476 KB ans=YES N=10
10 Correct 44 ms 95392 KB ans=YES N=10
11 Correct 46 ms 95432 KB ans=YES N=10
12 Correct 44 ms 95392 KB ans=YES N=9
13 Correct 50 ms 95460 KB ans=YES N=9
14 Correct 43 ms 95428 KB ans=YES N=8
15 Correct 44 ms 95404 KB ans=YES N=8
16 Correct 44 ms 95480 KB ans=NO N=2
17 Correct 44 ms 95580 KB ans=YES N=17
18 Correct 46 ms 95504 KB ans=YES N=25
19 Correct 48 ms 95428 KB ans=YES N=100
20 Correct 45 ms 95424 KB ans=YES N=185
21 Correct 44 ms 95708 KB ans=NO N=174
22 Correct 44 ms 95420 KB ans=YES N=90
23 Correct 44 ms 95404 KB ans=YES N=63
24 Correct 45 ms 95500 KB ans=YES N=87
25 Correct 44 ms 95536 KB ans=YES N=183
26 Correct 44 ms 95600 KB ans=YES N=188
27 Correct 51 ms 95452 KB ans=YES N=183
28 Correct 49 ms 95620 KB ans=YES N=189
29 Correct 46 ms 95552 KB ans=YES N=200
30 Correct 45 ms 95604 KB ans=YES N=190
31 Correct 45 ms 95448 KB ans=YES N=187
32 Correct 46 ms 95556 KB ans=YES N=187
33 Correct 44 ms 95556 KB ans=YES N=182
34 Correct 46 ms 95492 KB ans=YES N=184
35 Correct 44 ms 95620 KB ans=YES N=188
36 Correct 48 ms 95692 KB ans=YES N=181
37 Correct 45 ms 95552 KB ans=YES N=188
38 Correct 46 ms 95552 KB ans=YES N=191
39 Correct 45 ms 95568 KB ans=YES N=196
40 Correct 46 ms 95496 KB ans=YES N=196
41 Correct 44 ms 95540 KB ans=YES N=196
42 Correct 45 ms 95484 KB ans=YES N=196
43 Correct 48 ms 95588 KB ans=YES N=195
44 Correct 59 ms 98600 KB ans=NO N=1934
45 Correct 52 ms 96484 KB ans=NO N=1965
46 Correct 50 ms 95976 KB ans=YES N=1824
47 Correct 52 ms 96068 KB ans=YES N=1981
48 Correct 47 ms 95920 KB ans=YES N=1814
49 Correct 50 ms 96068 KB ans=YES N=1854
50 Correct 47 ms 96032 KB ans=YES N=1831
51 Correct 48 ms 96120 KB ans=YES N=2000
52 Correct 49 ms 96260 KB ans=YES N=1847
53 Correct 49 ms 96228 KB ans=YES N=1819
54 Correct 48 ms 96076 KB ans=YES N=1986
55 Correct 51 ms 96716 KB ans=YES N=2000
56 Correct 50 ms 96708 KB ans=YES N=1834
57 Correct 51 ms 96732 KB ans=YES N=1860
58 Correct 59 ms 96680 KB ans=YES N=1898
59 Correct 50 ms 96556 KB ans=YES N=1832
60 Correct 52 ms 96964 KB ans=YES N=1929
61 Correct 47 ms 96068 KB ans=YES N=1919
62 Correct 50 ms 96628 KB ans=YES N=1882
63 Correct 52 ms 96940 KB ans=YES N=1922
64 Correct 53 ms 96332 KB ans=YES N=1989
65 Correct 49 ms 96516 KB ans=YES N=1978
66 Correct 49 ms 96708 KB ans=YES N=1867
67 Correct 49 ms 96492 KB ans=YES N=1942
68 Correct 146 ms 115108 KB ans=NO N=66151
69 Correct 530 ms 171020 KB ans=NO N=64333
70 Correct 208 ms 114008 KB ans=YES N=69316
71 Correct 211 ms 113512 KB ans=YES N=66695
72 Correct 218 ms 114924 KB ans=YES N=68436
73 Correct 212 ms 115252 KB ans=YES N=70000
74 Correct 228 ms 114268 KB ans=YES N=68501
75 Correct 221 ms 115924 KB ans=YES N=70000
76 Correct 256 ms 116948 KB ans=YES N=65009
77 Runtime error 342 ms 257504 KB Execution killed with signal 11
78 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 154 ms 114920 KB ans=NO N=66151
2 Correct 556 ms 170884 KB ans=NO N=64333
3 Correct 218 ms 113804 KB ans=YES N=69316
4 Correct 224 ms 113456 KB ans=YES N=66695
5 Correct 214 ms 114992 KB ans=YES N=68436
6 Correct 212 ms 115376 KB ans=YES N=70000
7 Correct 219 ms 114476 KB ans=YES N=68501
8 Correct 233 ms 115872 KB ans=YES N=70000
9 Correct 250 ms 116764 KB ans=YES N=65009
10 Runtime error 341 ms 257400 KB Execution killed with signal 11
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 54 ms 98568 KB ans=NO N=1934
2 Correct 47 ms 96468 KB ans=NO N=1965
3 Correct 49 ms 96024 KB ans=YES N=1824
4 Correct 46 ms 96020 KB ans=YES N=1981
5 Correct 48 ms 95960 KB ans=YES N=1814
6 Correct 48 ms 96120 KB ans=YES N=1854
7 Correct 47 ms 96020 KB ans=YES N=1831
8 Correct 47 ms 96008 KB ans=YES N=2000
9 Correct 48 ms 96200 KB ans=YES N=1847
10 Correct 53 ms 96324 KB ans=YES N=1819
11 Correct 47 ms 96076 KB ans=YES N=1986
12 Correct 50 ms 96652 KB ans=YES N=2000
13 Correct 50 ms 96764 KB ans=YES N=1834
14 Correct 51 ms 96748 KB ans=YES N=1860
15 Correct 50 ms 96716 KB ans=YES N=1898
16 Correct 52 ms 96588 KB ans=YES N=1832
17 Correct 51 ms 96868 KB ans=YES N=1929
18 Correct 48 ms 96056 KB ans=YES N=1919
19 Correct 50 ms 96620 KB ans=YES N=1882
20 Correct 51 ms 96972 KB ans=YES N=1922
21 Correct 49 ms 96260 KB ans=YES N=1989
22 Correct 47 ms 96580 KB ans=YES N=1978
23 Correct 49 ms 96748 KB ans=YES N=1867
24 Correct 154 ms 114920 KB ans=NO N=66151
25 Correct 556 ms 170884 KB ans=NO N=64333
26 Correct 218 ms 113804 KB ans=YES N=69316
27 Correct 224 ms 113456 KB ans=YES N=66695
28 Correct 214 ms 114992 KB ans=YES N=68436
29 Correct 212 ms 115376 KB ans=YES N=70000
30 Correct 219 ms 114476 KB ans=YES N=68501
31 Correct 233 ms 115872 KB ans=YES N=70000
32 Correct 250 ms 116764 KB ans=YES N=65009
33 Runtime error 341 ms 257400 KB Execution killed with signal 11
34 Halted 0 ms 0 KB -