// #pragma GCC optimize ("Ofast")
// #pragma GCC target ("avx,avx2,fma")
#include"bits/stdc++.h"
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template<class x>
using ordered_set = tree<x, null_type,less<x>, rb_tree_tag,tree_order_statistics_node_update>;
// #define int long long
#define endl '\n'
#define mod 1000000007
//\
#define mod 1686876991
#define MN -1000000001
const int maxn = 150001;
const int dx[] = {-1, 1, 0, 0, 1, 1, -1, -1};
const int dy[] = {0, 0, 1, -1, -1, 1, -1, 1};
//
const int roundx[] = {1, 1, 0, -1, -1, -1, 0, 1, 1};
const int roundy[] = {0, 1, 1, 1, 0, -1, -1, -1, 0};
struct cell {int x, y, id;};
struct neal {
static uint64_t splitmix64(uint64_t x)
{
x += 0x9e3779b97f4a7c15;
x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
return x ^ (x >> 31);
}
size_t operator()(uint64_t x) const
{
static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
return splitmix64(x + FIXED_RANDOM);
}
};
int n, t, ID = 0, buf;
int x[maxn], y[maxn];
cell cells[maxn];
int dsu[4 * maxn];
vector<pair<int,int>> vec[4 * maxn];
bool out[4 * maxn];
pair<int,int> mp[4 * maxn];
unordered_map<int,unordered_map<int,int,neal>,neal> Empty, Full; // maps cell to dsu
set<cell> active, expendable;
set<pair<int,int>> S;
bool operator < (const cell& a, const cell& b) {
return a.id > b.id;
}
int Find (int x) {
return dsu[x] == x ? x : dsu[x] = Find(dsu[x]);
}
void check (const cell &c) {
auto [u, v, id] = c;
int prev = -1;
bool artic = 0, sep = 0;
vector<int> to_reset;
for (int w = 0 ; w < 9 ; w++) {
int d = w%8;
int u2 = u + roundx[d];
int v2 = v + roundy[d];
if (S.count({u2,v2})) sep = 1;
else {
if (d & 1) {
continue;
}
int cmp = Find(Empty[u2][v2]);
if (mp[cmp].first != MN and sep == 1) {
auto [pu, pv] = mp[cmp];
bool bad = 0;
for (int ww = w ; ; ww++) {
int d2 = ww % 8;
int u3 = u + roundx[d2];
int v3 = v + roundy[d2];
if (u3 == pu and v3 == pv) {
break;
}
else {
if (S.count({u3,v3})) {
bad = 1;
break;
}
}
}
if (bad) artic = 1;
}
mp[cmp] = {u2, v2};
to_reset.push_back(cmp);
sep = 0;
prev = cmp;
}
}
for (int cmp : to_reset) {
mp[cmp] = {MN,-1};
}
bool isout = 0;
if (!artic) {
for (int d = 0 ; d < 4 ; d++) {
int u2 = u + dx[d];
int v2 = v + dy[d];
if (Empty[u2].count(v2)) {
int cmp = Find(Empty[u2][v2]);
if (out[cmp]) isout = 1;
}
}
}
if (isout and !artic) expendable.insert(c);
else expendable.erase(c);
}
void Union (int a, int b) {
int x = Find(a), y = Find(b);
if (x == y) return;
if (vec[x].size() < vec[y].size()) {
out[y] |= out[x];
dsu[x] = y;
for (auto [u, v] : vec[x]) {
vec[y].push_back({u, v});
for (int d = 0 ; d < 8 ; d++) {
if (S.count({u + dx[d], v + dy[d]})) check(cells[Full[u + dx[d]][v + dy[d]]]);
}
}
vec[x].clear();
} else {
out[x] |= out[y];
dsu[y] = x;
for (auto [u, v] : vec[y]) {
vec[x].push_back({u, v});
for (int d = 0 ; d < 8 ; d++) {
if (S.count({u + dx[d], v + dy[d]})) check(cells[Full[u + dx[d]][v + dy[d]]]);
}
}
vec[y].clear();
}
}
signed main () {
cin.tie(0)->sync_with_stdio(0);
Empty.reserve(262144);
Full.reserve(262144);
Empty.max_load_factor(0.25);
Full.max_load_factor(0.25);
cin >> n >> t;
for (auto& [i, j] : mp) i = j = MN;
for (int i = 0 ; i < n ; i++) {
cin >> x[i] >> y[i];
cells[i] = {x[i], y[i], i};
Full[x[i]][y[i]] = i;
S.insert({x[i], y[i]});
active.insert(cells[i]);
}
if (n > 1) {
for (int i = 0 ; i < n ; i++) {
bool good = 0;
for (int d = 0 ; d < 8 ; d++) {
int u = x[i] + dx[d];
int v = y[i] + dy[d];
good |= Full[u].count(v);
}
if (!good) {
cout << "NO\n";
return 0;
}
}
}
/* set at leat one node as out (for reference) */ {
pair<int,int> mn = {x[0], y[0]};
for (int i = 0 ; i < n ; i++) {
mn = min(mn, {x[i], y[i]});
}
auto [u, v] = mn; u--;
int id = Empty[u][v] = ID++;
dsu[id] = id;
vec[id].push_back({u, v});
out[id] = 1;
}
for (int i = 0 ; i < n ; i++) {
for (int d = 0 ; d < 8 ; d++) {
int u = x[i] + dx[d];
int v = y[i] + dy[d];
if (!S.count({u,v}) and !Empty[u].count(v)) {
int id = Empty[u][v] = ID++;
dsu[id] = id;
vec[id].push_back({u, v});
}
}
}
for (int i = 0 ; i < n ; i++) {
for (int d = 0 ; d < 8 ; d++) {
int u = x[i] + dx[d];
int v = y[i] + dy[d];
if (!S.count({u,v})) {
for (int d2 = 0 ; d2 < 4 ; d2++) {
int u2 = u + dx[d2];
int v2 = v + dy[d2];
if (Empty[u2].count(v2)) {
Union(Empty[u][v], Empty[u2][v2]);
}
}
}
}
}
for (int i = 0 ; i < n ; i++) check(cells[i]);
cout << "YES\n";
vector<int> ans;
while (expendable.size()) {
auto [a, b, c] = *expendable.begin();
expendable.erase(expendable.begin());
ans.push_back(c + 1);
Full[a].erase(b);
int id = Empty[a][b] = ID++;
S.erase({a, b});
dsu[id] = id;
vec[id].push_back({a, b});
for (int d = 0 ; d < 4 ; d++) {
int u = a + dx[d];
int v = b + dy[d];
if (!Full[u].count(v) and !Empty[u].count(v)) {
assert(0);
int id = Empty[u][v] = ID++;
dsu[id] = id;
vec[id].push_back({u, v});
}
if (Empty[u].count(v)) {
Union(Empty[u][v], id);
}
}
for (int d = 0 ; d < 8 ; d++) {
int u = a + dx[d];
int v = b + dy[d];
if (S.count({u,v})) check(cells[Full[u][v]]);
}
}
reverse(ans.begin(), ans.end());
for (int i : ans) cout << i << "\n";
}
Compilation message
skyscrapers.cpp:17:1: warning: multi-line comment [-Wcomment]
17 | //\
| ^
skyscrapers.cpp: In function 'void check(const cell&)':
skyscrapers.cpp:68:9: warning: variable 'prev' set but not used [-Wunused-but-set-variable]
68 | int prev = -1;
| ^~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
23380 KB |
ans=YES N=1 |
2 |
Correct |
15 ms |
23408 KB |
ans=YES N=4 |
3 |
Correct |
15 ms |
23380 KB |
ans=NO N=4 |
4 |
Correct |
12 ms |
23448 KB |
ans=YES N=5 |
5 |
Correct |
13 ms |
23384 KB |
ans=YES N=9 |
6 |
Correct |
12 ms |
23500 KB |
ans=YES N=5 |
7 |
Correct |
15 ms |
23460 KB |
ans=NO N=9 |
8 |
Correct |
12 ms |
23380 KB |
ans=NO N=10 |
9 |
Correct |
13 ms |
23380 KB |
ans=YES N=10 |
10 |
Correct |
13 ms |
23396 KB |
ans=YES N=10 |
11 |
Correct |
13 ms |
23428 KB |
ans=YES N=10 |
12 |
Correct |
21 ms |
23468 KB |
ans=YES N=9 |
13 |
Correct |
14 ms |
23444 KB |
ans=YES N=9 |
14 |
Correct |
14 ms |
23468 KB |
ans=YES N=8 |
15 |
Correct |
14 ms |
23380 KB |
ans=YES N=8 |
16 |
Correct |
14 ms |
23384 KB |
ans=NO N=2 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
23380 KB |
ans=YES N=1 |
2 |
Correct |
15 ms |
23408 KB |
ans=YES N=4 |
3 |
Correct |
15 ms |
23380 KB |
ans=NO N=4 |
4 |
Correct |
12 ms |
23448 KB |
ans=YES N=5 |
5 |
Correct |
13 ms |
23384 KB |
ans=YES N=9 |
6 |
Correct |
12 ms |
23500 KB |
ans=YES N=5 |
7 |
Correct |
15 ms |
23460 KB |
ans=NO N=9 |
8 |
Correct |
12 ms |
23380 KB |
ans=NO N=10 |
9 |
Correct |
13 ms |
23380 KB |
ans=YES N=10 |
10 |
Correct |
13 ms |
23396 KB |
ans=YES N=10 |
11 |
Correct |
13 ms |
23428 KB |
ans=YES N=10 |
12 |
Correct |
21 ms |
23468 KB |
ans=YES N=9 |
13 |
Correct |
14 ms |
23444 KB |
ans=YES N=9 |
14 |
Correct |
14 ms |
23468 KB |
ans=YES N=8 |
15 |
Correct |
14 ms |
23380 KB |
ans=YES N=8 |
16 |
Correct |
14 ms |
23384 KB |
ans=NO N=2 |
17 |
Correct |
17 ms |
23488 KB |
ans=YES N=17 |
18 |
Correct |
14 ms |
23436 KB |
ans=YES N=25 |
19 |
Correct |
18 ms |
23508 KB |
ans=YES N=100 |
20 |
Correct |
17 ms |
23508 KB |
ans=YES N=185 |
21 |
Correct |
13 ms |
23508 KB |
ans=NO N=174 |
22 |
Correct |
15 ms |
23544 KB |
ans=YES N=90 |
23 |
Correct |
13 ms |
23480 KB |
ans=YES N=63 |
24 |
Correct |
14 ms |
23508 KB |
ans=YES N=87 |
25 |
Correct |
18 ms |
23508 KB |
ans=YES N=183 |
26 |
Correct |
18 ms |
23508 KB |
ans=YES N=188 |
27 |
Correct |
20 ms |
23528 KB |
ans=YES N=183 |
28 |
Correct |
20 ms |
23508 KB |
ans=YES N=189 |
29 |
Correct |
19 ms |
23568 KB |
ans=YES N=200 |
30 |
Correct |
17 ms |
23568 KB |
ans=YES N=190 |
31 |
Correct |
15 ms |
23508 KB |
ans=YES N=187 |
32 |
Correct |
15 ms |
23508 KB |
ans=YES N=187 |
33 |
Correct |
17 ms |
23508 KB |
ans=YES N=182 |
34 |
Correct |
20 ms |
23580 KB |
ans=YES N=184 |
35 |
Correct |
18 ms |
23568 KB |
ans=YES N=188 |
36 |
Correct |
17 ms |
23508 KB |
ans=YES N=181 |
37 |
Correct |
18 ms |
23612 KB |
ans=YES N=188 |
38 |
Correct |
22 ms |
23508 KB |
ans=YES N=191 |
39 |
Correct |
15 ms |
23472 KB |
ans=YES N=196 |
40 |
Correct |
19 ms |
23488 KB |
ans=YES N=196 |
41 |
Correct |
19 ms |
23548 KB |
ans=YES N=196 |
42 |
Correct |
15 ms |
23508 KB |
ans=YES N=196 |
43 |
Correct |
28 ms |
23552 KB |
ans=YES N=195 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
23380 KB |
ans=YES N=1 |
2 |
Correct |
15 ms |
23408 KB |
ans=YES N=4 |
3 |
Correct |
15 ms |
23380 KB |
ans=NO N=4 |
4 |
Correct |
12 ms |
23448 KB |
ans=YES N=5 |
5 |
Correct |
13 ms |
23384 KB |
ans=YES N=9 |
6 |
Correct |
12 ms |
23500 KB |
ans=YES N=5 |
7 |
Correct |
15 ms |
23460 KB |
ans=NO N=9 |
8 |
Correct |
12 ms |
23380 KB |
ans=NO N=10 |
9 |
Correct |
13 ms |
23380 KB |
ans=YES N=10 |
10 |
Correct |
13 ms |
23396 KB |
ans=YES N=10 |
11 |
Correct |
13 ms |
23428 KB |
ans=YES N=10 |
12 |
Correct |
21 ms |
23468 KB |
ans=YES N=9 |
13 |
Correct |
14 ms |
23444 KB |
ans=YES N=9 |
14 |
Correct |
14 ms |
23468 KB |
ans=YES N=8 |
15 |
Correct |
14 ms |
23380 KB |
ans=YES N=8 |
16 |
Correct |
14 ms |
23384 KB |
ans=NO N=2 |
17 |
Correct |
17 ms |
23488 KB |
ans=YES N=17 |
18 |
Correct |
14 ms |
23436 KB |
ans=YES N=25 |
19 |
Correct |
18 ms |
23508 KB |
ans=YES N=100 |
20 |
Correct |
17 ms |
23508 KB |
ans=YES N=185 |
21 |
Correct |
13 ms |
23508 KB |
ans=NO N=174 |
22 |
Correct |
15 ms |
23544 KB |
ans=YES N=90 |
23 |
Correct |
13 ms |
23480 KB |
ans=YES N=63 |
24 |
Correct |
14 ms |
23508 KB |
ans=YES N=87 |
25 |
Correct |
18 ms |
23508 KB |
ans=YES N=183 |
26 |
Correct |
18 ms |
23508 KB |
ans=YES N=188 |
27 |
Correct |
20 ms |
23528 KB |
ans=YES N=183 |
28 |
Correct |
20 ms |
23508 KB |
ans=YES N=189 |
29 |
Correct |
19 ms |
23568 KB |
ans=YES N=200 |
30 |
Correct |
17 ms |
23568 KB |
ans=YES N=190 |
31 |
Correct |
15 ms |
23508 KB |
ans=YES N=187 |
32 |
Correct |
15 ms |
23508 KB |
ans=YES N=187 |
33 |
Correct |
17 ms |
23508 KB |
ans=YES N=182 |
34 |
Correct |
20 ms |
23580 KB |
ans=YES N=184 |
35 |
Correct |
18 ms |
23568 KB |
ans=YES N=188 |
36 |
Correct |
17 ms |
23508 KB |
ans=YES N=181 |
37 |
Correct |
18 ms |
23612 KB |
ans=YES N=188 |
38 |
Correct |
22 ms |
23508 KB |
ans=YES N=191 |
39 |
Correct |
15 ms |
23472 KB |
ans=YES N=196 |
40 |
Correct |
19 ms |
23488 KB |
ans=YES N=196 |
41 |
Correct |
19 ms |
23548 KB |
ans=YES N=196 |
42 |
Correct |
15 ms |
23508 KB |
ans=YES N=196 |
43 |
Correct |
28 ms |
23552 KB |
ans=YES N=195 |
44 |
Correct |
16 ms |
24136 KB |
ans=NO N=1934 |
45 |
Correct |
15 ms |
23852 KB |
ans=NO N=1965 |
46 |
Correct |
45 ms |
23984 KB |
ans=YES N=1824 |
47 |
Correct |
43 ms |
24016 KB |
ans=YES N=1981 |
48 |
Correct |
39 ms |
23940 KB |
ans=YES N=1814 |
49 |
Correct |
50 ms |
24040 KB |
ans=YES N=1854 |
50 |
Correct |
57 ms |
24056 KB |
ans=YES N=1831 |
51 |
Correct |
52 ms |
24008 KB |
ans=YES N=2000 |
52 |
Correct |
55 ms |
24088 KB |
ans=YES N=1847 |
53 |
Correct |
64 ms |
24140 KB |
ans=YES N=1819 |
54 |
Correct |
57 ms |
23956 KB |
ans=YES N=1986 |
55 |
Correct |
87 ms |
24344 KB |
ans=YES N=2000 |
56 |
Correct |
89 ms |
24468 KB |
ans=YES N=1834 |
57 |
Correct |
87 ms |
24432 KB |
ans=YES N=1860 |
58 |
Correct |
109 ms |
24396 KB |
ans=YES N=1898 |
59 |
Correct |
79 ms |
24236 KB |
ans=YES N=1832 |
60 |
Correct |
107 ms |
24704 KB |
ans=YES N=1929 |
61 |
Correct |
50 ms |
24116 KB |
ans=YES N=1919 |
62 |
Correct |
84 ms |
24404 KB |
ans=YES N=1882 |
63 |
Correct |
125 ms |
24796 KB |
ans=YES N=1922 |
64 |
Correct |
52 ms |
24428 KB |
ans=YES N=1989 |
65 |
Correct |
76 ms |
24268 KB |
ans=YES N=1978 |
66 |
Correct |
77 ms |
24752 KB |
ans=YES N=1867 |
67 |
Correct |
86 ms |
24236 KB |
ans=YES N=1942 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
24148 KB |
ans=NO N=1934 |
2 |
Correct |
14 ms |
23836 KB |
ans=NO N=1965 |
3 |
Correct |
40 ms |
23892 KB |
ans=YES N=1824 |
4 |
Correct |
43 ms |
24020 KB |
ans=YES N=1981 |
5 |
Correct |
40 ms |
23892 KB |
ans=YES N=1814 |
6 |
Correct |
47 ms |
24144 KB |
ans=YES N=1854 |
7 |
Correct |
50 ms |
23996 KB |
ans=YES N=1831 |
8 |
Correct |
47 ms |
24048 KB |
ans=YES N=2000 |
9 |
Correct |
52 ms |
24072 KB |
ans=YES N=1847 |
10 |
Correct |
58 ms |
24104 KB |
ans=YES N=1819 |
11 |
Correct |
43 ms |
24012 KB |
ans=YES N=1986 |
12 |
Correct |
77 ms |
24372 KB |
ans=YES N=2000 |
13 |
Correct |
101 ms |
24592 KB |
ans=YES N=1834 |
14 |
Correct |
92 ms |
24440 KB |
ans=YES N=1860 |
15 |
Correct |
88 ms |
24500 KB |
ans=YES N=1898 |
16 |
Correct |
72 ms |
24272 KB |
ans=YES N=1832 |
17 |
Correct |
110 ms |
24704 KB |
ans=YES N=1929 |
18 |
Correct |
52 ms |
24012 KB |
ans=YES N=1919 |
19 |
Correct |
88 ms |
24416 KB |
ans=YES N=1882 |
20 |
Correct |
108 ms |
24820 KB |
ans=YES N=1922 |
21 |
Correct |
50 ms |
24332 KB |
ans=YES N=1989 |
22 |
Correct |
70 ms |
24336 KB |
ans=YES N=1978 |
23 |
Correct |
76 ms |
24764 KB |
ans=YES N=1867 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
23380 KB |
ans=YES N=1 |
2 |
Correct |
15 ms |
23408 KB |
ans=YES N=4 |
3 |
Correct |
15 ms |
23380 KB |
ans=NO N=4 |
4 |
Correct |
12 ms |
23448 KB |
ans=YES N=5 |
5 |
Correct |
13 ms |
23384 KB |
ans=YES N=9 |
6 |
Correct |
12 ms |
23500 KB |
ans=YES N=5 |
7 |
Correct |
15 ms |
23460 KB |
ans=NO N=9 |
8 |
Correct |
12 ms |
23380 KB |
ans=NO N=10 |
9 |
Correct |
13 ms |
23380 KB |
ans=YES N=10 |
10 |
Correct |
13 ms |
23396 KB |
ans=YES N=10 |
11 |
Correct |
13 ms |
23428 KB |
ans=YES N=10 |
12 |
Correct |
21 ms |
23468 KB |
ans=YES N=9 |
13 |
Correct |
14 ms |
23444 KB |
ans=YES N=9 |
14 |
Correct |
14 ms |
23468 KB |
ans=YES N=8 |
15 |
Correct |
14 ms |
23380 KB |
ans=YES N=8 |
16 |
Correct |
14 ms |
23384 KB |
ans=NO N=2 |
17 |
Correct |
17 ms |
23488 KB |
ans=YES N=17 |
18 |
Correct |
14 ms |
23436 KB |
ans=YES N=25 |
19 |
Correct |
18 ms |
23508 KB |
ans=YES N=100 |
20 |
Correct |
17 ms |
23508 KB |
ans=YES N=185 |
21 |
Correct |
13 ms |
23508 KB |
ans=NO N=174 |
22 |
Correct |
15 ms |
23544 KB |
ans=YES N=90 |
23 |
Correct |
13 ms |
23480 KB |
ans=YES N=63 |
24 |
Correct |
14 ms |
23508 KB |
ans=YES N=87 |
25 |
Correct |
18 ms |
23508 KB |
ans=YES N=183 |
26 |
Correct |
18 ms |
23508 KB |
ans=YES N=188 |
27 |
Correct |
20 ms |
23528 KB |
ans=YES N=183 |
28 |
Correct |
20 ms |
23508 KB |
ans=YES N=189 |
29 |
Correct |
19 ms |
23568 KB |
ans=YES N=200 |
30 |
Correct |
17 ms |
23568 KB |
ans=YES N=190 |
31 |
Correct |
15 ms |
23508 KB |
ans=YES N=187 |
32 |
Correct |
15 ms |
23508 KB |
ans=YES N=187 |
33 |
Correct |
17 ms |
23508 KB |
ans=YES N=182 |
34 |
Correct |
20 ms |
23580 KB |
ans=YES N=184 |
35 |
Correct |
18 ms |
23568 KB |
ans=YES N=188 |
36 |
Correct |
17 ms |
23508 KB |
ans=YES N=181 |
37 |
Correct |
18 ms |
23612 KB |
ans=YES N=188 |
38 |
Correct |
22 ms |
23508 KB |
ans=YES N=191 |
39 |
Correct |
15 ms |
23472 KB |
ans=YES N=196 |
40 |
Correct |
19 ms |
23488 KB |
ans=YES N=196 |
41 |
Correct |
19 ms |
23548 KB |
ans=YES N=196 |
42 |
Correct |
15 ms |
23508 KB |
ans=YES N=196 |
43 |
Correct |
28 ms |
23552 KB |
ans=YES N=195 |
44 |
Correct |
16 ms |
24136 KB |
ans=NO N=1934 |
45 |
Correct |
15 ms |
23852 KB |
ans=NO N=1965 |
46 |
Correct |
45 ms |
23984 KB |
ans=YES N=1824 |
47 |
Correct |
43 ms |
24016 KB |
ans=YES N=1981 |
48 |
Correct |
39 ms |
23940 KB |
ans=YES N=1814 |
49 |
Correct |
50 ms |
24040 KB |
ans=YES N=1854 |
50 |
Correct |
57 ms |
24056 KB |
ans=YES N=1831 |
51 |
Correct |
52 ms |
24008 KB |
ans=YES N=2000 |
52 |
Correct |
55 ms |
24088 KB |
ans=YES N=1847 |
53 |
Correct |
64 ms |
24140 KB |
ans=YES N=1819 |
54 |
Correct |
57 ms |
23956 KB |
ans=YES N=1986 |
55 |
Correct |
87 ms |
24344 KB |
ans=YES N=2000 |
56 |
Correct |
89 ms |
24468 KB |
ans=YES N=1834 |
57 |
Correct |
87 ms |
24432 KB |
ans=YES N=1860 |
58 |
Correct |
109 ms |
24396 KB |
ans=YES N=1898 |
59 |
Correct |
79 ms |
24236 KB |
ans=YES N=1832 |
60 |
Correct |
107 ms |
24704 KB |
ans=YES N=1929 |
61 |
Correct |
50 ms |
24116 KB |
ans=YES N=1919 |
62 |
Correct |
84 ms |
24404 KB |
ans=YES N=1882 |
63 |
Correct |
125 ms |
24796 KB |
ans=YES N=1922 |
64 |
Correct |
52 ms |
24428 KB |
ans=YES N=1989 |
65 |
Correct |
76 ms |
24268 KB |
ans=YES N=1978 |
66 |
Correct |
77 ms |
24752 KB |
ans=YES N=1867 |
67 |
Correct |
86 ms |
24236 KB |
ans=YES N=1942 |
68 |
Correct |
105 ms |
34684 KB |
ans=NO N=66151 |
69 |
Correct |
105 ms |
34772 KB |
ans=NO N=64333 |
70 |
Correct |
1804 ms |
39708 KB |
ans=YES N=69316 |
71 |
Correct |
1609 ms |
39252 KB |
ans=YES N=66695 |
72 |
Correct |
1719 ms |
39780 KB |
ans=YES N=68436 |
73 |
Correct |
1890 ms |
40284 KB |
ans=YES N=70000 |
74 |
Correct |
1772 ms |
39984 KB |
ans=YES N=68501 |
75 |
Correct |
1950 ms |
40496 KB |
ans=YES N=70000 |
76 |
Correct |
2008 ms |
40280 KB |
ans=YES N=65009 |
77 |
Execution timed out |
3574 ms |
48992 KB |
Time limit exceeded |
78 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
87 ms |
34764 KB |
ans=NO N=66151 |
2 |
Correct |
89 ms |
34764 KB |
ans=NO N=64333 |
3 |
Correct |
1754 ms |
39760 KB |
ans=YES N=69316 |
4 |
Correct |
1638 ms |
39108 KB |
ans=YES N=66695 |
5 |
Correct |
1807 ms |
39732 KB |
ans=YES N=68436 |
6 |
Correct |
1800 ms |
40184 KB |
ans=YES N=70000 |
7 |
Correct |
1940 ms |
39892 KB |
ans=YES N=68501 |
8 |
Correct |
1903 ms |
40344 KB |
ans=YES N=70000 |
9 |
Correct |
1985 ms |
40304 KB |
ans=YES N=65009 |
10 |
Execution timed out |
3564 ms |
48872 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
24148 KB |
ans=NO N=1934 |
2 |
Correct |
14 ms |
23836 KB |
ans=NO N=1965 |
3 |
Correct |
40 ms |
23892 KB |
ans=YES N=1824 |
4 |
Correct |
43 ms |
24020 KB |
ans=YES N=1981 |
5 |
Correct |
40 ms |
23892 KB |
ans=YES N=1814 |
6 |
Correct |
47 ms |
24144 KB |
ans=YES N=1854 |
7 |
Correct |
50 ms |
23996 KB |
ans=YES N=1831 |
8 |
Correct |
47 ms |
24048 KB |
ans=YES N=2000 |
9 |
Correct |
52 ms |
24072 KB |
ans=YES N=1847 |
10 |
Correct |
58 ms |
24104 KB |
ans=YES N=1819 |
11 |
Correct |
43 ms |
24012 KB |
ans=YES N=1986 |
12 |
Correct |
77 ms |
24372 KB |
ans=YES N=2000 |
13 |
Correct |
101 ms |
24592 KB |
ans=YES N=1834 |
14 |
Correct |
92 ms |
24440 KB |
ans=YES N=1860 |
15 |
Correct |
88 ms |
24500 KB |
ans=YES N=1898 |
16 |
Correct |
72 ms |
24272 KB |
ans=YES N=1832 |
17 |
Correct |
110 ms |
24704 KB |
ans=YES N=1929 |
18 |
Correct |
52 ms |
24012 KB |
ans=YES N=1919 |
19 |
Correct |
88 ms |
24416 KB |
ans=YES N=1882 |
20 |
Correct |
108 ms |
24820 KB |
ans=YES N=1922 |
21 |
Correct |
50 ms |
24332 KB |
ans=YES N=1989 |
22 |
Correct |
70 ms |
24336 KB |
ans=YES N=1978 |
23 |
Correct |
76 ms |
24764 KB |
ans=YES N=1867 |
24 |
Correct |
87 ms |
34764 KB |
ans=NO N=66151 |
25 |
Correct |
89 ms |
34764 KB |
ans=NO N=64333 |
26 |
Correct |
1754 ms |
39760 KB |
ans=YES N=69316 |
27 |
Correct |
1638 ms |
39108 KB |
ans=YES N=66695 |
28 |
Correct |
1807 ms |
39732 KB |
ans=YES N=68436 |
29 |
Correct |
1800 ms |
40184 KB |
ans=YES N=70000 |
30 |
Correct |
1940 ms |
39892 KB |
ans=YES N=68501 |
31 |
Correct |
1903 ms |
40344 KB |
ans=YES N=70000 |
32 |
Correct |
1985 ms |
40304 KB |
ans=YES N=65009 |
33 |
Execution timed out |
3564 ms |
48872 KB |
Time limit exceeded |
34 |
Halted |
0 ms |
0 KB |
- |