#include <bits/stdc++.h>
using namespace std;
using ii = pair<int, int>;
#define X first
#define Y second
int n, t, cnt;
map<ii, 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];
void add_point(int x, int y) {
ii p = {x, y};
if(!M.count(p)) {
M[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);
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[{r, c}]] = 1;
skynum[i] = M[{r, c}];
sky[M[{r, c}]] = i;
minp = min(minp, {r, c});
}
infty = M[{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(p2) == 0)
continue;
int num = M[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:128: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:134: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 |
54 ms |
105976 KB |
ans=YES N=1 |
2 |
Correct |
52 ms |
105976 KB |
ans=YES N=4 |
3 |
Correct |
53 ms |
105976 KB |
ans=NO N=4 |
4 |
Correct |
54 ms |
105976 KB |
ans=YES N=5 |
5 |
Correct |
52 ms |
105976 KB |
ans=YES N=9 |
6 |
Correct |
54 ms |
105976 KB |
ans=YES N=5 |
7 |
Correct |
52 ms |
105976 KB |
ans=NO N=9 |
8 |
Correct |
53 ms |
106104 KB |
ans=NO N=10 |
9 |
Correct |
59 ms |
105980 KB |
ans=YES N=10 |
10 |
Correct |
56 ms |
106104 KB |
ans=YES N=10 |
11 |
Correct |
53 ms |
106104 KB |
ans=YES N=10 |
12 |
Correct |
52 ms |
105976 KB |
ans=YES N=9 |
13 |
Correct |
53 ms |
105976 KB |
ans=YES N=9 |
14 |
Correct |
53 ms |
106012 KB |
ans=YES N=8 |
15 |
Correct |
55 ms |
106104 KB |
ans=YES N=8 |
16 |
Correct |
56 ms |
105976 KB |
ans=NO N=2 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
54 ms |
105976 KB |
ans=YES N=1 |
2 |
Correct |
52 ms |
105976 KB |
ans=YES N=4 |
3 |
Correct |
53 ms |
105976 KB |
ans=NO N=4 |
4 |
Correct |
54 ms |
105976 KB |
ans=YES N=5 |
5 |
Correct |
52 ms |
105976 KB |
ans=YES N=9 |
6 |
Correct |
54 ms |
105976 KB |
ans=YES N=5 |
7 |
Correct |
52 ms |
105976 KB |
ans=NO N=9 |
8 |
Correct |
53 ms |
106104 KB |
ans=NO N=10 |
9 |
Correct |
59 ms |
105980 KB |
ans=YES N=10 |
10 |
Correct |
56 ms |
106104 KB |
ans=YES N=10 |
11 |
Correct |
53 ms |
106104 KB |
ans=YES N=10 |
12 |
Correct |
52 ms |
105976 KB |
ans=YES N=9 |
13 |
Correct |
53 ms |
105976 KB |
ans=YES N=9 |
14 |
Correct |
53 ms |
106012 KB |
ans=YES N=8 |
15 |
Correct |
55 ms |
106104 KB |
ans=YES N=8 |
16 |
Correct |
56 ms |
105976 KB |
ans=NO N=2 |
17 |
Correct |
54 ms |
105984 KB |
ans=YES N=17 |
18 |
Correct |
54 ms |
106072 KB |
ans=YES N=25 |
19 |
Correct |
53 ms |
106104 KB |
ans=YES N=100 |
20 |
Correct |
54 ms |
106104 KB |
ans=YES N=185 |
21 |
Correct |
55 ms |
106360 KB |
ans=NO N=174 |
22 |
Correct |
54 ms |
106104 KB |
ans=YES N=90 |
23 |
Correct |
53 ms |
106104 KB |
ans=YES N=63 |
24 |
Correct |
54 ms |
106104 KB |
ans=YES N=87 |
25 |
Correct |
54 ms |
106104 KB |
ans=YES N=183 |
26 |
Correct |
54 ms |
106104 KB |
ans=YES N=188 |
27 |
Correct |
55 ms |
106112 KB |
ans=YES N=183 |
28 |
Correct |
54 ms |
106104 KB |
ans=YES N=189 |
29 |
Correct |
54 ms |
106104 KB |
ans=YES N=200 |
30 |
Correct |
55 ms |
106104 KB |
ans=YES N=190 |
31 |
Correct |
54 ms |
106104 KB |
ans=YES N=187 |
32 |
Correct |
57 ms |
106104 KB |
ans=YES N=187 |
33 |
Correct |
56 ms |
106104 KB |
ans=YES N=182 |
34 |
Correct |
55 ms |
106104 KB |
ans=YES N=184 |
35 |
Correct |
64 ms |
106232 KB |
ans=YES N=188 |
36 |
Correct |
54 ms |
106108 KB |
ans=YES N=181 |
37 |
Correct |
54 ms |
106200 KB |
ans=YES N=188 |
38 |
Correct |
56 ms |
106232 KB |
ans=YES N=191 |
39 |
Correct |
55 ms |
106104 KB |
ans=YES N=196 |
40 |
Correct |
54 ms |
106104 KB |
ans=YES N=196 |
41 |
Correct |
53 ms |
106188 KB |
ans=YES N=196 |
42 |
Correct |
55 ms |
106104 KB |
ans=YES N=196 |
43 |
Correct |
55 ms |
106232 KB |
ans=YES N=195 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
54 ms |
105976 KB |
ans=YES N=1 |
2 |
Correct |
52 ms |
105976 KB |
ans=YES N=4 |
3 |
Correct |
53 ms |
105976 KB |
ans=NO N=4 |
4 |
Correct |
54 ms |
105976 KB |
ans=YES N=5 |
5 |
Correct |
52 ms |
105976 KB |
ans=YES N=9 |
6 |
Correct |
54 ms |
105976 KB |
ans=YES N=5 |
7 |
Correct |
52 ms |
105976 KB |
ans=NO N=9 |
8 |
Correct |
53 ms |
106104 KB |
ans=NO N=10 |
9 |
Correct |
59 ms |
105980 KB |
ans=YES N=10 |
10 |
Correct |
56 ms |
106104 KB |
ans=YES N=10 |
11 |
Correct |
53 ms |
106104 KB |
ans=YES N=10 |
12 |
Correct |
52 ms |
105976 KB |
ans=YES N=9 |
13 |
Correct |
53 ms |
105976 KB |
ans=YES N=9 |
14 |
Correct |
53 ms |
106012 KB |
ans=YES N=8 |
15 |
Correct |
55 ms |
106104 KB |
ans=YES N=8 |
16 |
Correct |
56 ms |
105976 KB |
ans=NO N=2 |
17 |
Correct |
54 ms |
105984 KB |
ans=YES N=17 |
18 |
Correct |
54 ms |
106072 KB |
ans=YES N=25 |
19 |
Correct |
53 ms |
106104 KB |
ans=YES N=100 |
20 |
Correct |
54 ms |
106104 KB |
ans=YES N=185 |
21 |
Correct |
55 ms |
106360 KB |
ans=NO N=174 |
22 |
Correct |
54 ms |
106104 KB |
ans=YES N=90 |
23 |
Correct |
53 ms |
106104 KB |
ans=YES N=63 |
24 |
Correct |
54 ms |
106104 KB |
ans=YES N=87 |
25 |
Correct |
54 ms |
106104 KB |
ans=YES N=183 |
26 |
Correct |
54 ms |
106104 KB |
ans=YES N=188 |
27 |
Correct |
55 ms |
106112 KB |
ans=YES N=183 |
28 |
Correct |
54 ms |
106104 KB |
ans=YES N=189 |
29 |
Correct |
54 ms |
106104 KB |
ans=YES N=200 |
30 |
Correct |
55 ms |
106104 KB |
ans=YES N=190 |
31 |
Correct |
54 ms |
106104 KB |
ans=YES N=187 |
32 |
Correct |
57 ms |
106104 KB |
ans=YES N=187 |
33 |
Correct |
56 ms |
106104 KB |
ans=YES N=182 |
34 |
Correct |
55 ms |
106104 KB |
ans=YES N=184 |
35 |
Correct |
64 ms |
106232 KB |
ans=YES N=188 |
36 |
Correct |
54 ms |
106108 KB |
ans=YES N=181 |
37 |
Correct |
54 ms |
106200 KB |
ans=YES N=188 |
38 |
Correct |
56 ms |
106232 KB |
ans=YES N=191 |
39 |
Correct |
55 ms |
106104 KB |
ans=YES N=196 |
40 |
Correct |
54 ms |
106104 KB |
ans=YES N=196 |
41 |
Correct |
53 ms |
106188 KB |
ans=YES N=196 |
42 |
Correct |
55 ms |
106104 KB |
ans=YES N=196 |
43 |
Correct |
55 ms |
106232 KB |
ans=YES N=195 |
44 |
Correct |
87 ms |
109180 KB |
ans=NO N=1934 |
45 |
Correct |
81 ms |
107128 KB |
ans=NO N=1965 |
46 |
Correct |
65 ms |
106616 KB |
ans=YES N=1824 |
47 |
Correct |
74 ms |
106616 KB |
ans=YES N=1981 |
48 |
Correct |
66 ms |
106616 KB |
ans=YES N=1814 |
49 |
Correct |
78 ms |
106744 KB |
ans=YES N=1854 |
50 |
Correct |
62 ms |
106636 KB |
ans=YES N=1831 |
51 |
Correct |
63 ms |
106616 KB |
ans=YES N=2000 |
52 |
Correct |
65 ms |
106872 KB |
ans=YES N=1847 |
53 |
Correct |
68 ms |
107000 KB |
ans=YES N=1819 |
54 |
Correct |
70 ms |
106616 KB |
ans=YES N=1986 |
55 |
Correct |
71 ms |
107180 KB |
ans=YES N=2000 |
56 |
Correct |
72 ms |
107384 KB |
ans=YES N=1834 |
57 |
Correct |
71 ms |
107384 KB |
ans=YES N=1860 |
58 |
Correct |
74 ms |
107368 KB |
ans=YES N=1898 |
59 |
Correct |
68 ms |
107128 KB |
ans=YES N=1832 |
60 |
Correct |
76 ms |
107640 KB |
ans=YES N=1929 |
61 |
Correct |
64 ms |
106744 KB |
ans=YES N=1919 |
62 |
Correct |
70 ms |
107256 KB |
ans=YES N=1882 |
63 |
Correct |
77 ms |
107768 KB |
ans=YES N=1922 |
64 |
Correct |
74 ms |
106872 KB |
ans=YES N=1989 |
65 |
Correct |
68 ms |
107184 KB |
ans=YES N=1978 |
66 |
Correct |
67 ms |
107260 KB |
ans=YES N=1867 |
67 |
Correct |
70 ms |
107148 KB |
ans=YES N=1942 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
89 ms |
109304 KB |
ans=NO N=1934 |
2 |
Correct |
69 ms |
107300 KB |
ans=NO N=1965 |
3 |
Correct |
63 ms |
106528 KB |
ans=YES N=1824 |
4 |
Correct |
64 ms |
106616 KB |
ans=YES N=1981 |
5 |
Correct |
62 ms |
106548 KB |
ans=YES N=1814 |
6 |
Correct |
68 ms |
106744 KB |
ans=YES N=1854 |
7 |
Correct |
64 ms |
106648 KB |
ans=YES N=1831 |
8 |
Correct |
64 ms |
106616 KB |
ans=YES N=2000 |
9 |
Correct |
67 ms |
106872 KB |
ans=YES N=1847 |
10 |
Correct |
67 ms |
106872 KB |
ans=YES N=1819 |
11 |
Correct |
62 ms |
106616 KB |
ans=YES N=1986 |
12 |
Correct |
72 ms |
107384 KB |
ans=YES N=2000 |
13 |
Correct |
71 ms |
107384 KB |
ans=YES N=1834 |
14 |
Correct |
72 ms |
107384 KB |
ans=YES N=1860 |
15 |
Correct |
72 ms |
107512 KB |
ans=YES N=1898 |
16 |
Correct |
71 ms |
107256 KB |
ans=YES N=1832 |
17 |
Correct |
77 ms |
107640 KB |
ans=YES N=1929 |
18 |
Correct |
64 ms |
106744 KB |
ans=YES N=1919 |
19 |
Correct |
69 ms |
107256 KB |
ans=YES N=1882 |
20 |
Correct |
76 ms |
107768 KB |
ans=YES N=1922 |
21 |
Correct |
67 ms |
106872 KB |
ans=YES N=1989 |
22 |
Correct |
67 ms |
107128 KB |
ans=YES N=1978 |
23 |
Correct |
67 ms |
107384 KB |
ans=YES N=1867 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
54 ms |
105976 KB |
ans=YES N=1 |
2 |
Correct |
52 ms |
105976 KB |
ans=YES N=4 |
3 |
Correct |
53 ms |
105976 KB |
ans=NO N=4 |
4 |
Correct |
54 ms |
105976 KB |
ans=YES N=5 |
5 |
Correct |
52 ms |
105976 KB |
ans=YES N=9 |
6 |
Correct |
54 ms |
105976 KB |
ans=YES N=5 |
7 |
Correct |
52 ms |
105976 KB |
ans=NO N=9 |
8 |
Correct |
53 ms |
106104 KB |
ans=NO N=10 |
9 |
Correct |
59 ms |
105980 KB |
ans=YES N=10 |
10 |
Correct |
56 ms |
106104 KB |
ans=YES N=10 |
11 |
Correct |
53 ms |
106104 KB |
ans=YES N=10 |
12 |
Correct |
52 ms |
105976 KB |
ans=YES N=9 |
13 |
Correct |
53 ms |
105976 KB |
ans=YES N=9 |
14 |
Correct |
53 ms |
106012 KB |
ans=YES N=8 |
15 |
Correct |
55 ms |
106104 KB |
ans=YES N=8 |
16 |
Correct |
56 ms |
105976 KB |
ans=NO N=2 |
17 |
Correct |
54 ms |
105984 KB |
ans=YES N=17 |
18 |
Correct |
54 ms |
106072 KB |
ans=YES N=25 |
19 |
Correct |
53 ms |
106104 KB |
ans=YES N=100 |
20 |
Correct |
54 ms |
106104 KB |
ans=YES N=185 |
21 |
Correct |
55 ms |
106360 KB |
ans=NO N=174 |
22 |
Correct |
54 ms |
106104 KB |
ans=YES N=90 |
23 |
Correct |
53 ms |
106104 KB |
ans=YES N=63 |
24 |
Correct |
54 ms |
106104 KB |
ans=YES N=87 |
25 |
Correct |
54 ms |
106104 KB |
ans=YES N=183 |
26 |
Correct |
54 ms |
106104 KB |
ans=YES N=188 |
27 |
Correct |
55 ms |
106112 KB |
ans=YES N=183 |
28 |
Correct |
54 ms |
106104 KB |
ans=YES N=189 |
29 |
Correct |
54 ms |
106104 KB |
ans=YES N=200 |
30 |
Correct |
55 ms |
106104 KB |
ans=YES N=190 |
31 |
Correct |
54 ms |
106104 KB |
ans=YES N=187 |
32 |
Correct |
57 ms |
106104 KB |
ans=YES N=187 |
33 |
Correct |
56 ms |
106104 KB |
ans=YES N=182 |
34 |
Correct |
55 ms |
106104 KB |
ans=YES N=184 |
35 |
Correct |
64 ms |
106232 KB |
ans=YES N=188 |
36 |
Correct |
54 ms |
106108 KB |
ans=YES N=181 |
37 |
Correct |
54 ms |
106200 KB |
ans=YES N=188 |
38 |
Correct |
56 ms |
106232 KB |
ans=YES N=191 |
39 |
Correct |
55 ms |
106104 KB |
ans=YES N=196 |
40 |
Correct |
54 ms |
106104 KB |
ans=YES N=196 |
41 |
Correct |
53 ms |
106188 KB |
ans=YES N=196 |
42 |
Correct |
55 ms |
106104 KB |
ans=YES N=196 |
43 |
Correct |
55 ms |
106232 KB |
ans=YES N=195 |
44 |
Correct |
87 ms |
109180 KB |
ans=NO N=1934 |
45 |
Correct |
81 ms |
107128 KB |
ans=NO N=1965 |
46 |
Correct |
65 ms |
106616 KB |
ans=YES N=1824 |
47 |
Correct |
74 ms |
106616 KB |
ans=YES N=1981 |
48 |
Correct |
66 ms |
106616 KB |
ans=YES N=1814 |
49 |
Correct |
78 ms |
106744 KB |
ans=YES N=1854 |
50 |
Correct |
62 ms |
106636 KB |
ans=YES N=1831 |
51 |
Correct |
63 ms |
106616 KB |
ans=YES N=2000 |
52 |
Correct |
65 ms |
106872 KB |
ans=YES N=1847 |
53 |
Correct |
68 ms |
107000 KB |
ans=YES N=1819 |
54 |
Correct |
70 ms |
106616 KB |
ans=YES N=1986 |
55 |
Correct |
71 ms |
107180 KB |
ans=YES N=2000 |
56 |
Correct |
72 ms |
107384 KB |
ans=YES N=1834 |
57 |
Correct |
71 ms |
107384 KB |
ans=YES N=1860 |
58 |
Correct |
74 ms |
107368 KB |
ans=YES N=1898 |
59 |
Correct |
68 ms |
107128 KB |
ans=YES N=1832 |
60 |
Correct |
76 ms |
107640 KB |
ans=YES N=1929 |
61 |
Correct |
64 ms |
106744 KB |
ans=YES N=1919 |
62 |
Correct |
70 ms |
107256 KB |
ans=YES N=1882 |
63 |
Correct |
77 ms |
107768 KB |
ans=YES N=1922 |
64 |
Correct |
74 ms |
106872 KB |
ans=YES N=1989 |
65 |
Correct |
68 ms |
107184 KB |
ans=YES N=1978 |
66 |
Correct |
67 ms |
107260 KB |
ans=YES N=1867 |
67 |
Correct |
70 ms |
107148 KB |
ans=YES N=1942 |
68 |
Correct |
575 ms |
128120 KB |
ans=NO N=66151 |
69 |
Correct |
1588 ms |
192888 KB |
ans=NO N=64333 |
70 |
Correct |
559 ms |
124136 KB |
ans=YES N=69316 |
71 |
Correct |
544 ms |
123492 KB |
ans=YES N=66695 |
72 |
Correct |
545 ms |
124132 KB |
ans=YES N=68436 |
73 |
Correct |
544 ms |
124776 KB |
ans=YES N=70000 |
74 |
Correct |
531 ms |
124648 KB |
ans=YES N=68501 |
75 |
Correct |
579 ms |
125544 KB |
ans=YES N=70000 |
76 |
Correct |
611 ms |
126828 KB |
ans=YES N=65009 |
77 |
Correct |
979 ms |
141548 KB |
ans=YES N=67007 |
78 |
Correct |
1046 ms |
148584 KB |
ans=YES N=66357 |
79 |
Correct |
1123 ms |
153340 KB |
ans=YES N=65430 |
80 |
Correct |
1133 ms |
151164 KB |
ans=YES N=65790 |
81 |
Correct |
1097 ms |
147824 KB |
ans=YES N=66020 |
82 |
Correct |
986 ms |
143940 KB |
ans=YES N=65809 |
83 |
Correct |
683 ms |
130928 KB |
ans=YES N=65651 |
84 |
Correct |
1408 ms |
165712 KB |
ans=YES N=68040 |
85 |
Correct |
1229 ms |
157932 KB |
ans=YES N=66570 |
86 |
Correct |
558 ms |
125620 KB |
ans=YES N=65421 |
87 |
Correct |
617 ms |
126572 KB |
ans=YES N=68351 |
88 |
Correct |
482 ms |
123368 KB |
ans=YES N=67027 |
89 |
Correct |
801 ms |
137836 KB |
ans=YES N=68879 |
90 |
Correct |
641 ms |
128104 KB |
ans=YES N=67256 |
91 |
Correct |
1340 ms |
146780 KB |
ans=YES N=148315 |
92 |
Execution timed out |
3591 ms |
310592 KB |
Time limit exceeded |
93 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
551 ms |
128036 KB |
ans=NO N=66151 |
2 |
Correct |
1646 ms |
193016 KB |
ans=NO N=64333 |
3 |
Correct |
536 ms |
124192 KB |
ans=YES N=69316 |
4 |
Correct |
514 ms |
123648 KB |
ans=YES N=66695 |
5 |
Correct |
511 ms |
124008 KB |
ans=YES N=68436 |
6 |
Correct |
534 ms |
124560 KB |
ans=YES N=70000 |
7 |
Correct |
535 ms |
124660 KB |
ans=YES N=68501 |
8 |
Correct |
594 ms |
125732 KB |
ans=YES N=70000 |
9 |
Correct |
648 ms |
126848 KB |
ans=YES N=65009 |
10 |
Correct |
954 ms |
141416 KB |
ans=YES N=67007 |
11 |
Correct |
1041 ms |
148584 KB |
ans=YES N=66357 |
12 |
Correct |
1147 ms |
153424 KB |
ans=YES N=65430 |
13 |
Correct |
1145 ms |
151328 KB |
ans=YES N=65790 |
14 |
Correct |
1052 ms |
147820 KB |
ans=YES N=66020 |
15 |
Correct |
990 ms |
143928 KB |
ans=YES N=65809 |
16 |
Correct |
675 ms |
130932 KB |
ans=YES N=65651 |
17 |
Correct |
1443 ms |
165944 KB |
ans=YES N=68040 |
18 |
Correct |
1221 ms |
158048 KB |
ans=YES N=66570 |
19 |
Correct |
539 ms |
125420 KB |
ans=YES N=65421 |
20 |
Correct |
613 ms |
126712 KB |
ans=YES N=68351 |
21 |
Correct |
528 ms |
123368 KB |
ans=YES N=67027 |
22 |
Correct |
781 ms |
137836 KB |
ans=YES N=68879 |
23 |
Correct |
711 ms |
128104 KB |
ans=YES N=67256 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
89 ms |
109304 KB |
ans=NO N=1934 |
2 |
Correct |
69 ms |
107300 KB |
ans=NO N=1965 |
3 |
Correct |
63 ms |
106528 KB |
ans=YES N=1824 |
4 |
Correct |
64 ms |
106616 KB |
ans=YES N=1981 |
5 |
Correct |
62 ms |
106548 KB |
ans=YES N=1814 |
6 |
Correct |
68 ms |
106744 KB |
ans=YES N=1854 |
7 |
Correct |
64 ms |
106648 KB |
ans=YES N=1831 |
8 |
Correct |
64 ms |
106616 KB |
ans=YES N=2000 |
9 |
Correct |
67 ms |
106872 KB |
ans=YES N=1847 |
10 |
Correct |
67 ms |
106872 KB |
ans=YES N=1819 |
11 |
Correct |
62 ms |
106616 KB |
ans=YES N=1986 |
12 |
Correct |
72 ms |
107384 KB |
ans=YES N=2000 |
13 |
Correct |
71 ms |
107384 KB |
ans=YES N=1834 |
14 |
Correct |
72 ms |
107384 KB |
ans=YES N=1860 |
15 |
Correct |
72 ms |
107512 KB |
ans=YES N=1898 |
16 |
Correct |
71 ms |
107256 KB |
ans=YES N=1832 |
17 |
Correct |
77 ms |
107640 KB |
ans=YES N=1929 |
18 |
Correct |
64 ms |
106744 KB |
ans=YES N=1919 |
19 |
Correct |
69 ms |
107256 KB |
ans=YES N=1882 |
20 |
Correct |
76 ms |
107768 KB |
ans=YES N=1922 |
21 |
Correct |
67 ms |
106872 KB |
ans=YES N=1989 |
22 |
Correct |
67 ms |
107128 KB |
ans=YES N=1978 |
23 |
Correct |
67 ms |
107384 KB |
ans=YES N=1867 |
24 |
Correct |
551 ms |
128036 KB |
ans=NO N=66151 |
25 |
Correct |
1646 ms |
193016 KB |
ans=NO N=64333 |
26 |
Correct |
536 ms |
124192 KB |
ans=YES N=69316 |
27 |
Correct |
514 ms |
123648 KB |
ans=YES N=66695 |
28 |
Correct |
511 ms |
124008 KB |
ans=YES N=68436 |
29 |
Correct |
534 ms |
124560 KB |
ans=YES N=70000 |
30 |
Correct |
535 ms |
124660 KB |
ans=YES N=68501 |
31 |
Correct |
594 ms |
125732 KB |
ans=YES N=70000 |
32 |
Correct |
648 ms |
126848 KB |
ans=YES N=65009 |
33 |
Correct |
954 ms |
141416 KB |
ans=YES N=67007 |
34 |
Correct |
1041 ms |
148584 KB |
ans=YES N=66357 |
35 |
Correct |
1147 ms |
153424 KB |
ans=YES N=65430 |
36 |
Correct |
1145 ms |
151328 KB |
ans=YES N=65790 |
37 |
Correct |
1052 ms |
147820 KB |
ans=YES N=66020 |
38 |
Correct |
990 ms |
143928 KB |
ans=YES N=65809 |
39 |
Correct |
675 ms |
130932 KB |
ans=YES N=65651 |
40 |
Correct |
1443 ms |
165944 KB |
ans=YES N=68040 |
41 |
Correct |
1221 ms |
158048 KB |
ans=YES N=66570 |
42 |
Correct |
539 ms |
125420 KB |
ans=YES N=65421 |
43 |
Correct |
613 ms |
126712 KB |
ans=YES N=68351 |
44 |
Correct |
528 ms |
123368 KB |
ans=YES N=67027 |
45 |
Correct |
781 ms |
137836 KB |
ans=YES N=68879 |
46 |
Correct |
711 ms |
128104 KB |
ans=YES N=67256 |
47 |
Correct |
1417 ms |
146804 KB |
ans=YES N=148315 |
48 |
Execution timed out |
3563 ms |
308748 KB |
Time limit exceeded |
49 |
Halted |
0 ms |
0 KB |
- |