#include <bits/stdc++.h>
using namespace std;
using ii = pair<int, int>;
using ll = long long;
#define X first
#define Y second
int n, t, cnt;
unordered_map<ll, int> M;
ii cor[1500007];
int skynum[150007], sky[1500007];
int component[1500007];
bool engaged[1500007];
vector<int> incomp[1500007];
vector<int> G4[1500007], G8[1500007];
bool vis[1500007];
int ecnt;
int infty;
set<int, greater<int> > to_use;
bool hlp[1500007];
int turn, hlp2[1500007];
constexpr inline ll key(ii p) {
return (ll)p.X * 1000696969LL + p.Y;
}
void add_point(int x, int y) {
ii p = {x, y};
if(!M.count(key(p))) {
M[key(p)] = ++cnt;
cor[cnt] = p;
component[cnt] = cnt;
incomp[cnt].push_back(cnt);
}
}
bool check(int i) {
bool eng[3][3];
int comp[3][3];
for(int w : G8[i]) {
int x = cor[w].X - cor[i].X + 1;
int y = cor[w].Y - cor[i].Y + 1;
eng[x][y] = engaged[w];
comp[x][y] = component[w];
}
if(!eng[0][1] && !eng[1][2] && comp[0][1] == comp[1][2] && eng[0][2]
&& (eng[0][0] || eng[1][0] || eng[2][0] || eng[2][1] || eng[2][2]))
return false;
if(!eng[1][2] && !eng[2][1] && comp[1][2] == comp[2][1] && eng[2][2]
&& (eng[2][0] || eng[1][0] || eng[0][0] || eng[0][1] || eng[0][2]))
return false;
if(!eng[2][1] && !eng[1][0] && comp[2][1] == comp[1][0] && eng[2][0]
&& (eng[0][0] || eng[0][1] || eng[0][2] || eng[1][2] || eng[2][2]))
return false;
if(!eng[1][0] && !eng[0][1] && comp[1][0] == comp[0][1] && eng[0][0]
&& (eng[0][2] || eng[1][2] || eng[2][2] || eng[2][1] || eng[2][0]))
return false;
if(!eng[0][1] && !eng[2][1] && comp[0][1] == comp[2][1]
&& (eng[0][0] || eng[1][0] || eng[2][0]) && (eng[0][2] || eng[1][2] || eng[2][2]))
return false;
if(!eng[1][0] && !eng[1][2] && comp[1][0] == comp[1][2]
&& (eng[0][0] || eng[0][1] || eng[0][2]) && (eng[2][0] || eng[2][1] || eng[2][2]))
return false;
if(comp[1][0] == component[infty] || comp[0][1] == component[infty]
|| comp[2][1] == component[infty] || comp[1][2] == component[infty])
return true;
return false;
}
void upd_check(int i) {
bool c = check(skynum[i]);
if(c && !hlp[i])
to_use.insert(i);
else if(!c && hlp[i])
to_use.erase(i);
hlp[i] = c;
}
void merge(int a, int b, bool upd = false) {
if(a == b)
return ;
if(incomp[b].size() > incomp[a].size())
swap(a, b);
for(int x : incomp[b]) {
incomp[a].push_back(x);
component[x] = a;
}
if(upd) {
turn++;
for(int x : incomp[b]) {
for(int y : G8[x]) {
if(engaged[y] && hlp2[y] < turn) {
upd_check(sky[y]);
hlp2[y] = turn;
}
}
}
}
incomp[b].clear();
}
void erase(int w) {
engaged[w] = 0;
for(int u : G4[w])
if(!engaged[u])
merge(component[w], component[u], true);
}
void dfs(int w) {
if(vis[w])
return ;
vis[w] = 1;
ecnt++;
for(int u : G8[w])
if(engaged[u])
dfs(u);
}
int main() {
scanf("%d%d", &n, &t);
M.reserve(262144);
M.max_load_factor(0.25);
ii minp = {1e9 + 7, 1e9 + 7};
for(int i = 1 ; i <= n ; i++) {
int r, c;
scanf("%d%d", &r, &c);
for(int x = -1 ; x <= 1 ; x++)
for(int y = -1 ; y <= 1 ; y++)
add_point(r + x, c + y);
engaged[M[key({r, c})]] = 1;
skynum[i] = M[key({r, c})];
sky[M[key({r, c})]] = i;
minp = min(minp, {r, c});
}
infty = M[key({minp.X - 1, minp.Y})];
for(int i = 1 ; i <= cnt ; i++) {
int x = cor[i].X;
int y = cor[i].Y;
for(int xo = -1 ; xo <= 1 ; xo++) {
for(int yo = -1 ; yo <= 1 ; yo++) {
ii p2 = {x + xo, y + yo};
if(M.count(key(p2)) == 0)
continue;
int num = M[key(p2)];
if(xo || yo)
G8[i].push_back(num);
if((xo || yo) && !(xo && yo)) {
G4[i].push_back(num);
if(!engaged[i] && !engaged[num])
merge(component[i], component[num]);
}
}
}
}
dfs(skynum[1]);
if(ecnt != n) {
printf("NO\n");
return 0;
}
for(int i = 1 ; i <= n ; i++)
upd_check(i);
printf("YES\n");
vector<int> res;
for(int i = 0 ; i < n ; i++) {
int s = *to_use.begin();
to_use.erase(to_use.begin());
res.push_back(s);
erase(skynum[s]);
}
reverse(res.begin(), res.end());
for(int x : res)
printf("%d\n", x);
return 0;
}
Compilation message
skyscrapers.cpp: In function 'int main()':
skyscrapers.cpp:133:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &t);
~~~~~^~~~~~~~~~~~~~~~
skyscrapers.cpp:142:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &r, &c);
~~~~~^~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
55 ms |
108156 KB |
ans=YES N=1 |
2 |
Correct |
55 ms |
108152 KB |
ans=YES N=4 |
3 |
Correct |
55 ms |
108152 KB |
ans=NO N=4 |
4 |
Correct |
56 ms |
108280 KB |
ans=YES N=5 |
5 |
Correct |
55 ms |
108152 KB |
ans=YES N=9 |
6 |
Correct |
53 ms |
108280 KB |
ans=YES N=5 |
7 |
Correct |
57 ms |
108280 KB |
ans=NO N=9 |
8 |
Correct |
55 ms |
108280 KB |
ans=NO N=10 |
9 |
Correct |
58 ms |
108152 KB |
ans=YES N=10 |
10 |
Correct |
54 ms |
108280 KB |
ans=YES N=10 |
11 |
Correct |
55 ms |
108280 KB |
ans=YES N=10 |
12 |
Correct |
54 ms |
108152 KB |
ans=YES N=9 |
13 |
Correct |
56 ms |
108164 KB |
ans=YES N=9 |
14 |
Correct |
55 ms |
108216 KB |
ans=YES N=8 |
15 |
Correct |
56 ms |
108156 KB |
ans=YES N=8 |
16 |
Correct |
55 ms |
108152 KB |
ans=NO N=2 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
55 ms |
108156 KB |
ans=YES N=1 |
2 |
Correct |
55 ms |
108152 KB |
ans=YES N=4 |
3 |
Correct |
55 ms |
108152 KB |
ans=NO N=4 |
4 |
Correct |
56 ms |
108280 KB |
ans=YES N=5 |
5 |
Correct |
55 ms |
108152 KB |
ans=YES N=9 |
6 |
Correct |
53 ms |
108280 KB |
ans=YES N=5 |
7 |
Correct |
57 ms |
108280 KB |
ans=NO N=9 |
8 |
Correct |
55 ms |
108280 KB |
ans=NO N=10 |
9 |
Correct |
58 ms |
108152 KB |
ans=YES N=10 |
10 |
Correct |
54 ms |
108280 KB |
ans=YES N=10 |
11 |
Correct |
55 ms |
108280 KB |
ans=YES N=10 |
12 |
Correct |
54 ms |
108152 KB |
ans=YES N=9 |
13 |
Correct |
56 ms |
108164 KB |
ans=YES N=9 |
14 |
Correct |
55 ms |
108216 KB |
ans=YES N=8 |
15 |
Correct |
56 ms |
108156 KB |
ans=YES N=8 |
16 |
Correct |
55 ms |
108152 KB |
ans=NO N=2 |
17 |
Correct |
55 ms |
108152 KB |
ans=YES N=17 |
18 |
Correct |
54 ms |
108280 KB |
ans=YES N=25 |
19 |
Correct |
59 ms |
108280 KB |
ans=YES N=100 |
20 |
Correct |
55 ms |
108280 KB |
ans=YES N=185 |
21 |
Correct |
57 ms |
108408 KB |
ans=NO N=174 |
22 |
Correct |
55 ms |
108280 KB |
ans=YES N=90 |
23 |
Correct |
54 ms |
108280 KB |
ans=YES N=63 |
24 |
Correct |
54 ms |
108280 KB |
ans=YES N=87 |
25 |
Correct |
54 ms |
108280 KB |
ans=YES N=183 |
26 |
Correct |
56 ms |
108284 KB |
ans=YES N=188 |
27 |
Correct |
55 ms |
108280 KB |
ans=YES N=183 |
28 |
Correct |
57 ms |
108280 KB |
ans=YES N=189 |
29 |
Correct |
55 ms |
108284 KB |
ans=YES N=200 |
30 |
Correct |
56 ms |
108280 KB |
ans=YES N=190 |
31 |
Correct |
54 ms |
108280 KB |
ans=YES N=187 |
32 |
Correct |
56 ms |
108280 KB |
ans=YES N=187 |
33 |
Correct |
56 ms |
108280 KB |
ans=YES N=182 |
34 |
Correct |
54 ms |
108280 KB |
ans=YES N=184 |
35 |
Correct |
57 ms |
108280 KB |
ans=YES N=188 |
36 |
Correct |
56 ms |
108280 KB |
ans=YES N=181 |
37 |
Correct |
55 ms |
108280 KB |
ans=YES N=188 |
38 |
Correct |
56 ms |
108408 KB |
ans=YES N=191 |
39 |
Correct |
55 ms |
108280 KB |
ans=YES N=196 |
40 |
Correct |
57 ms |
108280 KB |
ans=YES N=196 |
41 |
Correct |
57 ms |
108392 KB |
ans=YES N=196 |
42 |
Correct |
55 ms |
108280 KB |
ans=YES N=196 |
43 |
Correct |
55 ms |
108280 KB |
ans=YES N=195 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
55 ms |
108156 KB |
ans=YES N=1 |
2 |
Correct |
55 ms |
108152 KB |
ans=YES N=4 |
3 |
Correct |
55 ms |
108152 KB |
ans=NO N=4 |
4 |
Correct |
56 ms |
108280 KB |
ans=YES N=5 |
5 |
Correct |
55 ms |
108152 KB |
ans=YES N=9 |
6 |
Correct |
53 ms |
108280 KB |
ans=YES N=5 |
7 |
Correct |
57 ms |
108280 KB |
ans=NO N=9 |
8 |
Correct |
55 ms |
108280 KB |
ans=NO N=10 |
9 |
Correct |
58 ms |
108152 KB |
ans=YES N=10 |
10 |
Correct |
54 ms |
108280 KB |
ans=YES N=10 |
11 |
Correct |
55 ms |
108280 KB |
ans=YES N=10 |
12 |
Correct |
54 ms |
108152 KB |
ans=YES N=9 |
13 |
Correct |
56 ms |
108164 KB |
ans=YES N=9 |
14 |
Correct |
55 ms |
108216 KB |
ans=YES N=8 |
15 |
Correct |
56 ms |
108156 KB |
ans=YES N=8 |
16 |
Correct |
55 ms |
108152 KB |
ans=NO N=2 |
17 |
Correct |
55 ms |
108152 KB |
ans=YES N=17 |
18 |
Correct |
54 ms |
108280 KB |
ans=YES N=25 |
19 |
Correct |
59 ms |
108280 KB |
ans=YES N=100 |
20 |
Correct |
55 ms |
108280 KB |
ans=YES N=185 |
21 |
Correct |
57 ms |
108408 KB |
ans=NO N=174 |
22 |
Correct |
55 ms |
108280 KB |
ans=YES N=90 |
23 |
Correct |
54 ms |
108280 KB |
ans=YES N=63 |
24 |
Correct |
54 ms |
108280 KB |
ans=YES N=87 |
25 |
Correct |
54 ms |
108280 KB |
ans=YES N=183 |
26 |
Correct |
56 ms |
108284 KB |
ans=YES N=188 |
27 |
Correct |
55 ms |
108280 KB |
ans=YES N=183 |
28 |
Correct |
57 ms |
108280 KB |
ans=YES N=189 |
29 |
Correct |
55 ms |
108284 KB |
ans=YES N=200 |
30 |
Correct |
56 ms |
108280 KB |
ans=YES N=190 |
31 |
Correct |
54 ms |
108280 KB |
ans=YES N=187 |
32 |
Correct |
56 ms |
108280 KB |
ans=YES N=187 |
33 |
Correct |
56 ms |
108280 KB |
ans=YES N=182 |
34 |
Correct |
54 ms |
108280 KB |
ans=YES N=184 |
35 |
Correct |
57 ms |
108280 KB |
ans=YES N=188 |
36 |
Correct |
56 ms |
108280 KB |
ans=YES N=181 |
37 |
Correct |
55 ms |
108280 KB |
ans=YES N=188 |
38 |
Correct |
56 ms |
108408 KB |
ans=YES N=191 |
39 |
Correct |
55 ms |
108280 KB |
ans=YES N=196 |
40 |
Correct |
57 ms |
108280 KB |
ans=YES N=196 |
41 |
Correct |
57 ms |
108392 KB |
ans=YES N=196 |
42 |
Correct |
55 ms |
108280 KB |
ans=YES N=196 |
43 |
Correct |
55 ms |
108280 KB |
ans=YES N=195 |
44 |
Correct |
71 ms |
110840 KB |
ans=NO N=1934 |
45 |
Correct |
63 ms |
109176 KB |
ans=NO N=1965 |
46 |
Correct |
59 ms |
108664 KB |
ans=YES N=1824 |
47 |
Correct |
61 ms |
108792 KB |
ans=YES N=1981 |
48 |
Correct |
60 ms |
108664 KB |
ans=YES N=1814 |
49 |
Correct |
60 ms |
108792 KB |
ans=YES N=1854 |
50 |
Correct |
59 ms |
108664 KB |
ans=YES N=1831 |
51 |
Correct |
60 ms |
108796 KB |
ans=YES N=2000 |
52 |
Correct |
62 ms |
109048 KB |
ans=YES N=1847 |
53 |
Correct |
63 ms |
109048 KB |
ans=YES N=1819 |
54 |
Correct |
59 ms |
108792 KB |
ans=YES N=1986 |
55 |
Correct |
65 ms |
109304 KB |
ans=YES N=2000 |
56 |
Correct |
65 ms |
109432 KB |
ans=YES N=1834 |
57 |
Correct |
63 ms |
109560 KB |
ans=YES N=1860 |
58 |
Correct |
64 ms |
109432 KB |
ans=YES N=1898 |
59 |
Correct |
63 ms |
109176 KB |
ans=YES N=1832 |
60 |
Correct |
65 ms |
109688 KB |
ans=YES N=1929 |
61 |
Correct |
61 ms |
108792 KB |
ans=YES N=1919 |
62 |
Correct |
63 ms |
109304 KB |
ans=YES N=1882 |
63 |
Correct |
65 ms |
109688 KB |
ans=YES N=1922 |
64 |
Correct |
62 ms |
108920 KB |
ans=YES N=1989 |
65 |
Correct |
60 ms |
109176 KB |
ans=YES N=1978 |
66 |
Correct |
63 ms |
109176 KB |
ans=YES N=1867 |
67 |
Correct |
63 ms |
109176 KB |
ans=YES N=1942 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
72 ms |
110968 KB |
ans=NO N=1934 |
2 |
Correct |
60 ms |
109176 KB |
ans=NO N=1965 |
3 |
Correct |
59 ms |
108664 KB |
ans=YES N=1824 |
4 |
Correct |
59 ms |
108792 KB |
ans=YES N=1981 |
5 |
Correct |
58 ms |
108664 KB |
ans=YES N=1814 |
6 |
Correct |
62 ms |
108824 KB |
ans=YES N=1854 |
7 |
Correct |
59 ms |
108664 KB |
ans=YES N=1831 |
8 |
Correct |
60 ms |
108792 KB |
ans=YES N=2000 |
9 |
Correct |
61 ms |
108920 KB |
ans=YES N=1847 |
10 |
Correct |
61 ms |
108920 KB |
ans=YES N=1819 |
11 |
Correct |
60 ms |
108792 KB |
ans=YES N=1986 |
12 |
Correct |
65 ms |
109432 KB |
ans=YES N=2000 |
13 |
Correct |
64 ms |
109360 KB |
ans=YES N=1834 |
14 |
Correct |
63 ms |
109304 KB |
ans=YES N=1860 |
15 |
Correct |
64 ms |
109432 KB |
ans=YES N=1898 |
16 |
Correct |
62 ms |
109176 KB |
ans=YES N=1832 |
17 |
Correct |
65 ms |
109688 KB |
ans=YES N=1929 |
18 |
Correct |
62 ms |
108792 KB |
ans=YES N=1919 |
19 |
Correct |
62 ms |
109304 KB |
ans=YES N=1882 |
20 |
Correct |
65 ms |
109688 KB |
ans=YES N=1922 |
21 |
Correct |
60 ms |
108920 KB |
ans=YES N=1989 |
22 |
Correct |
60 ms |
109176 KB |
ans=YES N=1978 |
23 |
Correct |
60 ms |
109304 KB |
ans=YES N=1867 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
55 ms |
108156 KB |
ans=YES N=1 |
2 |
Correct |
55 ms |
108152 KB |
ans=YES N=4 |
3 |
Correct |
55 ms |
108152 KB |
ans=NO N=4 |
4 |
Correct |
56 ms |
108280 KB |
ans=YES N=5 |
5 |
Correct |
55 ms |
108152 KB |
ans=YES N=9 |
6 |
Correct |
53 ms |
108280 KB |
ans=YES N=5 |
7 |
Correct |
57 ms |
108280 KB |
ans=NO N=9 |
8 |
Correct |
55 ms |
108280 KB |
ans=NO N=10 |
9 |
Correct |
58 ms |
108152 KB |
ans=YES N=10 |
10 |
Correct |
54 ms |
108280 KB |
ans=YES N=10 |
11 |
Correct |
55 ms |
108280 KB |
ans=YES N=10 |
12 |
Correct |
54 ms |
108152 KB |
ans=YES N=9 |
13 |
Correct |
56 ms |
108164 KB |
ans=YES N=9 |
14 |
Correct |
55 ms |
108216 KB |
ans=YES N=8 |
15 |
Correct |
56 ms |
108156 KB |
ans=YES N=8 |
16 |
Correct |
55 ms |
108152 KB |
ans=NO N=2 |
17 |
Correct |
55 ms |
108152 KB |
ans=YES N=17 |
18 |
Correct |
54 ms |
108280 KB |
ans=YES N=25 |
19 |
Correct |
59 ms |
108280 KB |
ans=YES N=100 |
20 |
Correct |
55 ms |
108280 KB |
ans=YES N=185 |
21 |
Correct |
57 ms |
108408 KB |
ans=NO N=174 |
22 |
Correct |
55 ms |
108280 KB |
ans=YES N=90 |
23 |
Correct |
54 ms |
108280 KB |
ans=YES N=63 |
24 |
Correct |
54 ms |
108280 KB |
ans=YES N=87 |
25 |
Correct |
54 ms |
108280 KB |
ans=YES N=183 |
26 |
Correct |
56 ms |
108284 KB |
ans=YES N=188 |
27 |
Correct |
55 ms |
108280 KB |
ans=YES N=183 |
28 |
Correct |
57 ms |
108280 KB |
ans=YES N=189 |
29 |
Correct |
55 ms |
108284 KB |
ans=YES N=200 |
30 |
Correct |
56 ms |
108280 KB |
ans=YES N=190 |
31 |
Correct |
54 ms |
108280 KB |
ans=YES N=187 |
32 |
Correct |
56 ms |
108280 KB |
ans=YES N=187 |
33 |
Correct |
56 ms |
108280 KB |
ans=YES N=182 |
34 |
Correct |
54 ms |
108280 KB |
ans=YES N=184 |
35 |
Correct |
57 ms |
108280 KB |
ans=YES N=188 |
36 |
Correct |
56 ms |
108280 KB |
ans=YES N=181 |
37 |
Correct |
55 ms |
108280 KB |
ans=YES N=188 |
38 |
Correct |
56 ms |
108408 KB |
ans=YES N=191 |
39 |
Correct |
55 ms |
108280 KB |
ans=YES N=196 |
40 |
Correct |
57 ms |
108280 KB |
ans=YES N=196 |
41 |
Correct |
57 ms |
108392 KB |
ans=YES N=196 |
42 |
Correct |
55 ms |
108280 KB |
ans=YES N=196 |
43 |
Correct |
55 ms |
108280 KB |
ans=YES N=195 |
44 |
Correct |
71 ms |
110840 KB |
ans=NO N=1934 |
45 |
Correct |
63 ms |
109176 KB |
ans=NO N=1965 |
46 |
Correct |
59 ms |
108664 KB |
ans=YES N=1824 |
47 |
Correct |
61 ms |
108792 KB |
ans=YES N=1981 |
48 |
Correct |
60 ms |
108664 KB |
ans=YES N=1814 |
49 |
Correct |
60 ms |
108792 KB |
ans=YES N=1854 |
50 |
Correct |
59 ms |
108664 KB |
ans=YES N=1831 |
51 |
Correct |
60 ms |
108796 KB |
ans=YES N=2000 |
52 |
Correct |
62 ms |
109048 KB |
ans=YES N=1847 |
53 |
Correct |
63 ms |
109048 KB |
ans=YES N=1819 |
54 |
Correct |
59 ms |
108792 KB |
ans=YES N=1986 |
55 |
Correct |
65 ms |
109304 KB |
ans=YES N=2000 |
56 |
Correct |
65 ms |
109432 KB |
ans=YES N=1834 |
57 |
Correct |
63 ms |
109560 KB |
ans=YES N=1860 |
58 |
Correct |
64 ms |
109432 KB |
ans=YES N=1898 |
59 |
Correct |
63 ms |
109176 KB |
ans=YES N=1832 |
60 |
Correct |
65 ms |
109688 KB |
ans=YES N=1929 |
61 |
Correct |
61 ms |
108792 KB |
ans=YES N=1919 |
62 |
Correct |
63 ms |
109304 KB |
ans=YES N=1882 |
63 |
Correct |
65 ms |
109688 KB |
ans=YES N=1922 |
64 |
Correct |
62 ms |
108920 KB |
ans=YES N=1989 |
65 |
Correct |
60 ms |
109176 KB |
ans=YES N=1978 |
66 |
Correct |
63 ms |
109176 KB |
ans=YES N=1867 |
67 |
Correct |
63 ms |
109176 KB |
ans=YES N=1942 |
68 |
Correct |
228 ms |
129080 KB |
ans=NO N=66151 |
69 |
Correct |
644 ms |
196948 KB |
ans=NO N=64333 |
70 |
Correct |
285 ms |
126980 KB |
ans=YES N=69316 |
71 |
Correct |
286 ms |
123496 KB |
ans=YES N=66695 |
72 |
Correct |
280 ms |
126972 KB |
ans=YES N=68436 |
73 |
Correct |
316 ms |
127356 KB |
ans=YES N=70000 |
74 |
Correct |
291 ms |
127228 KB |
ans=YES N=68501 |
75 |
Correct |
295 ms |
128124 KB |
ans=YES N=70000 |
76 |
Correct |
326 ms |
129020 KB |
ans=YES N=65009 |
77 |
Correct |
500 ms |
145732 KB |
ans=YES N=67007 |
78 |
Correct |
560 ms |
151748 KB |
ans=YES N=66357 |
79 |
Correct |
593 ms |
155880 KB |
ans=YES N=65430 |
80 |
Correct |
590 ms |
153908 KB |
ans=YES N=65790 |
81 |
Correct |
556 ms |
151104 KB |
ans=YES N=66020 |
82 |
Correct |
531 ms |
147780 KB |
ans=YES N=65809 |
83 |
Correct |
376 ms |
132092 KB |
ans=YES N=65651 |
84 |
Correct |
674 ms |
166656 KB |
ans=YES N=68040 |
85 |
Correct |
668 ms |
159684 KB |
ans=YES N=66570 |
86 |
Correct |
292 ms |
127736 KB |
ans=YES N=65421 |
87 |
Correct |
329 ms |
128764 KB |
ans=YES N=68351 |
88 |
Correct |
268 ms |
123368 KB |
ans=YES N=67027 |
89 |
Correct |
352 ms |
138092 KB |
ans=YES N=68879 |
90 |
Correct |
318 ms |
130556 KB |
ans=YES N=67256 |
91 |
Correct |
780 ms |
152004 KB |
ans=YES N=148315 |
92 |
Correct |
1471 ms |
318932 KB |
ans=NO N=142745 |
93 |
Correct |
1566 ms |
388256 KB |
ans=NO N=148443 |
94 |
Correct |
696 ms |
152892 KB |
ans=YES N=148328 |
95 |
Correct |
693 ms |
153260 KB |
ans=YES N=147855 |
96 |
Correct |
725 ms |
153632 KB |
ans=YES N=150000 |
97 |
Correct |
661 ms |
152388 KB |
ans=YES N=144725 |
98 |
Correct |
674 ms |
153284 KB |
ans=YES N=149445 |
99 |
Correct |
688 ms |
152772 KB |
ans=YES N=144455 |
100 |
Correct |
681 ms |
152516 KB |
ans=YES N=143487 |
101 |
Correct |
711 ms |
154052 KB |
ans=YES N=149688 |
102 |
Correct |
1242 ms |
194896 KB |
ans=YES N=141481 |
103 |
Correct |
1626 ms |
231092 KB |
ans=YES N=147430 |
104 |
Correct |
1095 ms |
170308 KB |
ans=YES N=142247 |
105 |
Correct |
1301 ms |
191564 KB |
ans=YES N=149941 |
106 |
Correct |
1448 ms |
224076 KB |
ans=YES N=141635 |
107 |
Correct |
1406 ms |
211208 KB |
ans=YES N=142896 |
108 |
Correct |
1468 ms |
220876 KB |
ans=YES N=142069 |
109 |
Correct |
892 ms |
158976 KB |
ans=YES N=142378 |
110 |
Correct |
1147 ms |
200528 KB |
ans=YES N=150000 |
111 |
Correct |
1566 ms |
260732 KB |
ans=YES N=141452 |
112 |
Correct |
1343 ms |
236624 KB |
ans=YES N=134453 |
113 |
Correct |
1413 ms |
263252 KB |
ans=YES N=144172 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
224 ms |
129108 KB |
ans=NO N=66151 |
2 |
Correct |
659 ms |
196944 KB |
ans=NO N=64333 |
3 |
Correct |
322 ms |
127100 KB |
ans=YES N=69316 |
4 |
Correct |
296 ms |
123496 KB |
ans=YES N=66695 |
5 |
Correct |
289 ms |
127016 KB |
ans=YES N=68436 |
6 |
Correct |
284 ms |
127356 KB |
ans=YES N=70000 |
7 |
Correct |
315 ms |
127228 KB |
ans=YES N=68501 |
8 |
Correct |
308 ms |
128124 KB |
ans=YES N=70000 |
9 |
Correct |
328 ms |
129024 KB |
ans=YES N=65009 |
10 |
Correct |
527 ms |
145784 KB |
ans=YES N=67007 |
11 |
Correct |
554 ms |
151748 KB |
ans=YES N=66357 |
12 |
Correct |
587 ms |
155712 KB |
ans=YES N=65430 |
13 |
Correct |
568 ms |
153948 KB |
ans=YES N=65790 |
14 |
Correct |
567 ms |
151068 KB |
ans=YES N=66020 |
15 |
Correct |
556 ms |
147912 KB |
ans=YES N=65809 |
16 |
Correct |
380 ms |
132092 KB |
ans=YES N=65651 |
17 |
Correct |
676 ms |
166792 KB |
ans=YES N=68040 |
18 |
Correct |
622 ms |
159684 KB |
ans=YES N=66570 |
19 |
Correct |
298 ms |
127868 KB |
ans=YES N=65421 |
20 |
Correct |
374 ms |
128764 KB |
ans=YES N=68351 |
21 |
Correct |
265 ms |
123368 KB |
ans=YES N=67027 |
22 |
Correct |
362 ms |
138112 KB |
ans=YES N=68879 |
23 |
Correct |
337 ms |
130300 KB |
ans=YES N=67256 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
72 ms |
110968 KB |
ans=NO N=1934 |
2 |
Correct |
60 ms |
109176 KB |
ans=NO N=1965 |
3 |
Correct |
59 ms |
108664 KB |
ans=YES N=1824 |
4 |
Correct |
59 ms |
108792 KB |
ans=YES N=1981 |
5 |
Correct |
58 ms |
108664 KB |
ans=YES N=1814 |
6 |
Correct |
62 ms |
108824 KB |
ans=YES N=1854 |
7 |
Correct |
59 ms |
108664 KB |
ans=YES N=1831 |
8 |
Correct |
60 ms |
108792 KB |
ans=YES N=2000 |
9 |
Correct |
61 ms |
108920 KB |
ans=YES N=1847 |
10 |
Correct |
61 ms |
108920 KB |
ans=YES N=1819 |
11 |
Correct |
60 ms |
108792 KB |
ans=YES N=1986 |
12 |
Correct |
65 ms |
109432 KB |
ans=YES N=2000 |
13 |
Correct |
64 ms |
109360 KB |
ans=YES N=1834 |
14 |
Correct |
63 ms |
109304 KB |
ans=YES N=1860 |
15 |
Correct |
64 ms |
109432 KB |
ans=YES N=1898 |
16 |
Correct |
62 ms |
109176 KB |
ans=YES N=1832 |
17 |
Correct |
65 ms |
109688 KB |
ans=YES N=1929 |
18 |
Correct |
62 ms |
108792 KB |
ans=YES N=1919 |
19 |
Correct |
62 ms |
109304 KB |
ans=YES N=1882 |
20 |
Correct |
65 ms |
109688 KB |
ans=YES N=1922 |
21 |
Correct |
60 ms |
108920 KB |
ans=YES N=1989 |
22 |
Correct |
60 ms |
109176 KB |
ans=YES N=1978 |
23 |
Correct |
60 ms |
109304 KB |
ans=YES N=1867 |
24 |
Correct |
224 ms |
129108 KB |
ans=NO N=66151 |
25 |
Correct |
659 ms |
196944 KB |
ans=NO N=64333 |
26 |
Correct |
322 ms |
127100 KB |
ans=YES N=69316 |
27 |
Correct |
296 ms |
123496 KB |
ans=YES N=66695 |
28 |
Correct |
289 ms |
127016 KB |
ans=YES N=68436 |
29 |
Correct |
284 ms |
127356 KB |
ans=YES N=70000 |
30 |
Correct |
315 ms |
127228 KB |
ans=YES N=68501 |
31 |
Correct |
308 ms |
128124 KB |
ans=YES N=70000 |
32 |
Correct |
328 ms |
129024 KB |
ans=YES N=65009 |
33 |
Correct |
527 ms |
145784 KB |
ans=YES N=67007 |
34 |
Correct |
554 ms |
151748 KB |
ans=YES N=66357 |
35 |
Correct |
587 ms |
155712 KB |
ans=YES N=65430 |
36 |
Correct |
568 ms |
153948 KB |
ans=YES N=65790 |
37 |
Correct |
567 ms |
151068 KB |
ans=YES N=66020 |
38 |
Correct |
556 ms |
147912 KB |
ans=YES N=65809 |
39 |
Correct |
380 ms |
132092 KB |
ans=YES N=65651 |
40 |
Correct |
676 ms |
166792 KB |
ans=YES N=68040 |
41 |
Correct |
622 ms |
159684 KB |
ans=YES N=66570 |
42 |
Correct |
298 ms |
127868 KB |
ans=YES N=65421 |
43 |
Correct |
374 ms |
128764 KB |
ans=YES N=68351 |
44 |
Correct |
265 ms |
123368 KB |
ans=YES N=67027 |
45 |
Correct |
362 ms |
138112 KB |
ans=YES N=68879 |
46 |
Correct |
337 ms |
130300 KB |
ans=YES N=67256 |
47 |
Correct |
717 ms |
152116 KB |
ans=YES N=148315 |
48 |
Correct |
1483 ms |
319108 KB |
ans=NO N=142745 |
49 |
Correct |
1596 ms |
388096 KB |
ans=NO N=148443 |
50 |
Correct |
780 ms |
152900 KB |
ans=YES N=148328 |
51 |
Correct |
686 ms |
153376 KB |
ans=YES N=147855 |
52 |
Correct |
712 ms |
153668 KB |
ans=YES N=150000 |
53 |
Correct |
685 ms |
152260 KB |
ans=YES N=144725 |
54 |
Correct |
743 ms |
153388 KB |
ans=YES N=149445 |
55 |
Correct |
686 ms |
152884 KB |
ans=YES N=144455 |
56 |
Correct |
735 ms |
152260 KB |
ans=YES N=143487 |
57 |
Correct |
738 ms |
154052 KB |
ans=YES N=149688 |
58 |
Correct |
1276 ms |
194804 KB |
ans=YES N=141481 |
59 |
Correct |
1518 ms |
231320 KB |
ans=YES N=147430 |
60 |
Correct |
1105 ms |
170180 KB |
ans=YES N=142247 |
61 |
Correct |
1281 ms |
191432 KB |
ans=YES N=149941 |
62 |
Correct |
1531 ms |
223952 KB |
ans=YES N=141635 |
63 |
Correct |
1431 ms |
211328 KB |
ans=YES N=142896 |
64 |
Correct |
1472 ms |
220880 KB |
ans=YES N=142069 |
65 |
Correct |
871 ms |
158964 KB |
ans=YES N=142378 |
66 |
Correct |
1191 ms |
200780 KB |
ans=YES N=150000 |
67 |
Correct |
1500 ms |
260844 KB |
ans=YES N=141452 |
68 |
Correct |
1308 ms |
236492 KB |
ans=YES N=134453 |
69 |
Correct |
1430 ms |
263128 KB |
ans=YES N=144172 |