#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define fi first
#define se second
#define mp make_pair
#define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const int N = (int)151111;
int dir[8][2] = {{-1,-1},{0,-1},{+1,-1},{+1,0},{+1,+1},{0,+1},{-1,+1},{-1,0}};
int adj[4][2] = {{-1,0},{+1,0},{0,-1},{0,+1}};
set<pii> graf;
map<pii, int> full;
map<pii, int> col;
set<pii> inq;
int ci[N], cj[N];
priority_queue<int> cand;
set<pii> vso;
void check(pii cur){
vso.insert(cur);
pii nx;
for(int q =0 ; q < 8 ; q ++ ){
nx = mp(cur.fi+dir[q][0],cur.se+dir[q][1]);
if(!vso.count(nx) && full.count(nx)){
check(nx);
}
}
}
void add_outside(pii cur){
pii nx;
col[cur]=0;
for(int d = 0; d < 4; d ++ ){
nx = mp(cur.fi+adj[d][0],cur.se+adj[d][1]);
if(!graf.count(nx)) continue;
if(full.count(nx)){
if(inq.count(nx)) continue;
inq.insert(nx);
col[nx]=0;
cand.push(full[nx]);
}
else{
if(!col.count(nx) || col[nx] > 0){
add_outside(nx);
}
}
}
}
void fillc(pii cur, int cl){
pii nx;
col[cur]=cl;
for(int d = 0; d < 4; d ++ ){
nx = mp(cur.fi+adj[d][0],cur.se+adj[d][1]);
if(!graf.count(nx)) continue;
if(full.count(nx)) continue;
if(col.count(nx)) continue;
fillc(nx,cl);
}
}
bool is_valid(pii xx){
vector<int> q;
pii nx;
int cnt = 0;
for(int t = 0; t < 8 ; t ++ ){
nx = mp(xx.fi + dir[t][0], xx.se + dir[t][1]);
if(full.count(nx)){
cnt ++ ;
q.push_back(-1);
}
else{
q.push_back(col[nx]);
}
}
if(cnt <= 1 || cnt >= 7) return true;
int pt, qt;
for(int t = 0 ; t < 8 ; t += 2){ // corner
pt = (t - 1 + 8) % 8;
qt = (t + 1) % 8;
if(q[t] == -1 && q[pt] >= 0 && q[pt] == q[qt]){
return false;
}
}
if(q[1] >= 0 && q[1] == q[5] && min({q[2],q[3],q[4]}) == -1 && min({q[0],q[6],q[7]}) == -1){
return false;
}
if(q[3] >= 0 && q[3] == q[7] && min({q[0],q[1],q[2]}) == -1 && min({q[4],q[5],q[6]}) == -1){
return false;
}
return true;
}
bool active[N];
int main(){
fastIO;
int n, tip;
cin >> n >> tip;
pii nx;
pii low = mp((int)1e9 + 7, (int)1e9 + 7);
for(int i = 1; i <= n; i ++ ){
cin >> ci[i] >> cj[i];
active[i]=true;
graf.insert(mp(ci[i],cj[i]));
full[mp(ci[i],cj[i])]=i;
for(int j = 0 ;j < 8; j ++ ){
nx = mp(ci[i]+dir[j][0],cj[i]+dir[j][1]);
low = min(low, nx);
graf.insert(nx);
}
}
check(mp(ci[1],cj[1]));
if(vso.size() != n){
cout << "NO\n";
return 0;
}
add_outside(low);
int cnt = 1;
for(auto v : graf){
if(full.count(v) || col.count(v)) continue;
fillc(v, cnt);
cnt ++ ;
}
int node;
vector<int> que;
int hi, wi;
for(int delet = 0; delet < n; delet ++ ){
while(!cand.empty()){
node = cand.top();
cand.pop();
if(!active[node]){
continue;
}
if(is_valid(mp(ci[node],cj[node]))){
active[node]=false;
que.push_back(node);
full.erase(mp(ci[node],cj[node]));
for(int d = 0; d < 8 ; d ++ ){
nx = mp(ci[node]+dir[d][0],cj[node]+dir[d][1]);
if(full.count(nx) && col.count(nx) && !inq.count(nx)){
inq.insert(nx);
cand.push(full[nx]);
}
}
add_outside(mp(ci[node],cj[node]));
break;
}
else{
inq.erase(mp(ci[node],cj[node]));
}
}
}
cout << "YES\n";
reverse(que.begin(), que.end());
for(auto x : que){
cout << x << " ";
}
cout << "\n";
return 0;
}
Compilation message
skyscrapers.cpp: In function 'int main()':
skyscrapers.cpp:123:19: warning: comparison of integer expressions of different signedness: 'std::set<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
123 | if(vso.size() != n){
| ~~~~~~~~~~~^~~~
skyscrapers.cpp:136:9: warning: unused variable 'hi' [-Wunused-variable]
136 | int hi, wi;
| ^~
skyscrapers.cpp:136:13: warning: unused variable 'wi' [-Wunused-variable]
136 | int hi, wi;
| ^~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
364 KB |
ans=YES N=1 |
2 |
Correct |
1 ms |
364 KB |
ans=YES N=4 |
3 |
Correct |
1 ms |
364 KB |
ans=NO N=4 |
4 |
Correct |
1 ms |
364 KB |
ans=YES N=5 |
5 |
Correct |
1 ms |
364 KB |
ans=YES N=9 |
6 |
Correct |
1 ms |
364 KB |
ans=YES N=5 |
7 |
Correct |
1 ms |
364 KB |
ans=NO N=9 |
8 |
Correct |
1 ms |
364 KB |
ans=NO N=10 |
9 |
Correct |
1 ms |
364 KB |
ans=YES N=10 |
10 |
Correct |
1 ms |
364 KB |
ans=YES N=10 |
11 |
Correct |
1 ms |
364 KB |
ans=YES N=10 |
12 |
Correct |
1 ms |
364 KB |
ans=YES N=9 |
13 |
Correct |
1 ms |
364 KB |
ans=YES N=9 |
14 |
Correct |
1 ms |
364 KB |
ans=YES N=8 |
15 |
Correct |
1 ms |
364 KB |
ans=YES N=8 |
16 |
Correct |
1 ms |
364 KB |
ans=NO N=2 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
364 KB |
ans=YES N=1 |
2 |
Correct |
1 ms |
364 KB |
ans=YES N=4 |
3 |
Correct |
1 ms |
364 KB |
ans=NO N=4 |
4 |
Correct |
1 ms |
364 KB |
ans=YES N=5 |
5 |
Correct |
1 ms |
364 KB |
ans=YES N=9 |
6 |
Correct |
1 ms |
364 KB |
ans=YES N=5 |
7 |
Correct |
1 ms |
364 KB |
ans=NO N=9 |
8 |
Correct |
1 ms |
364 KB |
ans=NO N=10 |
9 |
Correct |
1 ms |
364 KB |
ans=YES N=10 |
10 |
Correct |
1 ms |
364 KB |
ans=YES N=10 |
11 |
Correct |
1 ms |
364 KB |
ans=YES N=10 |
12 |
Correct |
1 ms |
364 KB |
ans=YES N=9 |
13 |
Correct |
1 ms |
364 KB |
ans=YES N=9 |
14 |
Correct |
1 ms |
364 KB |
ans=YES N=8 |
15 |
Correct |
1 ms |
364 KB |
ans=YES N=8 |
16 |
Correct |
1 ms |
364 KB |
ans=NO N=2 |
17 |
Correct |
1 ms |
364 KB |
ans=YES N=17 |
18 |
Correct |
1 ms |
364 KB |
ans=YES N=25 |
19 |
Correct |
1 ms |
364 KB |
ans=YES N=100 |
20 |
Correct |
2 ms |
364 KB |
ans=YES N=185 |
21 |
Correct |
1 ms |
364 KB |
ans=NO N=174 |
22 |
Correct |
1 ms |
364 KB |
ans=YES N=90 |
23 |
Correct |
2 ms |
364 KB |
ans=YES N=63 |
24 |
Correct |
1 ms |
364 KB |
ans=YES N=87 |
25 |
Correct |
2 ms |
364 KB |
ans=YES N=183 |
26 |
Correct |
2 ms |
364 KB |
ans=YES N=188 |
27 |
Correct |
2 ms |
492 KB |
ans=YES N=183 |
28 |
Correct |
2 ms |
364 KB |
ans=YES N=189 |
29 |
Correct |
2 ms |
364 KB |
ans=YES N=200 |
30 |
Correct |
3 ms |
492 KB |
ans=YES N=190 |
31 |
Correct |
2 ms |
364 KB |
ans=YES N=187 |
32 |
Correct |
2 ms |
492 KB |
ans=YES N=187 |
33 |
Correct |
3 ms |
492 KB |
ans=YES N=182 |
34 |
Correct |
3 ms |
492 KB |
ans=YES N=184 |
35 |
Correct |
3 ms |
492 KB |
ans=YES N=188 |
36 |
Correct |
3 ms |
492 KB |
ans=YES N=181 |
37 |
Correct |
3 ms |
492 KB |
ans=YES N=188 |
38 |
Correct |
3 ms |
492 KB |
ans=YES N=191 |
39 |
Correct |
2 ms |
492 KB |
ans=YES N=196 |
40 |
Correct |
2 ms |
492 KB |
ans=YES N=196 |
41 |
Correct |
2 ms |
492 KB |
ans=YES N=196 |
42 |
Correct |
2 ms |
492 KB |
ans=YES N=196 |
43 |
Correct |
3 ms |
492 KB |
ans=YES N=195 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
364 KB |
ans=YES N=1 |
2 |
Correct |
1 ms |
364 KB |
ans=YES N=4 |
3 |
Correct |
1 ms |
364 KB |
ans=NO N=4 |
4 |
Correct |
1 ms |
364 KB |
ans=YES N=5 |
5 |
Correct |
1 ms |
364 KB |
ans=YES N=9 |
6 |
Correct |
1 ms |
364 KB |
ans=YES N=5 |
7 |
Correct |
1 ms |
364 KB |
ans=NO N=9 |
8 |
Correct |
1 ms |
364 KB |
ans=NO N=10 |
9 |
Correct |
1 ms |
364 KB |
ans=YES N=10 |
10 |
Correct |
1 ms |
364 KB |
ans=YES N=10 |
11 |
Correct |
1 ms |
364 KB |
ans=YES N=10 |
12 |
Correct |
1 ms |
364 KB |
ans=YES N=9 |
13 |
Correct |
1 ms |
364 KB |
ans=YES N=9 |
14 |
Correct |
1 ms |
364 KB |
ans=YES N=8 |
15 |
Correct |
1 ms |
364 KB |
ans=YES N=8 |
16 |
Correct |
1 ms |
364 KB |
ans=NO N=2 |
17 |
Correct |
1 ms |
364 KB |
ans=YES N=17 |
18 |
Correct |
1 ms |
364 KB |
ans=YES N=25 |
19 |
Correct |
1 ms |
364 KB |
ans=YES N=100 |
20 |
Correct |
2 ms |
364 KB |
ans=YES N=185 |
21 |
Correct |
1 ms |
364 KB |
ans=NO N=174 |
22 |
Correct |
1 ms |
364 KB |
ans=YES N=90 |
23 |
Correct |
2 ms |
364 KB |
ans=YES N=63 |
24 |
Correct |
1 ms |
364 KB |
ans=YES N=87 |
25 |
Correct |
2 ms |
364 KB |
ans=YES N=183 |
26 |
Correct |
2 ms |
364 KB |
ans=YES N=188 |
27 |
Correct |
2 ms |
492 KB |
ans=YES N=183 |
28 |
Correct |
2 ms |
364 KB |
ans=YES N=189 |
29 |
Correct |
2 ms |
364 KB |
ans=YES N=200 |
30 |
Correct |
3 ms |
492 KB |
ans=YES N=190 |
31 |
Correct |
2 ms |
364 KB |
ans=YES N=187 |
32 |
Correct |
2 ms |
492 KB |
ans=YES N=187 |
33 |
Correct |
3 ms |
492 KB |
ans=YES N=182 |
34 |
Correct |
3 ms |
492 KB |
ans=YES N=184 |
35 |
Correct |
3 ms |
492 KB |
ans=YES N=188 |
36 |
Correct |
3 ms |
492 KB |
ans=YES N=181 |
37 |
Correct |
3 ms |
492 KB |
ans=YES N=188 |
38 |
Correct |
3 ms |
492 KB |
ans=YES N=191 |
39 |
Correct |
2 ms |
492 KB |
ans=YES N=196 |
40 |
Correct |
2 ms |
492 KB |
ans=YES N=196 |
41 |
Correct |
2 ms |
492 KB |
ans=YES N=196 |
42 |
Correct |
2 ms |
492 KB |
ans=YES N=196 |
43 |
Correct |
3 ms |
492 KB |
ans=YES N=195 |
44 |
Correct |
5 ms |
1388 KB |
ans=NO N=1934 |
45 |
Correct |
4 ms |
748 KB |
ans=NO N=1965 |
46 |
Correct |
17 ms |
1004 KB |
ans=YES N=1824 |
47 |
Correct |
17 ms |
1004 KB |
ans=YES N=1981 |
48 |
Correct |
15 ms |
1004 KB |
ans=YES N=1814 |
49 |
Correct |
18 ms |
1004 KB |
ans=YES N=1854 |
50 |
Correct |
16 ms |
1024 KB |
ans=YES N=1831 |
51 |
Correct |
18 ms |
1132 KB |
ans=YES N=2000 |
52 |
Correct |
20 ms |
1132 KB |
ans=YES N=1847 |
53 |
Correct |
22 ms |
1260 KB |
ans=YES N=1819 |
54 |
Correct |
18 ms |
1132 KB |
ans=YES N=1986 |
55 |
Correct |
28 ms |
1388 KB |
ans=YES N=2000 |
56 |
Correct |
26 ms |
1516 KB |
ans=YES N=1834 |
57 |
Correct |
28 ms |
1516 KB |
ans=YES N=1860 |
58 |
Correct |
28 ms |
1644 KB |
ans=YES N=1898 |
59 |
Correct |
23 ms |
1388 KB |
ans=YES N=1832 |
60 |
Correct |
28 ms |
2284 KB |
ans=YES N=1929 |
61 |
Correct |
19 ms |
1132 KB |
ans=YES N=1919 |
62 |
Correct |
25 ms |
1516 KB |
ans=YES N=1882 |
63 |
Correct |
29 ms |
2284 KB |
ans=YES N=1922 |
64 |
Correct |
18 ms |
1260 KB |
ans=YES N=1989 |
65 |
Correct |
18 ms |
1516 KB |
ans=YES N=1978 |
66 |
Correct |
20 ms |
1644 KB |
ans=YES N=1867 |
67 |
Correct |
25 ms |
1388 KB |
ans=YES N=1942 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
1260 KB |
ans=NO N=1934 |
2 |
Correct |
4 ms |
748 KB |
ans=NO N=1965 |
3 |
Correct |
15 ms |
1004 KB |
ans=YES N=1824 |
4 |
Correct |
17 ms |
1004 KB |
ans=YES N=1981 |
5 |
Correct |
19 ms |
1152 KB |
ans=YES N=1814 |
6 |
Correct |
19 ms |
1004 KB |
ans=YES N=1854 |
7 |
Correct |
16 ms |
996 KB |
ans=YES N=1831 |
8 |
Correct |
18 ms |
1132 KB |
ans=YES N=2000 |
9 |
Correct |
20 ms |
1132 KB |
ans=YES N=1847 |
10 |
Correct |
22 ms |
1260 KB |
ans=YES N=1819 |
11 |
Correct |
18 ms |
1132 KB |
ans=YES N=1986 |
12 |
Correct |
28 ms |
1388 KB |
ans=YES N=2000 |
13 |
Correct |
26 ms |
1516 KB |
ans=YES N=1834 |
14 |
Correct |
27 ms |
1516 KB |
ans=YES N=1860 |
15 |
Correct |
28 ms |
1644 KB |
ans=YES N=1898 |
16 |
Correct |
25 ms |
1388 KB |
ans=YES N=1832 |
17 |
Correct |
28 ms |
2156 KB |
ans=YES N=1929 |
18 |
Correct |
19 ms |
1152 KB |
ans=YES N=1919 |
19 |
Correct |
25 ms |
1516 KB |
ans=YES N=1882 |
20 |
Correct |
29 ms |
2296 KB |
ans=YES N=1922 |
21 |
Correct |
18 ms |
1260 KB |
ans=YES N=1989 |
22 |
Correct |
18 ms |
1516 KB |
ans=YES N=1978 |
23 |
Correct |
20 ms |
1644 KB |
ans=YES N=1867 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
364 KB |
ans=YES N=1 |
2 |
Correct |
1 ms |
364 KB |
ans=YES N=4 |
3 |
Correct |
1 ms |
364 KB |
ans=NO N=4 |
4 |
Correct |
1 ms |
364 KB |
ans=YES N=5 |
5 |
Correct |
1 ms |
364 KB |
ans=YES N=9 |
6 |
Correct |
1 ms |
364 KB |
ans=YES N=5 |
7 |
Correct |
1 ms |
364 KB |
ans=NO N=9 |
8 |
Correct |
1 ms |
364 KB |
ans=NO N=10 |
9 |
Correct |
1 ms |
364 KB |
ans=YES N=10 |
10 |
Correct |
1 ms |
364 KB |
ans=YES N=10 |
11 |
Correct |
1 ms |
364 KB |
ans=YES N=10 |
12 |
Correct |
1 ms |
364 KB |
ans=YES N=9 |
13 |
Correct |
1 ms |
364 KB |
ans=YES N=9 |
14 |
Correct |
1 ms |
364 KB |
ans=YES N=8 |
15 |
Correct |
1 ms |
364 KB |
ans=YES N=8 |
16 |
Correct |
1 ms |
364 KB |
ans=NO N=2 |
17 |
Correct |
1 ms |
364 KB |
ans=YES N=17 |
18 |
Correct |
1 ms |
364 KB |
ans=YES N=25 |
19 |
Correct |
1 ms |
364 KB |
ans=YES N=100 |
20 |
Correct |
2 ms |
364 KB |
ans=YES N=185 |
21 |
Correct |
1 ms |
364 KB |
ans=NO N=174 |
22 |
Correct |
1 ms |
364 KB |
ans=YES N=90 |
23 |
Correct |
2 ms |
364 KB |
ans=YES N=63 |
24 |
Correct |
1 ms |
364 KB |
ans=YES N=87 |
25 |
Correct |
2 ms |
364 KB |
ans=YES N=183 |
26 |
Correct |
2 ms |
364 KB |
ans=YES N=188 |
27 |
Correct |
2 ms |
492 KB |
ans=YES N=183 |
28 |
Correct |
2 ms |
364 KB |
ans=YES N=189 |
29 |
Correct |
2 ms |
364 KB |
ans=YES N=200 |
30 |
Correct |
3 ms |
492 KB |
ans=YES N=190 |
31 |
Correct |
2 ms |
364 KB |
ans=YES N=187 |
32 |
Correct |
2 ms |
492 KB |
ans=YES N=187 |
33 |
Correct |
3 ms |
492 KB |
ans=YES N=182 |
34 |
Correct |
3 ms |
492 KB |
ans=YES N=184 |
35 |
Correct |
3 ms |
492 KB |
ans=YES N=188 |
36 |
Correct |
3 ms |
492 KB |
ans=YES N=181 |
37 |
Correct |
3 ms |
492 KB |
ans=YES N=188 |
38 |
Correct |
3 ms |
492 KB |
ans=YES N=191 |
39 |
Correct |
2 ms |
492 KB |
ans=YES N=196 |
40 |
Correct |
2 ms |
492 KB |
ans=YES N=196 |
41 |
Correct |
2 ms |
492 KB |
ans=YES N=196 |
42 |
Correct |
2 ms |
492 KB |
ans=YES N=196 |
43 |
Correct |
3 ms |
492 KB |
ans=YES N=195 |
44 |
Correct |
5 ms |
1388 KB |
ans=NO N=1934 |
45 |
Correct |
4 ms |
748 KB |
ans=NO N=1965 |
46 |
Correct |
17 ms |
1004 KB |
ans=YES N=1824 |
47 |
Correct |
17 ms |
1004 KB |
ans=YES N=1981 |
48 |
Correct |
15 ms |
1004 KB |
ans=YES N=1814 |
49 |
Correct |
18 ms |
1004 KB |
ans=YES N=1854 |
50 |
Correct |
16 ms |
1024 KB |
ans=YES N=1831 |
51 |
Correct |
18 ms |
1132 KB |
ans=YES N=2000 |
52 |
Correct |
20 ms |
1132 KB |
ans=YES N=1847 |
53 |
Correct |
22 ms |
1260 KB |
ans=YES N=1819 |
54 |
Correct |
18 ms |
1132 KB |
ans=YES N=1986 |
55 |
Correct |
28 ms |
1388 KB |
ans=YES N=2000 |
56 |
Correct |
26 ms |
1516 KB |
ans=YES N=1834 |
57 |
Correct |
28 ms |
1516 KB |
ans=YES N=1860 |
58 |
Correct |
28 ms |
1644 KB |
ans=YES N=1898 |
59 |
Correct |
23 ms |
1388 KB |
ans=YES N=1832 |
60 |
Correct |
28 ms |
2284 KB |
ans=YES N=1929 |
61 |
Correct |
19 ms |
1132 KB |
ans=YES N=1919 |
62 |
Correct |
25 ms |
1516 KB |
ans=YES N=1882 |
63 |
Correct |
29 ms |
2284 KB |
ans=YES N=1922 |
64 |
Correct |
18 ms |
1260 KB |
ans=YES N=1989 |
65 |
Correct |
18 ms |
1516 KB |
ans=YES N=1978 |
66 |
Correct |
20 ms |
1644 KB |
ans=YES N=1867 |
67 |
Correct |
25 ms |
1388 KB |
ans=YES N=1942 |
68 |
Correct |
334 ms |
17816 KB |
ans=NO N=66151 |
69 |
Correct |
316 ms |
26732 KB |
ans=NO N=64333 |
70 |
Correct |
1016 ms |
23584 KB |
ans=YES N=69316 |
71 |
Correct |
943 ms |
22660 KB |
ans=YES N=66695 |
72 |
Correct |
1016 ms |
23324 KB |
ans=YES N=68436 |
73 |
Correct |
1029 ms |
24108 KB |
ans=YES N=70000 |
74 |
Correct |
1020 ms |
23816 KB |
ans=YES N=68501 |
75 |
Correct |
1050 ms |
24548 KB |
ans=YES N=70000 |
76 |
Correct |
1077 ms |
24208 KB |
ans=YES N=65009 |
77 |
Correct |
1724 ms |
31704 KB |
ans=YES N=67007 |
78 |
Correct |
1831 ms |
34980 KB |
ans=YES N=66357 |
79 |
Correct |
1885 ms |
40868 KB |
ans=YES N=65430 |
80 |
Correct |
1919 ms |
36940 KB |
ans=YES N=65790 |
81 |
Correct |
1830 ms |
34248 KB |
ans=YES N=66020 |
82 |
Correct |
1750 ms |
32612 KB |
ans=YES N=65809 |
83 |
Correct |
1285 ms |
25944 KB |
ans=YES N=65651 |
84 |
Correct |
2276 ms |
45692 KB |
ans=YES N=68040 |
85 |
Correct |
1991 ms |
42716 KB |
ans=YES N=66570 |
86 |
Correct |
1022 ms |
23348 KB |
ans=YES N=65421 |
87 |
Correct |
1118 ms |
21732 KB |
ans=YES N=68351 |
88 |
Correct |
905 ms |
22768 KB |
ans=YES N=67027 |
89 |
Correct |
1175 ms |
32540 KB |
ans=YES N=68879 |
90 |
Correct |
1254 ms |
25888 KB |
ans=YES N=67256 |
91 |
Correct |
2687 ms |
50976 KB |
ans=YES N=148315 |
92 |
Correct |
849 ms |
64312 KB |
ans=NO N=142745 |
93 |
Correct |
654 ms |
75080 KB |
ans=NO N=148443 |
94 |
Correct |
2749 ms |
49696 KB |
ans=YES N=148328 |
95 |
Correct |
2547 ms |
49948 KB |
ans=YES N=147855 |
96 |
Correct |
2584 ms |
50268 KB |
ans=YES N=150000 |
97 |
Correct |
2479 ms |
48836 KB |
ans=YES N=144725 |
98 |
Correct |
2584 ms |
50512 KB |
ans=YES N=149445 |
99 |
Correct |
2501 ms |
48888 KB |
ans=YES N=144455 |
100 |
Correct |
2467 ms |
48500 KB |
ans=YES N=143487 |
101 |
Correct |
2623 ms |
50784 KB |
ans=YES N=149688 |
102 |
Execution timed out |
3584 ms |
67428 KB |
Time limit exceeded |
103 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
330 ms |
17388 KB |
ans=NO N=66151 |
2 |
Correct |
309 ms |
26144 KB |
ans=NO N=64333 |
3 |
Correct |
1006 ms |
23012 KB |
ans=YES N=69316 |
4 |
Correct |
942 ms |
22776 KB |
ans=YES N=66695 |
5 |
Correct |
989 ms |
23356 KB |
ans=YES N=68436 |
6 |
Correct |
1022 ms |
23908 KB |
ans=YES N=70000 |
7 |
Correct |
997 ms |
23608 KB |
ans=YES N=68501 |
8 |
Correct |
1030 ms |
24548 KB |
ans=YES N=70000 |
9 |
Correct |
1072 ms |
24296 KB |
ans=YES N=65009 |
10 |
Correct |
1670 ms |
31856 KB |
ans=YES N=67007 |
11 |
Correct |
1819 ms |
35312 KB |
ans=YES N=66357 |
12 |
Correct |
1871 ms |
40664 KB |
ans=YES N=65430 |
13 |
Correct |
1905 ms |
36964 KB |
ans=YES N=65790 |
14 |
Correct |
1811 ms |
34084 KB |
ans=YES N=66020 |
15 |
Correct |
1714 ms |
32856 KB |
ans=YES N=65809 |
16 |
Correct |
1330 ms |
25668 KB |
ans=YES N=65651 |
17 |
Correct |
2377 ms |
45744 KB |
ans=YES N=68040 |
18 |
Correct |
2158 ms |
42816 KB |
ans=YES N=66570 |
19 |
Correct |
1106 ms |
23292 KB |
ans=YES N=65421 |
20 |
Correct |
1206 ms |
21816 KB |
ans=YES N=68351 |
21 |
Correct |
978 ms |
22500 KB |
ans=YES N=67027 |
22 |
Correct |
1173 ms |
32360 KB |
ans=YES N=68879 |
23 |
Correct |
1325 ms |
25828 KB |
ans=YES N=67256 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
1260 KB |
ans=NO N=1934 |
2 |
Correct |
4 ms |
748 KB |
ans=NO N=1965 |
3 |
Correct |
15 ms |
1004 KB |
ans=YES N=1824 |
4 |
Correct |
17 ms |
1004 KB |
ans=YES N=1981 |
5 |
Correct |
19 ms |
1152 KB |
ans=YES N=1814 |
6 |
Correct |
19 ms |
1004 KB |
ans=YES N=1854 |
7 |
Correct |
16 ms |
996 KB |
ans=YES N=1831 |
8 |
Correct |
18 ms |
1132 KB |
ans=YES N=2000 |
9 |
Correct |
20 ms |
1132 KB |
ans=YES N=1847 |
10 |
Correct |
22 ms |
1260 KB |
ans=YES N=1819 |
11 |
Correct |
18 ms |
1132 KB |
ans=YES N=1986 |
12 |
Correct |
28 ms |
1388 KB |
ans=YES N=2000 |
13 |
Correct |
26 ms |
1516 KB |
ans=YES N=1834 |
14 |
Correct |
27 ms |
1516 KB |
ans=YES N=1860 |
15 |
Correct |
28 ms |
1644 KB |
ans=YES N=1898 |
16 |
Correct |
25 ms |
1388 KB |
ans=YES N=1832 |
17 |
Correct |
28 ms |
2156 KB |
ans=YES N=1929 |
18 |
Correct |
19 ms |
1152 KB |
ans=YES N=1919 |
19 |
Correct |
25 ms |
1516 KB |
ans=YES N=1882 |
20 |
Correct |
29 ms |
2296 KB |
ans=YES N=1922 |
21 |
Correct |
18 ms |
1260 KB |
ans=YES N=1989 |
22 |
Correct |
18 ms |
1516 KB |
ans=YES N=1978 |
23 |
Correct |
20 ms |
1644 KB |
ans=YES N=1867 |
24 |
Correct |
330 ms |
17388 KB |
ans=NO N=66151 |
25 |
Correct |
309 ms |
26144 KB |
ans=NO N=64333 |
26 |
Correct |
1006 ms |
23012 KB |
ans=YES N=69316 |
27 |
Correct |
942 ms |
22776 KB |
ans=YES N=66695 |
28 |
Correct |
989 ms |
23356 KB |
ans=YES N=68436 |
29 |
Correct |
1022 ms |
23908 KB |
ans=YES N=70000 |
30 |
Correct |
997 ms |
23608 KB |
ans=YES N=68501 |
31 |
Correct |
1030 ms |
24548 KB |
ans=YES N=70000 |
32 |
Correct |
1072 ms |
24296 KB |
ans=YES N=65009 |
33 |
Correct |
1670 ms |
31856 KB |
ans=YES N=67007 |
34 |
Correct |
1819 ms |
35312 KB |
ans=YES N=66357 |
35 |
Correct |
1871 ms |
40664 KB |
ans=YES N=65430 |
36 |
Correct |
1905 ms |
36964 KB |
ans=YES N=65790 |
37 |
Correct |
1811 ms |
34084 KB |
ans=YES N=66020 |
38 |
Correct |
1714 ms |
32856 KB |
ans=YES N=65809 |
39 |
Correct |
1330 ms |
25668 KB |
ans=YES N=65651 |
40 |
Correct |
2377 ms |
45744 KB |
ans=YES N=68040 |
41 |
Correct |
2158 ms |
42816 KB |
ans=YES N=66570 |
42 |
Correct |
1106 ms |
23292 KB |
ans=YES N=65421 |
43 |
Correct |
1206 ms |
21816 KB |
ans=YES N=68351 |
44 |
Correct |
978 ms |
22500 KB |
ans=YES N=67027 |
45 |
Correct |
1173 ms |
32360 KB |
ans=YES N=68879 |
46 |
Correct |
1325 ms |
25828 KB |
ans=YES N=67256 |
47 |
Correct |
2769 ms |
50872 KB |
ans=YES N=148315 |
48 |
Correct |
820 ms |
64236 KB |
ans=NO N=142745 |
49 |
Correct |
621 ms |
75116 KB |
ans=NO N=148443 |
50 |
Correct |
2537 ms |
49660 KB |
ans=YES N=148328 |
51 |
Correct |
2530 ms |
49852 KB |
ans=YES N=147855 |
52 |
Correct |
2620 ms |
50396 KB |
ans=YES N=150000 |
53 |
Correct |
2557 ms |
48768 KB |
ans=YES N=144725 |
54 |
Correct |
2541 ms |
50196 KB |
ans=YES N=149445 |
55 |
Correct |
2456 ms |
48712 KB |
ans=YES N=144455 |
56 |
Correct |
2451 ms |
48860 KB |
ans=YES N=143487 |
57 |
Correct |
2625 ms |
50776 KB |
ans=YES N=149688 |
58 |
Execution timed out |
3536 ms |
67536 KB |
Time limit exceeded |
59 |
Halted |
0 ms |
0 KB |
- |