#include <bits/stdc++.h>
using namespace std;
// macros
typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef pair<ll, ll> lll;
typedef tuple<int, int, int> iii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<iii> viii;
typedef vector<ll> vll;
typedef vector<lll> vlll;
#define REP(a,b,c) for(int a=int(b); a<int(c); a++)
#define RE(a,c) REP(a,0,c)
#define RE1(a,c) REP(a,1,c+1)
#define REI(a,b,c) REP(a,b,c+1)
#define REV(a,b,c) for(int a=int(c-1); a>=int(b); a--)
#define FOR(a,b) for(auto& a : b)
#define all(a) a.begin(), a.end()
#define INF 1e9
#define EPS 1e-9
#define pb push_back
#define popb pop_back
#define fi first
#define se second
#define sz size()
// input
template<class T> void IN(T& x) {cin >> x;}
template<class H, class... T> void IN(H& h, T&... t) {IN(h); IN(t...); }
// output
template<class T1, class T2> void OUT(const pair<T1,T2>& x);
template<class T> void OUT(const T& x) {cout << x;}
template<class H, class... T> void OUT(const H& h, const T&... t) {OUT(h); OUT(t...); }
template<class T1, class T2> void OUT(const pair<T1,T2>& x) {OUT(x.fi," ",x.se);}
template<class... T> void OUTL(const T&... t) {OUT(t..., "\n"); }
//===================//
// Added libraries //
//===================//
//===================//
//end added libraries//
//===================//
void program();
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
program();
}
//===================//
// begin program //
//===================//
const int MX = 5e5;
int dx4[]={-1,0,1,0};
int dy4[]={0,1,0,-1};
int dx8[]={ 0, 1, 1, 1, 0,-1,-1,-1};
int dy8[]={ 1, 1, 0,-1,-1,-1, 0, 1};
int n, t;
int R[MX], C[MX];
bitset<MX> visited;
map<ii,int> f;
set<ii> obuild;
set<ii> build;
set<ii> emp;
set<int> pq;
vi ans;
bool canDestroy(ii p) {
int x=p.fi, y=p.se;
bool foundEmpty=0;
RE(d,4) {
int nx=x+dx4[d];
int ny=y+dy4[d];
if(emp.count({nx,ny})) {
foundEmpty=1;
break;
}
}
if(!foundEmpty) return 0;
int start=0;
bool isBuild[8];
RE(d,8) {
int nx=x+dx8[d];
int ny=y+dy8[d];
isBuild[d] = build.count({nx,ny});
if(isBuild[d]) start = d;
}
RE(d,4) {
int cd=d*2;
int nd=(cd+2)%8;
if(isBuild[cd] && isBuild[nd])
isBuild[(cd+1)%8]=1;
}
bool last=0;
int pos=(start+1)%8, regions=0;
while(pos!=start) {
int nx=x+dx8[pos];
int ny=y+dy8[pos];
bool cur=(emp.count({nx,ny})&&!isBuild[pos]);
if(cur && !last) regions++;
last = cur;
pos=(pos+1)%8;
}
return regions <= 1;
}
void updateBuild(ii p) {
if(canDestroy(p)) pq.insert(f[p]);
else pq.erase(f[p]);
}
void addEmpty(ii p) {
if(emp.count(p)) return;
bool foundBuild=0;
int x=p.fi, y=p.se;
if(obuild.count({x,y})) foundBuild = 1;
RE(d,8) {
int nx=x+dx8[d];
int ny=y+dy8[d];
if(obuild.count({nx,ny})) {
foundBuild=1;
break;
}
}
if(!foundBuild) return;
emp.insert(p);
RE(d,4) {
int nx=x+dx4[d];
int ny=y+dy4[d];
if(!build.count({nx,ny}))
addEmpty({nx,ny});
}
RE(d,8) {
int nx=x+dx8[d];
int ny=y+dy8[d];
if(build.count({nx,ny}))
updateBuild({nx,ny});
}
}
void dfsPossible(ii p) {
if(!build.count(p)) return;
if(visited[f[p]]) return;
visited[f[p]] = 1;
int x=p.fi, y=p.se;
RE(d,8) {
int nx=x+dx8[d];
int ny=y+dy8[d];
dfsPossible({nx,ny});
}
}
bool isPossible() {
dfsPossible({R[1],C[1]});
RE1(i,n) if(!visited[i]) return 0;
return 1;
}
void program() {
IN(n,t);
RE1(i,n) IN(R[i],C[i]);
RE1(i,n) build.insert({R[i],C[i]});
RE1(i,n) obuild.insert({R[i],C[i]});
RE1(i,n) f[{R[i],C[i]}]=i;
visited.reset();
if(isPossible()) {
ii start = *build.begin();
start.fi--;
addEmpty(start);
}
while(!pq.empty()) {
int p = *(--pq.end());
pq.erase(p);
build.erase({R[p],C[p]});
addEmpty({R[p],C[p]});
ans.pb(p);
}
if(ans.sz == n) {
OUTL("YES");
reverse(all(ans));
FOR(i,ans) OUTL(i);
} else {
OUTL("NO");
}
}
Compilation message
skyscrapers.cpp: In function 'void program()':
skyscrapers.cpp:193:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(ans.sz == n) {
~~~~~~~^~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
384 KB |
ans=YES N=1 |
2 |
Correct |
1 ms |
384 KB |
ans=YES N=4 |
3 |
Correct |
1 ms |
384 KB |
ans=NO N=4 |
4 |
Correct |
1 ms |
384 KB |
ans=YES N=5 |
5 |
Correct |
1 ms |
384 KB |
ans=YES N=9 |
6 |
Correct |
1 ms |
384 KB |
ans=YES N=5 |
7 |
Correct |
0 ms |
384 KB |
ans=NO N=9 |
8 |
Correct |
0 ms |
384 KB |
ans=NO N=10 |
9 |
Correct |
1 ms |
384 KB |
ans=YES N=10 |
10 |
Correct |
1 ms |
384 KB |
ans=YES N=10 |
11 |
Correct |
1 ms |
384 KB |
ans=YES N=10 |
12 |
Correct |
1 ms |
384 KB |
ans=YES N=9 |
13 |
Correct |
1 ms |
384 KB |
ans=YES N=9 |
14 |
Correct |
1 ms |
384 KB |
ans=YES N=8 |
15 |
Correct |
1 ms |
384 KB |
ans=YES N=8 |
16 |
Correct |
1 ms |
384 KB |
ans=NO N=2 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
384 KB |
ans=YES N=1 |
2 |
Correct |
1 ms |
384 KB |
ans=YES N=4 |
3 |
Correct |
1 ms |
384 KB |
ans=NO N=4 |
4 |
Correct |
1 ms |
384 KB |
ans=YES N=5 |
5 |
Correct |
1 ms |
384 KB |
ans=YES N=9 |
6 |
Correct |
1 ms |
384 KB |
ans=YES N=5 |
7 |
Correct |
0 ms |
384 KB |
ans=NO N=9 |
8 |
Correct |
0 ms |
384 KB |
ans=NO N=10 |
9 |
Correct |
1 ms |
384 KB |
ans=YES N=10 |
10 |
Correct |
1 ms |
384 KB |
ans=YES N=10 |
11 |
Correct |
1 ms |
384 KB |
ans=YES N=10 |
12 |
Correct |
1 ms |
384 KB |
ans=YES N=9 |
13 |
Correct |
1 ms |
384 KB |
ans=YES N=9 |
14 |
Correct |
1 ms |
384 KB |
ans=YES N=8 |
15 |
Correct |
1 ms |
384 KB |
ans=YES N=8 |
16 |
Correct |
1 ms |
384 KB |
ans=NO N=2 |
17 |
Correct |
1 ms |
456 KB |
ans=YES N=17 |
18 |
Correct |
1 ms |
384 KB |
ans=YES N=25 |
19 |
Correct |
1 ms |
384 KB |
ans=YES N=100 |
20 |
Correct |
1 ms |
544 KB |
ans=YES N=185 |
21 |
Correct |
1 ms |
384 KB |
ans=NO N=174 |
22 |
Correct |
1 ms |
384 KB |
ans=YES N=90 |
23 |
Correct |
1 ms |
512 KB |
ans=YES N=63 |
24 |
Correct |
1 ms |
384 KB |
ans=YES N=87 |
25 |
Correct |
2 ms |
512 KB |
ans=YES N=183 |
26 |
Correct |
2 ms |
512 KB |
ans=YES N=188 |
27 |
Correct |
2 ms |
416 KB |
ans=YES N=183 |
28 |
Correct |
2 ms |
512 KB |
ans=YES N=189 |
29 |
Correct |
2 ms |
512 KB |
ans=YES N=200 |
30 |
Correct |
3 ms |
512 KB |
ans=YES N=190 |
31 |
Correct |
2 ms |
512 KB |
ans=YES N=187 |
32 |
Correct |
3 ms |
512 KB |
ans=YES N=187 |
33 |
Correct |
3 ms |
512 KB |
ans=YES N=182 |
34 |
Correct |
3 ms |
640 KB |
ans=YES N=184 |
35 |
Correct |
3 ms |
512 KB |
ans=YES N=188 |
36 |
Correct |
3 ms |
512 KB |
ans=YES N=181 |
37 |
Correct |
3 ms |
512 KB |
ans=YES N=188 |
38 |
Correct |
3 ms |
512 KB |
ans=YES N=191 |
39 |
Correct |
2 ms |
512 KB |
ans=YES N=196 |
40 |
Correct |
3 ms |
512 KB |
ans=YES N=196 |
41 |
Correct |
2 ms |
512 KB |
ans=YES N=196 |
42 |
Correct |
2 ms |
512 KB |
ans=YES N=196 |
43 |
Correct |
3 ms |
512 KB |
ans=YES N=195 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
384 KB |
ans=YES N=1 |
2 |
Correct |
1 ms |
384 KB |
ans=YES N=4 |
3 |
Correct |
1 ms |
384 KB |
ans=NO N=4 |
4 |
Correct |
1 ms |
384 KB |
ans=YES N=5 |
5 |
Correct |
1 ms |
384 KB |
ans=YES N=9 |
6 |
Correct |
1 ms |
384 KB |
ans=YES N=5 |
7 |
Correct |
0 ms |
384 KB |
ans=NO N=9 |
8 |
Correct |
0 ms |
384 KB |
ans=NO N=10 |
9 |
Correct |
1 ms |
384 KB |
ans=YES N=10 |
10 |
Correct |
1 ms |
384 KB |
ans=YES N=10 |
11 |
Correct |
1 ms |
384 KB |
ans=YES N=10 |
12 |
Correct |
1 ms |
384 KB |
ans=YES N=9 |
13 |
Correct |
1 ms |
384 KB |
ans=YES N=9 |
14 |
Correct |
1 ms |
384 KB |
ans=YES N=8 |
15 |
Correct |
1 ms |
384 KB |
ans=YES N=8 |
16 |
Correct |
1 ms |
384 KB |
ans=NO N=2 |
17 |
Correct |
1 ms |
456 KB |
ans=YES N=17 |
18 |
Correct |
1 ms |
384 KB |
ans=YES N=25 |
19 |
Correct |
1 ms |
384 KB |
ans=YES N=100 |
20 |
Correct |
1 ms |
544 KB |
ans=YES N=185 |
21 |
Correct |
1 ms |
384 KB |
ans=NO N=174 |
22 |
Correct |
1 ms |
384 KB |
ans=YES N=90 |
23 |
Correct |
1 ms |
512 KB |
ans=YES N=63 |
24 |
Correct |
1 ms |
384 KB |
ans=YES N=87 |
25 |
Correct |
2 ms |
512 KB |
ans=YES N=183 |
26 |
Correct |
2 ms |
512 KB |
ans=YES N=188 |
27 |
Correct |
2 ms |
416 KB |
ans=YES N=183 |
28 |
Correct |
2 ms |
512 KB |
ans=YES N=189 |
29 |
Correct |
2 ms |
512 KB |
ans=YES N=200 |
30 |
Correct |
3 ms |
512 KB |
ans=YES N=190 |
31 |
Correct |
2 ms |
512 KB |
ans=YES N=187 |
32 |
Correct |
3 ms |
512 KB |
ans=YES N=187 |
33 |
Correct |
3 ms |
512 KB |
ans=YES N=182 |
34 |
Correct |
3 ms |
640 KB |
ans=YES N=184 |
35 |
Correct |
3 ms |
512 KB |
ans=YES N=188 |
36 |
Correct |
3 ms |
512 KB |
ans=YES N=181 |
37 |
Correct |
3 ms |
512 KB |
ans=YES N=188 |
38 |
Correct |
3 ms |
512 KB |
ans=YES N=191 |
39 |
Correct |
2 ms |
512 KB |
ans=YES N=196 |
40 |
Correct |
3 ms |
512 KB |
ans=YES N=196 |
41 |
Correct |
2 ms |
512 KB |
ans=YES N=196 |
42 |
Correct |
2 ms |
512 KB |
ans=YES N=196 |
43 |
Correct |
3 ms |
512 KB |
ans=YES N=195 |
44 |
Correct |
2 ms |
768 KB |
ans=NO N=1934 |
45 |
Correct |
2 ms |
768 KB |
ans=NO N=1965 |
46 |
Correct |
17 ms |
1024 KB |
ans=YES N=1824 |
47 |
Correct |
18 ms |
896 KB |
ans=YES N=1981 |
48 |
Correct |
16 ms |
896 KB |
ans=YES N=1814 |
49 |
Correct |
19 ms |
896 KB |
ans=YES N=1854 |
50 |
Correct |
17 ms |
896 KB |
ans=YES N=1831 |
51 |
Correct |
19 ms |
1024 KB |
ans=YES N=2000 |
52 |
Correct |
26 ms |
1024 KB |
ans=YES N=1847 |
53 |
Correct |
26 ms |
1024 KB |
ans=YES N=1819 |
54 |
Correct |
18 ms |
896 KB |
ans=YES N=1986 |
55 |
Correct |
28 ms |
1024 KB |
ans=YES N=2000 |
56 |
Correct |
27 ms |
1144 KB |
ans=YES N=1834 |
57 |
Correct |
30 ms |
1152 KB |
ans=YES N=1860 |
58 |
Correct |
31 ms |
1272 KB |
ans=YES N=1898 |
59 |
Correct |
26 ms |
1096 KB |
ans=YES N=1832 |
60 |
Correct |
32 ms |
1408 KB |
ans=YES N=1929 |
61 |
Correct |
21 ms |
896 KB |
ans=YES N=1919 |
62 |
Correct |
27 ms |
1152 KB |
ans=YES N=1882 |
63 |
Correct |
31 ms |
1536 KB |
ans=YES N=1922 |
64 |
Correct |
22 ms |
1024 KB |
ans=YES N=1989 |
65 |
Correct |
20 ms |
1152 KB |
ans=YES N=1978 |
66 |
Correct |
24 ms |
1152 KB |
ans=YES N=1867 |
67 |
Incorrect |
26 ms |
1024 KB |
Full cells must be connected |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
768 KB |
ans=NO N=1934 |
2 |
Correct |
2 ms |
768 KB |
ans=NO N=1965 |
3 |
Correct |
16 ms |
928 KB |
ans=YES N=1824 |
4 |
Correct |
18 ms |
896 KB |
ans=YES N=1981 |
5 |
Correct |
16 ms |
896 KB |
ans=YES N=1814 |
6 |
Correct |
19 ms |
896 KB |
ans=YES N=1854 |
7 |
Correct |
17 ms |
896 KB |
ans=YES N=1831 |
8 |
Correct |
20 ms |
1016 KB |
ans=YES N=2000 |
9 |
Correct |
27 ms |
896 KB |
ans=YES N=1847 |
10 |
Correct |
23 ms |
1016 KB |
ans=YES N=1819 |
11 |
Correct |
19 ms |
896 KB |
ans=YES N=1986 |
12 |
Correct |
29 ms |
1024 KB |
ans=YES N=2000 |
13 |
Correct |
28 ms |
1152 KB |
ans=YES N=1834 |
14 |
Correct |
29 ms |
1152 KB |
ans=YES N=1860 |
15 |
Correct |
30 ms |
1152 KB |
ans=YES N=1898 |
16 |
Correct |
27 ms |
1024 KB |
ans=YES N=1832 |
17 |
Correct |
32 ms |
1408 KB |
ans=YES N=1929 |
18 |
Correct |
21 ms |
896 KB |
ans=YES N=1919 |
19 |
Correct |
27 ms |
1152 KB |
ans=YES N=1882 |
20 |
Correct |
31 ms |
1536 KB |
ans=YES N=1922 |
21 |
Correct |
22 ms |
1024 KB |
ans=YES N=1989 |
22 |
Correct |
19 ms |
1152 KB |
ans=YES N=1978 |
23 |
Correct |
24 ms |
1152 KB |
ans=YES N=1867 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
384 KB |
ans=YES N=1 |
2 |
Correct |
1 ms |
384 KB |
ans=YES N=4 |
3 |
Correct |
1 ms |
384 KB |
ans=NO N=4 |
4 |
Correct |
1 ms |
384 KB |
ans=YES N=5 |
5 |
Correct |
1 ms |
384 KB |
ans=YES N=9 |
6 |
Correct |
1 ms |
384 KB |
ans=YES N=5 |
7 |
Correct |
0 ms |
384 KB |
ans=NO N=9 |
8 |
Correct |
0 ms |
384 KB |
ans=NO N=10 |
9 |
Correct |
1 ms |
384 KB |
ans=YES N=10 |
10 |
Correct |
1 ms |
384 KB |
ans=YES N=10 |
11 |
Correct |
1 ms |
384 KB |
ans=YES N=10 |
12 |
Correct |
1 ms |
384 KB |
ans=YES N=9 |
13 |
Correct |
1 ms |
384 KB |
ans=YES N=9 |
14 |
Correct |
1 ms |
384 KB |
ans=YES N=8 |
15 |
Correct |
1 ms |
384 KB |
ans=YES N=8 |
16 |
Correct |
1 ms |
384 KB |
ans=NO N=2 |
17 |
Correct |
1 ms |
456 KB |
ans=YES N=17 |
18 |
Correct |
1 ms |
384 KB |
ans=YES N=25 |
19 |
Correct |
1 ms |
384 KB |
ans=YES N=100 |
20 |
Correct |
1 ms |
544 KB |
ans=YES N=185 |
21 |
Correct |
1 ms |
384 KB |
ans=NO N=174 |
22 |
Correct |
1 ms |
384 KB |
ans=YES N=90 |
23 |
Correct |
1 ms |
512 KB |
ans=YES N=63 |
24 |
Correct |
1 ms |
384 KB |
ans=YES N=87 |
25 |
Correct |
2 ms |
512 KB |
ans=YES N=183 |
26 |
Correct |
2 ms |
512 KB |
ans=YES N=188 |
27 |
Correct |
2 ms |
416 KB |
ans=YES N=183 |
28 |
Correct |
2 ms |
512 KB |
ans=YES N=189 |
29 |
Correct |
2 ms |
512 KB |
ans=YES N=200 |
30 |
Correct |
3 ms |
512 KB |
ans=YES N=190 |
31 |
Correct |
2 ms |
512 KB |
ans=YES N=187 |
32 |
Correct |
3 ms |
512 KB |
ans=YES N=187 |
33 |
Correct |
3 ms |
512 KB |
ans=YES N=182 |
34 |
Correct |
3 ms |
640 KB |
ans=YES N=184 |
35 |
Correct |
3 ms |
512 KB |
ans=YES N=188 |
36 |
Correct |
3 ms |
512 KB |
ans=YES N=181 |
37 |
Correct |
3 ms |
512 KB |
ans=YES N=188 |
38 |
Correct |
3 ms |
512 KB |
ans=YES N=191 |
39 |
Correct |
2 ms |
512 KB |
ans=YES N=196 |
40 |
Correct |
3 ms |
512 KB |
ans=YES N=196 |
41 |
Correct |
2 ms |
512 KB |
ans=YES N=196 |
42 |
Correct |
2 ms |
512 KB |
ans=YES N=196 |
43 |
Correct |
3 ms |
512 KB |
ans=YES N=195 |
44 |
Correct |
2 ms |
768 KB |
ans=NO N=1934 |
45 |
Correct |
2 ms |
768 KB |
ans=NO N=1965 |
46 |
Correct |
17 ms |
1024 KB |
ans=YES N=1824 |
47 |
Correct |
18 ms |
896 KB |
ans=YES N=1981 |
48 |
Correct |
16 ms |
896 KB |
ans=YES N=1814 |
49 |
Correct |
19 ms |
896 KB |
ans=YES N=1854 |
50 |
Correct |
17 ms |
896 KB |
ans=YES N=1831 |
51 |
Correct |
19 ms |
1024 KB |
ans=YES N=2000 |
52 |
Correct |
26 ms |
1024 KB |
ans=YES N=1847 |
53 |
Correct |
26 ms |
1024 KB |
ans=YES N=1819 |
54 |
Correct |
18 ms |
896 KB |
ans=YES N=1986 |
55 |
Correct |
28 ms |
1024 KB |
ans=YES N=2000 |
56 |
Correct |
27 ms |
1144 KB |
ans=YES N=1834 |
57 |
Correct |
30 ms |
1152 KB |
ans=YES N=1860 |
58 |
Correct |
31 ms |
1272 KB |
ans=YES N=1898 |
59 |
Correct |
26 ms |
1096 KB |
ans=YES N=1832 |
60 |
Correct |
32 ms |
1408 KB |
ans=YES N=1929 |
61 |
Correct |
21 ms |
896 KB |
ans=YES N=1919 |
62 |
Correct |
27 ms |
1152 KB |
ans=YES N=1882 |
63 |
Correct |
31 ms |
1536 KB |
ans=YES N=1922 |
64 |
Correct |
22 ms |
1024 KB |
ans=YES N=1989 |
65 |
Correct |
20 ms |
1152 KB |
ans=YES N=1978 |
66 |
Correct |
24 ms |
1152 KB |
ans=YES N=1867 |
67 |
Incorrect |
26 ms |
1024 KB |
Full cells must be connected |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
217 ms |
14692 KB |
ans=NO N=66151 |
2 |
Correct |
106 ms |
11384 KB |
ans=NO N=64333 |
3 |
Correct |
1033 ms |
18232 KB |
ans=YES N=69316 |
4 |
Correct |
969 ms |
17496 KB |
ans=YES N=66695 |
5 |
Correct |
1010 ms |
17868 KB |
ans=YES N=68436 |
6 |
Correct |
1006 ms |
18440 KB |
ans=YES N=70000 |
7 |
Correct |
978 ms |
17900 KB |
ans=YES N=68501 |
8 |
Correct |
1063 ms |
18216 KB |
ans=YES N=70000 |
9 |
Correct |
1100 ms |
17524 KB |
ans=YES N=65009 |
10 |
Incorrect |
1550 ms |
20280 KB |
Full cells must be connected |
11 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
768 KB |
ans=NO N=1934 |
2 |
Correct |
2 ms |
768 KB |
ans=NO N=1965 |
3 |
Correct |
16 ms |
928 KB |
ans=YES N=1824 |
4 |
Correct |
18 ms |
896 KB |
ans=YES N=1981 |
5 |
Correct |
16 ms |
896 KB |
ans=YES N=1814 |
6 |
Correct |
19 ms |
896 KB |
ans=YES N=1854 |
7 |
Correct |
17 ms |
896 KB |
ans=YES N=1831 |
8 |
Correct |
20 ms |
1016 KB |
ans=YES N=2000 |
9 |
Correct |
27 ms |
896 KB |
ans=YES N=1847 |
10 |
Correct |
23 ms |
1016 KB |
ans=YES N=1819 |
11 |
Correct |
19 ms |
896 KB |
ans=YES N=1986 |
12 |
Correct |
29 ms |
1024 KB |
ans=YES N=2000 |
13 |
Correct |
28 ms |
1152 KB |
ans=YES N=1834 |
14 |
Correct |
29 ms |
1152 KB |
ans=YES N=1860 |
15 |
Correct |
30 ms |
1152 KB |
ans=YES N=1898 |
16 |
Correct |
27 ms |
1024 KB |
ans=YES N=1832 |
17 |
Correct |
32 ms |
1408 KB |
ans=YES N=1929 |
18 |
Correct |
21 ms |
896 KB |
ans=YES N=1919 |
19 |
Correct |
27 ms |
1152 KB |
ans=YES N=1882 |
20 |
Correct |
31 ms |
1536 KB |
ans=YES N=1922 |
21 |
Correct |
22 ms |
1024 KB |
ans=YES N=1989 |
22 |
Correct |
19 ms |
1152 KB |
ans=YES N=1978 |
23 |
Correct |
24 ms |
1152 KB |
ans=YES N=1867 |
24 |
Correct |
217 ms |
14692 KB |
ans=NO N=66151 |
25 |
Correct |
106 ms |
11384 KB |
ans=NO N=64333 |
26 |
Correct |
1033 ms |
18232 KB |
ans=YES N=69316 |
27 |
Correct |
969 ms |
17496 KB |
ans=YES N=66695 |
28 |
Correct |
1010 ms |
17868 KB |
ans=YES N=68436 |
29 |
Correct |
1006 ms |
18440 KB |
ans=YES N=70000 |
30 |
Correct |
978 ms |
17900 KB |
ans=YES N=68501 |
31 |
Correct |
1063 ms |
18216 KB |
ans=YES N=70000 |
32 |
Correct |
1100 ms |
17524 KB |
ans=YES N=65009 |
33 |
Incorrect |
1550 ms |
20280 KB |
Full cells must be connected |
34 |
Halted |
0 ms |
0 KB |
- |