#include<bits/stdc++.h>
#define ll long long
#define pll pair<ll, ll>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define ld long double
using namespace std;
const ll maxn=100005, inf=1e15;
pll dis[maxn*20];
vector <pll> A[maxn*20];
vector <ll> nx, ny, ns, nd;
vector <pll> ho[maxn], ve[maxn], sm[maxn], df[maxn];
vector <ll> pho[maxn], pve[maxn], psm[maxn], pdf[maxn];
vector <ll> sho[maxn], sve[maxn], ssm[maxn], sdf[maxn];
ll crr, x[maxn], y[maxn], poho[maxn], pove[maxn], posm[maxn], podf[maxn];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
ll n; cin >> n; crr=n;
for (ll i=1; i<=n; i++)
{
cin >> x[i] >> y[i]; x[i]*=2, y[i]*=2;
nx.pb(x[i]), ny.pb(y[i]), ns.pb(x[i]+y[i]), nd.pb(x[i]-y[i]);
}
auto compr=[&](vector <ll> &a)
{
sort(a.begin(), a.end());
a.resize(unique(a.begin(), a.end())-a.begin());
return;
};
compr(nx), compr(ny), compr(ns), compr(nd);
for (ll i=1; i<=n; i++)
{
ll h=lower_bound(ny.begin(), ny.end(), y[i])-ny.begin()+1;
ll v=lower_bound(nx.begin(), nx.end(), x[i])-nx.begin()+1;
ll s=lower_bound(ns.begin(), ns.end(), x[i]+y[i])-ns.begin()+1;
ll d=lower_bound(nd.begin(), nd.end(), x[i]-y[i])-nd.begin()+1;
ho[h].pb({x[i], i}), ve[v].pb({y[i], i}), sm[s].pb({x[i], i}), df[d].pb({x[i], i});
poho[i]=h, pove[i]=v, posm[i]=s, podf[i]=d;
}
auto getnodes=[&](vector <pll> &id, vector <ll> &pre, vector <ll> &suf, bool diag)
{
sort(id.begin(), id.end());
pre.resize(id.size()), suf.resize(id.size());
for (ll i=0; i<id.size(); i++)
{
pre[i]=++crr; A[pre[i]].pb({id[i].se, 0});
if (i) A[pre[i]].pb({pre[i-1], (id[i].fi-id[i-1].fi)/(diag?1:2)});
}
for (ll i=(ll)id.size()-1; i>=0; i--)
{
suf[i]=++crr; A[suf[i]].pb({id[i].se, 0});
if (i+1!=id.size()) A[suf[i]].pb({suf[i+1], (id[i+1].fi-id[i].fi)/(diag?1:2)});
}
};
for (ll i=1; i<=ny.size(); i++) getnodes(ho[i], pho[i], sho[i], 0);
for (ll i=1; i<=nx.size(); i++) getnodes(ve[i], pve[i], sve[i], 0);
for (ll i=1; i<=ns.size(); i++) getnodes(sm[i], psm[i], ssm[i], 1);
for (ll i=1; i<=nd.size(); i++) getnodes(df[i], pdf[i], sdf[i], 1);
auto Try=[&](ll direction)
{
for (ll i=1; i<=crr; i++)
dis[i]={inf, 0};
priority_queue <pll, vector <pll>, greater<pll>> q;
auto update=[&](ll v, ll t, ll di)
{
if (t<dis[v].fi)
dis[v]={t, di}, q.push({dis[v].fi, v});
return;
};
auto findpos=[&](vector <pll> &a, ll val, bool up)
{
if (!up) return lower_bound(a.begin(), a.end(), mp(val, 0ll))-a.begin();
return lower_bound(a.begin(), a.end(), mp(val, inf))-a.begin()-1;
};
dis[1]={0, direction}; q.push({dis[1].fi, 1});
while (q.size())
{
ll t=q.top().fi, u=q.top().se; q.pop();
if (t!=dis[u].fi) continue;
ll di=dis[u].se;
if (u>n) for (pll child:A[u])
{
ll v=child.fi, tv=child.se;
update(v, t+tv, di);
}
else if (di==0)
{
ll p=findpos(sm[posm[u]], x[u]-t, 1);
if (p>=0) update(psm[posm[u]][p], x[u]-sm[posm[u]][p].fi, 1);
p=findpos(ve[pove[u]], y[u]+t*2, 0);
if (p<ve[pove[u]].size()) update(sve[pove[u]][p], (ve[pove[u]][p].fi-y[u])/2, 2);
p=findpos(df[podf[u]], x[u]+t, 0);
if (p<df[podf[u]].size()) update(sdf[podf[u]][p], df[podf[u]][p].fi-x[u], 3);
}
else if (di==1)
{
ll p=findpos(df[podf[u]], x[u]+t, 0);
if (p<df[podf[u]].size()) update(sdf[podf[u]][p], df[podf[u]][p].fi-x[u], 2);
p=findpos(ho[poho[u]], x[u]+2*t, 0);
if (p<ho[poho[u]].size()) update(sho[poho[u]][p], (ho[poho[u]][p].fi-x[u])/2, 3);
p=findpos(sm[posm[u]], x[u]+t, 0);
if (p<sm[posm[u]].size()) update(ssm[posm[u]][p], sm[posm[u]][p].fi-x[u], 0);
}
else if (di==2)
{
ll p=findpos(sm[posm[u]], x[u]+t, 0);
if (p<sm[posm[u]].size()) update(ssm[posm[u]][p], sm[posm[u]][p].fi-x[u], 3);
p=findpos(ve[pove[u]], y[u]-t*2, 1);
if (p>=0) update(pve[pove[u]][p], (y[u]-ve[pove[u]][p].fi)/2, 0);
p=findpos(df[podf[u]], x[u]-t, 1);
if (p>=0) update(pdf[podf[u]][p], x[u]-df[podf[u]][p].fi, 1);
}
else
{
ll p=findpos(df[podf[u]], x[u]-t, 1);
if (p>=0) update(pdf[podf[u]][p], x[u]-df[podf[u]][p].fi, 0);
p=findpos(ho[poho[u]], x[u]-t*2, 1);
if (p>=0) update(pho[poho[u]][p], (x[u]-ho[poho[u]][p].fi)/2, 1);
p=findpos(sm[posm[u]], x[u]-t, 1);
if (p>=0) update(psm[posm[u]][p], x[u]-sm[posm[u]][p].fi, 2);
}
}
ll cnt=0;
for (ll i=1; i<=n; i++)
if (dis[i].fi<inf) cnt++;
return cnt;
};
ll ans=1;
for (ll i=0; i<4; i++)
ans=max(ans, Try(i));
cout << ans << "\n";
}
Compilation message
fever.cpp: In lambda function:
fever.cpp:50:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
50 | for (ll i=0; i<id.size(); i++)
| ~^~~~~~~~~~
fever.cpp:58:20: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
58 | if (i+1!=id.size()) A[suf[i]].pb({suf[i+1], (id[i+1].fi-id[i].fi)/(diag?1:2)});
| ~~~^~~~~~~~~~~
fever.cpp: In function 'int main()':
fever.cpp:61:19: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
61 | for (ll i=1; i<=ny.size(); i++) getnodes(ho[i], pho[i], sho[i], 0);
| ~^~~~~~~~~~~
fever.cpp:62:19: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
62 | for (ll i=1; i<=nx.size(); i++) getnodes(ve[i], pve[i], sve[i], 0);
| ~^~~~~~~~~~~
fever.cpp:63:19: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
63 | for (ll i=1; i<=ns.size(); i++) getnodes(sm[i], psm[i], ssm[i], 1);
| ~^~~~~~~~~~~
fever.cpp:64:19: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
64 | for (ll i=1; i<=nd.size(); i++) getnodes(df[i], pdf[i], sdf[i], 1);
| ~^~~~~~~~~~~
fever.cpp: In lambda function:
fever.cpp:97:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
97 | if (p<ve[pove[u]].size()) update(sve[pove[u]][p], (ve[pove[u]][p].fi-y[u])/2, 2);
| ~^~~~~~~~~~~~~~~~~~~
fever.cpp:99:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
99 | if (p<df[podf[u]].size()) update(sdf[podf[u]][p], df[podf[u]][p].fi-x[u], 3);
| ~^~~~~~~~~~~~~~~~~~~
fever.cpp:104:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
104 | if (p<df[podf[u]].size()) update(sdf[podf[u]][p], df[podf[u]][p].fi-x[u], 2);
| ~^~~~~~~~~~~~~~~~~~~
fever.cpp:106:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
106 | if (p<ho[poho[u]].size()) update(sho[poho[u]][p], (ho[poho[u]][p].fi-x[u])/2, 3);
| ~^~~~~~~~~~~~~~~~~~~
fever.cpp:108:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
108 | if (p<sm[posm[u]].size()) update(ssm[posm[u]][p], sm[posm[u]][p].fi-x[u], 0);
| ~^~~~~~~~~~~~~~~~~~~
fever.cpp:113:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
113 | if (p<sm[posm[u]].size()) update(ssm[posm[u]][p], sm[posm[u]][p].fi-x[u], 3);
| ~^~~~~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
23 ms |
80476 KB |
Output is correct |
2 |
Correct |
22 ms |
80332 KB |
Output is correct |
3 |
Correct |
22 ms |
80448 KB |
Output is correct |
4 |
Correct |
22 ms |
80472 KB |
Output is correct |
5 |
Correct |
23 ms |
80476 KB |
Output is correct |
6 |
Correct |
27 ms |
80412 KB |
Output is correct |
7 |
Correct |
25 ms |
80476 KB |
Output is correct |
8 |
Correct |
25 ms |
80476 KB |
Output is correct |
9 |
Correct |
23 ms |
80728 KB |
Output is correct |
10 |
Correct |
23 ms |
80476 KB |
Output is correct |
11 |
Correct |
22 ms |
80476 KB |
Output is correct |
12 |
Correct |
22 ms |
80492 KB |
Output is correct |
13 |
Correct |
22 ms |
80476 KB |
Output is correct |
14 |
Correct |
24 ms |
80732 KB |
Output is correct |
15 |
Correct |
24 ms |
80472 KB |
Output is correct |
16 |
Correct |
22 ms |
80472 KB |
Output is correct |
17 |
Correct |
22 ms |
80476 KB |
Output is correct |
18 |
Correct |
24 ms |
80344 KB |
Output is correct |
19 |
Correct |
25 ms |
80384 KB |
Output is correct |
20 |
Correct |
23 ms |
80472 KB |
Output is correct |
21 |
Correct |
23 ms |
80492 KB |
Output is correct |
22 |
Correct |
22 ms |
80400 KB |
Output is correct |
23 |
Correct |
23 ms |
80476 KB |
Output is correct |
24 |
Correct |
24 ms |
80476 KB |
Output is correct |
25 |
Correct |
23 ms |
80492 KB |
Output is correct |
26 |
Correct |
22 ms |
80476 KB |
Output is correct |
27 |
Correct |
22 ms |
80472 KB |
Output is correct |
28 |
Correct |
23 ms |
80476 KB |
Output is correct |
29 |
Correct |
24 ms |
80472 KB |
Output is correct |
30 |
Correct |
23 ms |
80472 KB |
Output is correct |
31 |
Correct |
24 ms |
80476 KB |
Output is correct |
32 |
Correct |
24 ms |
80472 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
23 ms |
80476 KB |
Output is correct |
2 |
Correct |
22 ms |
80332 KB |
Output is correct |
3 |
Correct |
22 ms |
80448 KB |
Output is correct |
4 |
Correct |
22 ms |
80472 KB |
Output is correct |
5 |
Correct |
23 ms |
80476 KB |
Output is correct |
6 |
Correct |
27 ms |
80412 KB |
Output is correct |
7 |
Correct |
25 ms |
80476 KB |
Output is correct |
8 |
Correct |
25 ms |
80476 KB |
Output is correct |
9 |
Correct |
23 ms |
80728 KB |
Output is correct |
10 |
Correct |
23 ms |
80476 KB |
Output is correct |
11 |
Correct |
22 ms |
80476 KB |
Output is correct |
12 |
Correct |
22 ms |
80492 KB |
Output is correct |
13 |
Correct |
22 ms |
80476 KB |
Output is correct |
14 |
Correct |
24 ms |
80732 KB |
Output is correct |
15 |
Correct |
24 ms |
80472 KB |
Output is correct |
16 |
Correct |
22 ms |
80472 KB |
Output is correct |
17 |
Correct |
22 ms |
80476 KB |
Output is correct |
18 |
Correct |
24 ms |
80344 KB |
Output is correct |
19 |
Correct |
25 ms |
80384 KB |
Output is correct |
20 |
Correct |
23 ms |
80472 KB |
Output is correct |
21 |
Correct |
23 ms |
80492 KB |
Output is correct |
22 |
Correct |
22 ms |
80400 KB |
Output is correct |
23 |
Correct |
23 ms |
80476 KB |
Output is correct |
24 |
Correct |
24 ms |
80476 KB |
Output is correct |
25 |
Correct |
23 ms |
80492 KB |
Output is correct |
26 |
Correct |
22 ms |
80476 KB |
Output is correct |
27 |
Correct |
22 ms |
80472 KB |
Output is correct |
28 |
Correct |
23 ms |
80476 KB |
Output is correct |
29 |
Correct |
24 ms |
80472 KB |
Output is correct |
30 |
Correct |
23 ms |
80472 KB |
Output is correct |
31 |
Correct |
24 ms |
80476 KB |
Output is correct |
32 |
Correct |
24 ms |
80472 KB |
Output is correct |
33 |
Correct |
23 ms |
80476 KB |
Output is correct |
34 |
Correct |
22 ms |
80472 KB |
Output is correct |
35 |
Correct |
22 ms |
80476 KB |
Output is correct |
36 |
Correct |
23 ms |
80472 KB |
Output is correct |
37 |
Correct |
22 ms |
80476 KB |
Output is correct |
38 |
Correct |
22 ms |
80424 KB |
Output is correct |
39 |
Correct |
22 ms |
80476 KB |
Output is correct |
40 |
Correct |
22 ms |
80472 KB |
Output is correct |
41 |
Correct |
22 ms |
80472 KB |
Output is correct |
42 |
Correct |
22 ms |
80476 KB |
Output is correct |
43 |
Correct |
22 ms |
80332 KB |
Output is correct |
44 |
Correct |
23 ms |
80476 KB |
Output is correct |
45 |
Correct |
23 ms |
80476 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
23 ms |
80472 KB |
Output is correct |
2 |
Correct |
25 ms |
80656 KB |
Output is correct |
3 |
Correct |
23 ms |
80556 KB |
Output is correct |
4 |
Correct |
23 ms |
80728 KB |
Output is correct |
5 |
Correct |
23 ms |
80476 KB |
Output is correct |
6 |
Correct |
23 ms |
80472 KB |
Output is correct |
7 |
Correct |
23 ms |
80420 KB |
Output is correct |
8 |
Correct |
22 ms |
80476 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
23 ms |
80476 KB |
Output is correct |
2 |
Correct |
22 ms |
80332 KB |
Output is correct |
3 |
Correct |
22 ms |
80448 KB |
Output is correct |
4 |
Correct |
22 ms |
80472 KB |
Output is correct |
5 |
Correct |
23 ms |
80476 KB |
Output is correct |
6 |
Correct |
27 ms |
80412 KB |
Output is correct |
7 |
Correct |
25 ms |
80476 KB |
Output is correct |
8 |
Correct |
25 ms |
80476 KB |
Output is correct |
9 |
Correct |
23 ms |
80728 KB |
Output is correct |
10 |
Correct |
23 ms |
80476 KB |
Output is correct |
11 |
Correct |
22 ms |
80476 KB |
Output is correct |
12 |
Correct |
22 ms |
80492 KB |
Output is correct |
13 |
Correct |
22 ms |
80476 KB |
Output is correct |
14 |
Correct |
24 ms |
80732 KB |
Output is correct |
15 |
Correct |
24 ms |
80472 KB |
Output is correct |
16 |
Correct |
22 ms |
80472 KB |
Output is correct |
17 |
Correct |
22 ms |
80476 KB |
Output is correct |
18 |
Correct |
24 ms |
80344 KB |
Output is correct |
19 |
Correct |
25 ms |
80384 KB |
Output is correct |
20 |
Correct |
23 ms |
80472 KB |
Output is correct |
21 |
Correct |
23 ms |
80492 KB |
Output is correct |
22 |
Correct |
22 ms |
80400 KB |
Output is correct |
23 |
Correct |
23 ms |
80476 KB |
Output is correct |
24 |
Correct |
24 ms |
80476 KB |
Output is correct |
25 |
Correct |
23 ms |
80492 KB |
Output is correct |
26 |
Correct |
22 ms |
80476 KB |
Output is correct |
27 |
Correct |
22 ms |
80472 KB |
Output is correct |
28 |
Correct |
23 ms |
80476 KB |
Output is correct |
29 |
Correct |
24 ms |
80472 KB |
Output is correct |
30 |
Correct |
23 ms |
80472 KB |
Output is correct |
31 |
Correct |
24 ms |
80476 KB |
Output is correct |
32 |
Correct |
24 ms |
80472 KB |
Output is correct |
33 |
Correct |
23 ms |
80476 KB |
Output is correct |
34 |
Correct |
22 ms |
80472 KB |
Output is correct |
35 |
Correct |
22 ms |
80476 KB |
Output is correct |
36 |
Correct |
23 ms |
80472 KB |
Output is correct |
37 |
Correct |
22 ms |
80476 KB |
Output is correct |
38 |
Correct |
22 ms |
80424 KB |
Output is correct |
39 |
Correct |
22 ms |
80476 KB |
Output is correct |
40 |
Correct |
22 ms |
80472 KB |
Output is correct |
41 |
Correct |
22 ms |
80472 KB |
Output is correct |
42 |
Correct |
22 ms |
80476 KB |
Output is correct |
43 |
Correct |
22 ms |
80332 KB |
Output is correct |
44 |
Correct |
23 ms |
80476 KB |
Output is correct |
45 |
Correct |
23 ms |
80476 KB |
Output is correct |
46 |
Correct |
23 ms |
80472 KB |
Output is correct |
47 |
Correct |
25 ms |
80656 KB |
Output is correct |
48 |
Correct |
23 ms |
80556 KB |
Output is correct |
49 |
Correct |
23 ms |
80728 KB |
Output is correct |
50 |
Correct |
23 ms |
80476 KB |
Output is correct |
51 |
Correct |
23 ms |
80472 KB |
Output is correct |
52 |
Correct |
23 ms |
80420 KB |
Output is correct |
53 |
Correct |
22 ms |
80476 KB |
Output is correct |
54 |
Correct |
22 ms |
80476 KB |
Output is correct |
55 |
Correct |
22 ms |
80472 KB |
Output is correct |
56 |
Correct |
25 ms |
80476 KB |
Output is correct |
57 |
Correct |
24 ms |
80484 KB |
Output is correct |
58 |
Correct |
22 ms |
80416 KB |
Output is correct |
59 |
Correct |
23 ms |
80484 KB |
Output is correct |
60 |
Correct |
23 ms |
80404 KB |
Output is correct |
61 |
Correct |
24 ms |
80476 KB |
Output is correct |
62 |
Correct |
23 ms |
80556 KB |
Output is correct |
63 |
Correct |
23 ms |
80476 KB |
Output is correct |
64 |
Correct |
24 ms |
80476 KB |
Output is correct |
65 |
Correct |
23 ms |
80476 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
23 ms |
80476 KB |
Output is correct |
2 |
Correct |
22 ms |
80332 KB |
Output is correct |
3 |
Correct |
22 ms |
80448 KB |
Output is correct |
4 |
Correct |
22 ms |
80472 KB |
Output is correct |
5 |
Correct |
23 ms |
80476 KB |
Output is correct |
6 |
Correct |
27 ms |
80412 KB |
Output is correct |
7 |
Correct |
25 ms |
80476 KB |
Output is correct |
8 |
Correct |
25 ms |
80476 KB |
Output is correct |
9 |
Correct |
23 ms |
80728 KB |
Output is correct |
10 |
Correct |
23 ms |
80476 KB |
Output is correct |
11 |
Correct |
22 ms |
80476 KB |
Output is correct |
12 |
Correct |
22 ms |
80492 KB |
Output is correct |
13 |
Correct |
22 ms |
80476 KB |
Output is correct |
14 |
Correct |
24 ms |
80732 KB |
Output is correct |
15 |
Correct |
24 ms |
80472 KB |
Output is correct |
16 |
Correct |
22 ms |
80472 KB |
Output is correct |
17 |
Correct |
22 ms |
80476 KB |
Output is correct |
18 |
Correct |
24 ms |
80344 KB |
Output is correct |
19 |
Correct |
25 ms |
80384 KB |
Output is correct |
20 |
Correct |
23 ms |
80472 KB |
Output is correct |
21 |
Correct |
23 ms |
80492 KB |
Output is correct |
22 |
Correct |
22 ms |
80400 KB |
Output is correct |
23 |
Correct |
23 ms |
80476 KB |
Output is correct |
24 |
Correct |
24 ms |
80476 KB |
Output is correct |
25 |
Correct |
23 ms |
80492 KB |
Output is correct |
26 |
Correct |
22 ms |
80476 KB |
Output is correct |
27 |
Correct |
22 ms |
80472 KB |
Output is correct |
28 |
Correct |
23 ms |
80476 KB |
Output is correct |
29 |
Correct |
24 ms |
80472 KB |
Output is correct |
30 |
Correct |
23 ms |
80472 KB |
Output is correct |
31 |
Correct |
24 ms |
80476 KB |
Output is correct |
32 |
Correct |
24 ms |
80472 KB |
Output is correct |
33 |
Correct |
23 ms |
80476 KB |
Output is correct |
34 |
Correct |
22 ms |
80472 KB |
Output is correct |
35 |
Correct |
22 ms |
80476 KB |
Output is correct |
36 |
Correct |
23 ms |
80472 KB |
Output is correct |
37 |
Correct |
22 ms |
80476 KB |
Output is correct |
38 |
Correct |
22 ms |
80424 KB |
Output is correct |
39 |
Correct |
22 ms |
80476 KB |
Output is correct |
40 |
Correct |
22 ms |
80472 KB |
Output is correct |
41 |
Correct |
22 ms |
80472 KB |
Output is correct |
42 |
Correct |
22 ms |
80476 KB |
Output is correct |
43 |
Correct |
22 ms |
80332 KB |
Output is correct |
44 |
Correct |
23 ms |
80476 KB |
Output is correct |
45 |
Correct |
23 ms |
80476 KB |
Output is correct |
46 |
Correct |
23 ms |
80472 KB |
Output is correct |
47 |
Correct |
25 ms |
80656 KB |
Output is correct |
48 |
Correct |
23 ms |
80556 KB |
Output is correct |
49 |
Correct |
23 ms |
80728 KB |
Output is correct |
50 |
Correct |
23 ms |
80476 KB |
Output is correct |
51 |
Correct |
23 ms |
80472 KB |
Output is correct |
52 |
Correct |
23 ms |
80420 KB |
Output is correct |
53 |
Correct |
22 ms |
80476 KB |
Output is correct |
54 |
Correct |
22 ms |
80476 KB |
Output is correct |
55 |
Correct |
22 ms |
80472 KB |
Output is correct |
56 |
Correct |
25 ms |
80476 KB |
Output is correct |
57 |
Correct |
24 ms |
80484 KB |
Output is correct |
58 |
Correct |
22 ms |
80416 KB |
Output is correct |
59 |
Correct |
23 ms |
80484 KB |
Output is correct |
60 |
Correct |
23 ms |
80404 KB |
Output is correct |
61 |
Correct |
24 ms |
80476 KB |
Output is correct |
62 |
Correct |
23 ms |
80556 KB |
Output is correct |
63 |
Correct |
23 ms |
80476 KB |
Output is correct |
64 |
Correct |
24 ms |
80476 KB |
Output is correct |
65 |
Correct |
23 ms |
80476 KB |
Output is correct |
66 |
Correct |
29 ms |
84312 KB |
Output is correct |
67 |
Correct |
32 ms |
84444 KB |
Output is correct |
68 |
Correct |
28 ms |
84508 KB |
Output is correct |
69 |
Correct |
33 ms |
84060 KB |
Output is correct |
70 |
Correct |
31 ms |
84284 KB |
Output is correct |
71 |
Correct |
29 ms |
84204 KB |
Output is correct |
72 |
Correct |
30 ms |
84204 KB |
Output is correct |
73 |
Correct |
32 ms |
84304 KB |
Output is correct |
74 |
Correct |
29 ms |
84316 KB |
Output is correct |
75 |
Correct |
29 ms |
84316 KB |
Output is correct |
76 |
Correct |
29 ms |
84316 KB |
Output is correct |
77 |
Correct |
29 ms |
84316 KB |
Output is correct |
78 |
Correct |
33 ms |
84532 KB |
Output is correct |
79 |
Correct |
30 ms |
84316 KB |
Output is correct |
80 |
Correct |
32 ms |
84316 KB |
Output is correct |
81 |
Correct |
30 ms |
84316 KB |
Output is correct |
82 |
Correct |
28 ms |
84312 KB |
Output is correct |
83 |
Correct |
29 ms |
84316 KB |
Output is correct |
84 |
Correct |
30 ms |
84072 KB |
Output is correct |
85 |
Correct |
26 ms |
84316 KB |
Output is correct |
86 |
Correct |
28 ms |
84200 KB |
Output is correct |
87 |
Correct |
29 ms |
84304 KB |
Output is correct |
88 |
Correct |
31 ms |
84336 KB |
Output is correct |
89 |
Correct |
29 ms |
84304 KB |
Output is correct |
90 |
Correct |
29 ms |
84316 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
23 ms |
80476 KB |
Output is correct |
2 |
Correct |
22 ms |
80332 KB |
Output is correct |
3 |
Correct |
22 ms |
80448 KB |
Output is correct |
4 |
Correct |
22 ms |
80472 KB |
Output is correct |
5 |
Correct |
23 ms |
80476 KB |
Output is correct |
6 |
Correct |
27 ms |
80412 KB |
Output is correct |
7 |
Correct |
25 ms |
80476 KB |
Output is correct |
8 |
Correct |
25 ms |
80476 KB |
Output is correct |
9 |
Correct |
23 ms |
80728 KB |
Output is correct |
10 |
Correct |
23 ms |
80476 KB |
Output is correct |
11 |
Correct |
22 ms |
80476 KB |
Output is correct |
12 |
Correct |
22 ms |
80492 KB |
Output is correct |
13 |
Correct |
22 ms |
80476 KB |
Output is correct |
14 |
Correct |
24 ms |
80732 KB |
Output is correct |
15 |
Correct |
24 ms |
80472 KB |
Output is correct |
16 |
Correct |
22 ms |
80472 KB |
Output is correct |
17 |
Correct |
22 ms |
80476 KB |
Output is correct |
18 |
Correct |
24 ms |
80344 KB |
Output is correct |
19 |
Correct |
25 ms |
80384 KB |
Output is correct |
20 |
Correct |
23 ms |
80472 KB |
Output is correct |
21 |
Correct |
23 ms |
80492 KB |
Output is correct |
22 |
Correct |
22 ms |
80400 KB |
Output is correct |
23 |
Correct |
23 ms |
80476 KB |
Output is correct |
24 |
Correct |
24 ms |
80476 KB |
Output is correct |
25 |
Correct |
23 ms |
80492 KB |
Output is correct |
26 |
Correct |
22 ms |
80476 KB |
Output is correct |
27 |
Correct |
22 ms |
80472 KB |
Output is correct |
28 |
Correct |
23 ms |
80476 KB |
Output is correct |
29 |
Correct |
24 ms |
80472 KB |
Output is correct |
30 |
Correct |
23 ms |
80472 KB |
Output is correct |
31 |
Correct |
24 ms |
80476 KB |
Output is correct |
32 |
Correct |
24 ms |
80472 KB |
Output is correct |
33 |
Correct |
23 ms |
80476 KB |
Output is correct |
34 |
Correct |
22 ms |
80472 KB |
Output is correct |
35 |
Correct |
22 ms |
80476 KB |
Output is correct |
36 |
Correct |
23 ms |
80472 KB |
Output is correct |
37 |
Correct |
22 ms |
80476 KB |
Output is correct |
38 |
Correct |
22 ms |
80424 KB |
Output is correct |
39 |
Correct |
22 ms |
80476 KB |
Output is correct |
40 |
Correct |
22 ms |
80472 KB |
Output is correct |
41 |
Correct |
22 ms |
80472 KB |
Output is correct |
42 |
Correct |
22 ms |
80476 KB |
Output is correct |
43 |
Correct |
22 ms |
80332 KB |
Output is correct |
44 |
Correct |
23 ms |
80476 KB |
Output is correct |
45 |
Correct |
23 ms |
80476 KB |
Output is correct |
46 |
Correct |
23 ms |
80472 KB |
Output is correct |
47 |
Correct |
25 ms |
80656 KB |
Output is correct |
48 |
Correct |
23 ms |
80556 KB |
Output is correct |
49 |
Correct |
23 ms |
80728 KB |
Output is correct |
50 |
Correct |
23 ms |
80476 KB |
Output is correct |
51 |
Correct |
23 ms |
80472 KB |
Output is correct |
52 |
Correct |
23 ms |
80420 KB |
Output is correct |
53 |
Correct |
22 ms |
80476 KB |
Output is correct |
54 |
Correct |
22 ms |
80476 KB |
Output is correct |
55 |
Correct |
22 ms |
80472 KB |
Output is correct |
56 |
Correct |
25 ms |
80476 KB |
Output is correct |
57 |
Correct |
24 ms |
80484 KB |
Output is correct |
58 |
Correct |
22 ms |
80416 KB |
Output is correct |
59 |
Correct |
23 ms |
80484 KB |
Output is correct |
60 |
Correct |
23 ms |
80404 KB |
Output is correct |
61 |
Correct |
24 ms |
80476 KB |
Output is correct |
62 |
Correct |
23 ms |
80556 KB |
Output is correct |
63 |
Correct |
23 ms |
80476 KB |
Output is correct |
64 |
Correct |
24 ms |
80476 KB |
Output is correct |
65 |
Correct |
23 ms |
80476 KB |
Output is correct |
66 |
Correct |
256 ms |
143560 KB |
Output is correct |
67 |
Correct |
371 ms |
158236 KB |
Output is correct |
68 |
Correct |
350 ms |
160732 KB |
Output is correct |
69 |
Correct |
344 ms |
157600 KB |
Output is correct |
70 |
Correct |
441 ms |
157536 KB |
Output is correct |
71 |
Correct |
370 ms |
160676 KB |
Output is correct |
72 |
Correct |
366 ms |
160668 KB |
Output is correct |
73 |
Correct |
319 ms |
157756 KB |
Output is correct |
74 |
Correct |
332 ms |
160680 KB |
Output is correct |
75 |
Correct |
399 ms |
160548 KB |
Output is correct |
76 |
Correct |
322 ms |
157784 KB |
Output is correct |
77 |
Correct |
354 ms |
160676 KB |
Output is correct |
78 |
Correct |
368 ms |
156076 KB |
Output is correct |
79 |
Correct |
401 ms |
156080 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
23 ms |
80476 KB |
Output is correct |
2 |
Correct |
22 ms |
80332 KB |
Output is correct |
3 |
Correct |
22 ms |
80448 KB |
Output is correct |
4 |
Correct |
22 ms |
80472 KB |
Output is correct |
5 |
Correct |
23 ms |
80476 KB |
Output is correct |
6 |
Correct |
27 ms |
80412 KB |
Output is correct |
7 |
Correct |
25 ms |
80476 KB |
Output is correct |
8 |
Correct |
25 ms |
80476 KB |
Output is correct |
9 |
Correct |
23 ms |
80728 KB |
Output is correct |
10 |
Correct |
23 ms |
80476 KB |
Output is correct |
11 |
Correct |
22 ms |
80476 KB |
Output is correct |
12 |
Correct |
22 ms |
80492 KB |
Output is correct |
13 |
Correct |
22 ms |
80476 KB |
Output is correct |
14 |
Correct |
24 ms |
80732 KB |
Output is correct |
15 |
Correct |
24 ms |
80472 KB |
Output is correct |
16 |
Correct |
22 ms |
80472 KB |
Output is correct |
17 |
Correct |
22 ms |
80476 KB |
Output is correct |
18 |
Correct |
24 ms |
80344 KB |
Output is correct |
19 |
Correct |
25 ms |
80384 KB |
Output is correct |
20 |
Correct |
23 ms |
80472 KB |
Output is correct |
21 |
Correct |
23 ms |
80492 KB |
Output is correct |
22 |
Correct |
22 ms |
80400 KB |
Output is correct |
23 |
Correct |
23 ms |
80476 KB |
Output is correct |
24 |
Correct |
24 ms |
80476 KB |
Output is correct |
25 |
Correct |
23 ms |
80492 KB |
Output is correct |
26 |
Correct |
22 ms |
80476 KB |
Output is correct |
27 |
Correct |
22 ms |
80472 KB |
Output is correct |
28 |
Correct |
23 ms |
80476 KB |
Output is correct |
29 |
Correct |
24 ms |
80472 KB |
Output is correct |
30 |
Correct |
23 ms |
80472 KB |
Output is correct |
31 |
Correct |
24 ms |
80476 KB |
Output is correct |
32 |
Correct |
24 ms |
80472 KB |
Output is correct |
33 |
Correct |
23 ms |
80476 KB |
Output is correct |
34 |
Correct |
22 ms |
80472 KB |
Output is correct |
35 |
Correct |
22 ms |
80476 KB |
Output is correct |
36 |
Correct |
23 ms |
80472 KB |
Output is correct |
37 |
Correct |
22 ms |
80476 KB |
Output is correct |
38 |
Correct |
22 ms |
80424 KB |
Output is correct |
39 |
Correct |
22 ms |
80476 KB |
Output is correct |
40 |
Correct |
22 ms |
80472 KB |
Output is correct |
41 |
Correct |
22 ms |
80472 KB |
Output is correct |
42 |
Correct |
22 ms |
80476 KB |
Output is correct |
43 |
Correct |
22 ms |
80332 KB |
Output is correct |
44 |
Correct |
23 ms |
80476 KB |
Output is correct |
45 |
Correct |
23 ms |
80476 KB |
Output is correct |
46 |
Correct |
23 ms |
80472 KB |
Output is correct |
47 |
Correct |
25 ms |
80656 KB |
Output is correct |
48 |
Correct |
23 ms |
80556 KB |
Output is correct |
49 |
Correct |
23 ms |
80728 KB |
Output is correct |
50 |
Correct |
23 ms |
80476 KB |
Output is correct |
51 |
Correct |
23 ms |
80472 KB |
Output is correct |
52 |
Correct |
23 ms |
80420 KB |
Output is correct |
53 |
Correct |
22 ms |
80476 KB |
Output is correct |
54 |
Correct |
22 ms |
80476 KB |
Output is correct |
55 |
Correct |
22 ms |
80472 KB |
Output is correct |
56 |
Correct |
25 ms |
80476 KB |
Output is correct |
57 |
Correct |
24 ms |
80484 KB |
Output is correct |
58 |
Correct |
22 ms |
80416 KB |
Output is correct |
59 |
Correct |
23 ms |
80484 KB |
Output is correct |
60 |
Correct |
23 ms |
80404 KB |
Output is correct |
61 |
Correct |
24 ms |
80476 KB |
Output is correct |
62 |
Correct |
23 ms |
80556 KB |
Output is correct |
63 |
Correct |
23 ms |
80476 KB |
Output is correct |
64 |
Correct |
24 ms |
80476 KB |
Output is correct |
65 |
Correct |
23 ms |
80476 KB |
Output is correct |
66 |
Correct |
29 ms |
84312 KB |
Output is correct |
67 |
Correct |
32 ms |
84444 KB |
Output is correct |
68 |
Correct |
28 ms |
84508 KB |
Output is correct |
69 |
Correct |
33 ms |
84060 KB |
Output is correct |
70 |
Correct |
31 ms |
84284 KB |
Output is correct |
71 |
Correct |
29 ms |
84204 KB |
Output is correct |
72 |
Correct |
30 ms |
84204 KB |
Output is correct |
73 |
Correct |
32 ms |
84304 KB |
Output is correct |
74 |
Correct |
29 ms |
84316 KB |
Output is correct |
75 |
Correct |
29 ms |
84316 KB |
Output is correct |
76 |
Correct |
29 ms |
84316 KB |
Output is correct |
77 |
Correct |
29 ms |
84316 KB |
Output is correct |
78 |
Correct |
33 ms |
84532 KB |
Output is correct |
79 |
Correct |
30 ms |
84316 KB |
Output is correct |
80 |
Correct |
32 ms |
84316 KB |
Output is correct |
81 |
Correct |
30 ms |
84316 KB |
Output is correct |
82 |
Correct |
28 ms |
84312 KB |
Output is correct |
83 |
Correct |
29 ms |
84316 KB |
Output is correct |
84 |
Correct |
30 ms |
84072 KB |
Output is correct |
85 |
Correct |
26 ms |
84316 KB |
Output is correct |
86 |
Correct |
28 ms |
84200 KB |
Output is correct |
87 |
Correct |
29 ms |
84304 KB |
Output is correct |
88 |
Correct |
31 ms |
84336 KB |
Output is correct |
89 |
Correct |
29 ms |
84304 KB |
Output is correct |
90 |
Correct |
29 ms |
84316 KB |
Output is correct |
91 |
Correct |
256 ms |
143560 KB |
Output is correct |
92 |
Correct |
371 ms |
158236 KB |
Output is correct |
93 |
Correct |
350 ms |
160732 KB |
Output is correct |
94 |
Correct |
344 ms |
157600 KB |
Output is correct |
95 |
Correct |
441 ms |
157536 KB |
Output is correct |
96 |
Correct |
370 ms |
160676 KB |
Output is correct |
97 |
Correct |
366 ms |
160668 KB |
Output is correct |
98 |
Correct |
319 ms |
157756 KB |
Output is correct |
99 |
Correct |
332 ms |
160680 KB |
Output is correct |
100 |
Correct |
399 ms |
160548 KB |
Output is correct |
101 |
Correct |
322 ms |
157784 KB |
Output is correct |
102 |
Correct |
354 ms |
160676 KB |
Output is correct |
103 |
Correct |
368 ms |
156076 KB |
Output is correct |
104 |
Correct |
401 ms |
156080 KB |
Output is correct |
105 |
Correct |
413 ms |
139172 KB |
Output is correct |
106 |
Correct |
494 ms |
150956 KB |
Output is correct |
107 |
Correct |
873 ms |
153256 KB |
Output is correct |
108 |
Correct |
652 ms |
151976 KB |
Output is correct |
109 |
Correct |
243 ms |
151980 KB |
Output is correct |
110 |
Correct |
328 ms |
156328 KB |
Output is correct |
111 |
Correct |
372 ms |
162476 KB |
Output is correct |
112 |
Correct |
387 ms |
160680 KB |
Output is correct |
113 |
Correct |
330 ms |
160420 KB |
Output is correct |
114 |
Correct |
721 ms |
153512 KB |
Output is correct |
115 |
Correct |
355 ms |
159916 KB |
Output is correct |
116 |
Correct |
346 ms |
160656 KB |
Output is correct |
117 |
Correct |
416 ms |
160392 KB |
Output is correct |
118 |
Correct |
561 ms |
157372 KB |
Output is correct |
119 |
Correct |
425 ms |
159660 KB |
Output is correct |
120 |
Correct |
347 ms |
160660 KB |
Output is correct |
121 |
Correct |
364 ms |
161692 KB |
Output is correct |
122 |
Correct |
415 ms |
160940 KB |
Output is correct |
123 |
Correct |
357 ms |
158888 KB |
Output is correct |
124 |
Correct |
388 ms |
159584 KB |
Output is correct |
125 |
Correct |
192 ms |
151724 KB |
Output is correct |
126 |
Correct |
146 ms |
151968 KB |
Output is correct |
127 |
Correct |
158 ms |
153536 KB |
Output is correct |
128 |
Correct |
151 ms |
153092 KB |
Output is correct |
129 |
Correct |
157 ms |
150944 KB |
Output is correct |