답안 #916702

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
916702 2024-01-26T10:15:51 Z Tuanlinh123 IOI 바이러스 (JOI21_fever) C++17
57 / 100
418 ms 165880 KB
#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<=nx.size(); i++) getnodes(ho[i], pho[i], sho[i], 0);
    for (ll i=1; i<=ny.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<=nx.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<=ny.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 80476 KB Output is correct
3 Correct 23 ms 80472 KB Output is correct
4 Correct 23 ms 80472 KB Output is correct
5 Correct 23 ms 80472 KB Output is correct
6 Correct 23 ms 80476 KB Output is correct
7 Correct 23 ms 80396 KB Output is correct
8 Correct 23 ms 80476 KB Output is correct
9 Correct 22 ms 80476 KB Output is correct
10 Correct 23 ms 80476 KB Output is correct
11 Correct 24 ms 80720 KB Output is correct
12 Correct 23 ms 80476 KB Output is correct
13 Correct 22 ms 80476 KB Output is correct
14 Correct 23 ms 80404 KB Output is correct
15 Correct 22 ms 80488 KB Output is correct
16 Correct 23 ms 80476 KB Output is correct
17 Correct 22 ms 80496 KB Output is correct
18 Correct 23 ms 80472 KB Output is correct
19 Correct 23 ms 80472 KB Output is correct
20 Correct 22 ms 80488 KB Output is correct
21 Correct 23 ms 80476 KB Output is correct
22 Correct 22 ms 80408 KB Output is correct
23 Correct 23 ms 80352 KB Output is correct
24 Correct 23 ms 80476 KB Output is correct
25 Correct 23 ms 80472 KB Output is correct
26 Correct 23 ms 80476 KB Output is correct
27 Correct 22 ms 80472 KB Output is correct
28 Correct 22 ms 80476 KB Output is correct
29 Correct 22 ms 80476 KB Output is correct
30 Correct 25 ms 80472 KB Output is correct
31 Correct 23 ms 80472 KB Output is correct
32 Correct 23 ms 80480 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 80476 KB Output is correct
2 Correct 22 ms 80476 KB Output is correct
3 Correct 23 ms 80472 KB Output is correct
4 Correct 23 ms 80472 KB Output is correct
5 Correct 23 ms 80472 KB Output is correct
6 Correct 23 ms 80476 KB Output is correct
7 Correct 23 ms 80396 KB Output is correct
8 Correct 23 ms 80476 KB Output is correct
9 Correct 22 ms 80476 KB Output is correct
10 Correct 23 ms 80476 KB Output is correct
11 Correct 24 ms 80720 KB Output is correct
12 Correct 23 ms 80476 KB Output is correct
13 Correct 22 ms 80476 KB Output is correct
14 Correct 23 ms 80404 KB Output is correct
15 Correct 22 ms 80488 KB Output is correct
16 Correct 23 ms 80476 KB Output is correct
17 Correct 22 ms 80496 KB Output is correct
18 Correct 23 ms 80472 KB Output is correct
19 Correct 23 ms 80472 KB Output is correct
20 Correct 22 ms 80488 KB Output is correct
21 Correct 23 ms 80476 KB Output is correct
22 Correct 22 ms 80408 KB Output is correct
23 Correct 23 ms 80352 KB Output is correct
24 Correct 23 ms 80476 KB Output is correct
25 Correct 23 ms 80472 KB Output is correct
26 Correct 23 ms 80476 KB Output is correct
27 Correct 22 ms 80472 KB Output is correct
28 Correct 22 ms 80476 KB Output is correct
29 Correct 22 ms 80476 KB Output is correct
30 Correct 25 ms 80472 KB Output is correct
31 Correct 23 ms 80472 KB Output is correct
32 Correct 23 ms 80480 KB Output is correct
33 Correct 23 ms 80472 KB Output is correct
34 Correct 23 ms 80408 KB Output is correct
35 Correct 23 ms 80476 KB Output is correct
36 Correct 23 ms 80424 KB Output is correct
37 Correct 24 ms 80660 KB Output is correct
38 Correct 22 ms 80472 KB Output is correct
39 Correct 23 ms 80476 KB Output is correct
40 Correct 22 ms 80476 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 80496 KB Output is correct
44 Correct 23 ms 80472 KB Output is correct
45 Correct 25 ms 80476 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 80472 KB Output is correct
2 Correct 23 ms 80476 KB Output is correct
3 Correct 22 ms 80476 KB Output is correct
4 Correct 23 ms 80480 KB Output is correct
5 Correct 22 ms 80404 KB Output is correct
6 Correct 23 ms 80476 KB Output is correct
7 Correct 23 ms 80472 KB Output is correct
8 Correct 22 ms 80544 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 80476 KB Output is correct
2 Correct 22 ms 80476 KB Output is correct
3 Correct 23 ms 80472 KB Output is correct
4 Correct 23 ms 80472 KB Output is correct
5 Correct 23 ms 80472 KB Output is correct
6 Correct 23 ms 80476 KB Output is correct
7 Correct 23 ms 80396 KB Output is correct
8 Correct 23 ms 80476 KB Output is correct
9 Correct 22 ms 80476 KB Output is correct
10 Correct 23 ms 80476 KB Output is correct
11 Correct 24 ms 80720 KB Output is correct
12 Correct 23 ms 80476 KB Output is correct
13 Correct 22 ms 80476 KB Output is correct
14 Correct 23 ms 80404 KB Output is correct
15 Correct 22 ms 80488 KB Output is correct
16 Correct 23 ms 80476 KB Output is correct
17 Correct 22 ms 80496 KB Output is correct
18 Correct 23 ms 80472 KB Output is correct
19 Correct 23 ms 80472 KB Output is correct
20 Correct 22 ms 80488 KB Output is correct
21 Correct 23 ms 80476 KB Output is correct
22 Correct 22 ms 80408 KB Output is correct
23 Correct 23 ms 80352 KB Output is correct
24 Correct 23 ms 80476 KB Output is correct
25 Correct 23 ms 80472 KB Output is correct
26 Correct 23 ms 80476 KB Output is correct
27 Correct 22 ms 80472 KB Output is correct
28 Correct 22 ms 80476 KB Output is correct
29 Correct 22 ms 80476 KB Output is correct
30 Correct 25 ms 80472 KB Output is correct
31 Correct 23 ms 80472 KB Output is correct
32 Correct 23 ms 80480 KB Output is correct
33 Correct 23 ms 80472 KB Output is correct
34 Correct 23 ms 80408 KB Output is correct
35 Correct 23 ms 80476 KB Output is correct
36 Correct 23 ms 80424 KB Output is correct
37 Correct 24 ms 80660 KB Output is correct
38 Correct 22 ms 80472 KB Output is correct
39 Correct 23 ms 80476 KB Output is correct
40 Correct 22 ms 80476 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 80496 KB Output is correct
44 Correct 23 ms 80472 KB Output is correct
45 Correct 25 ms 80476 KB Output is correct
46 Correct 22 ms 80472 KB Output is correct
47 Correct 23 ms 80476 KB Output is correct
48 Correct 22 ms 80476 KB Output is correct
49 Correct 23 ms 80480 KB Output is correct
50 Correct 22 ms 80404 KB Output is correct
51 Correct 23 ms 80476 KB Output is correct
52 Correct 23 ms 80472 KB Output is correct
53 Correct 22 ms 80544 KB Output is correct
54 Correct 22 ms 80476 KB Output is correct
55 Correct 23 ms 80472 KB Output is correct
56 Correct 23 ms 80476 KB Output is correct
57 Correct 23 ms 80476 KB Output is correct
58 Correct 23 ms 80388 KB Output is correct
59 Correct 23 ms 80440 KB Output is correct
60 Correct 23 ms 80552 KB Output is correct
61 Correct 23 ms 80476 KB Output is correct
62 Correct 24 ms 80476 KB Output is correct
63 Correct 23 ms 80408 KB Output is correct
64 Correct 23 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 80476 KB Output is correct
3 Correct 23 ms 80472 KB Output is correct
4 Correct 23 ms 80472 KB Output is correct
5 Correct 23 ms 80472 KB Output is correct
6 Correct 23 ms 80476 KB Output is correct
7 Correct 23 ms 80396 KB Output is correct
8 Correct 23 ms 80476 KB Output is correct
9 Correct 22 ms 80476 KB Output is correct
10 Correct 23 ms 80476 KB Output is correct
11 Correct 24 ms 80720 KB Output is correct
12 Correct 23 ms 80476 KB Output is correct
13 Correct 22 ms 80476 KB Output is correct
14 Correct 23 ms 80404 KB Output is correct
15 Correct 22 ms 80488 KB Output is correct
16 Correct 23 ms 80476 KB Output is correct
17 Correct 22 ms 80496 KB Output is correct
18 Correct 23 ms 80472 KB Output is correct
19 Correct 23 ms 80472 KB Output is correct
20 Correct 22 ms 80488 KB Output is correct
21 Correct 23 ms 80476 KB Output is correct
22 Correct 22 ms 80408 KB Output is correct
23 Correct 23 ms 80352 KB Output is correct
24 Correct 23 ms 80476 KB Output is correct
25 Correct 23 ms 80472 KB Output is correct
26 Correct 23 ms 80476 KB Output is correct
27 Correct 22 ms 80472 KB Output is correct
28 Correct 22 ms 80476 KB Output is correct
29 Correct 22 ms 80476 KB Output is correct
30 Correct 25 ms 80472 KB Output is correct
31 Correct 23 ms 80472 KB Output is correct
32 Correct 23 ms 80480 KB Output is correct
33 Correct 23 ms 80472 KB Output is correct
34 Correct 23 ms 80408 KB Output is correct
35 Correct 23 ms 80476 KB Output is correct
36 Correct 23 ms 80424 KB Output is correct
37 Correct 24 ms 80660 KB Output is correct
38 Correct 22 ms 80472 KB Output is correct
39 Correct 23 ms 80476 KB Output is correct
40 Correct 22 ms 80476 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 80496 KB Output is correct
44 Correct 23 ms 80472 KB Output is correct
45 Correct 25 ms 80476 KB Output is correct
46 Correct 22 ms 80472 KB Output is correct
47 Correct 23 ms 80476 KB Output is correct
48 Correct 22 ms 80476 KB Output is correct
49 Correct 23 ms 80480 KB Output is correct
50 Correct 22 ms 80404 KB Output is correct
51 Correct 23 ms 80476 KB Output is correct
52 Correct 23 ms 80472 KB Output is correct
53 Correct 22 ms 80544 KB Output is correct
54 Correct 22 ms 80476 KB Output is correct
55 Correct 23 ms 80472 KB Output is correct
56 Correct 23 ms 80476 KB Output is correct
57 Correct 23 ms 80476 KB Output is correct
58 Correct 23 ms 80388 KB Output is correct
59 Correct 23 ms 80440 KB Output is correct
60 Correct 23 ms 80552 KB Output is correct
61 Correct 23 ms 80476 KB Output is correct
62 Correct 24 ms 80476 KB Output is correct
63 Correct 23 ms 80408 KB Output is correct
64 Correct 23 ms 80476 KB Output is correct
65 Correct 23 ms 80476 KB Output is correct
66 Correct 33 ms 84308 KB Output is correct
67 Correct 30 ms 84316 KB Output is correct
68 Correct 29 ms 84404 KB Output is correct
69 Correct 33 ms 84060 KB Output is correct
70 Correct 29 ms 84056 KB Output is correct
71 Correct 29 ms 84060 KB Output is correct
72 Correct 29 ms 84316 KB Output is correct
73 Correct 29 ms 84704 KB Output is correct
74 Correct 29 ms 84480 KB Output is correct
75 Correct 31 ms 84308 KB Output is correct
76 Correct 29 ms 84316 KB Output is correct
77 Correct 29 ms 84312 KB Output is correct
78 Correct 29 ms 84568 KB Output is correct
79 Correct 28 ms 84316 KB Output is correct
80 Correct 29 ms 84444 KB Output is correct
81 Correct 29 ms 84404 KB Output is correct
82 Runtime error 91 ms 165880 KB Execution killed with signal 11
83 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 80476 KB Output is correct
2 Correct 22 ms 80476 KB Output is correct
3 Correct 23 ms 80472 KB Output is correct
4 Correct 23 ms 80472 KB Output is correct
5 Correct 23 ms 80472 KB Output is correct
6 Correct 23 ms 80476 KB Output is correct
7 Correct 23 ms 80396 KB Output is correct
8 Correct 23 ms 80476 KB Output is correct
9 Correct 22 ms 80476 KB Output is correct
10 Correct 23 ms 80476 KB Output is correct
11 Correct 24 ms 80720 KB Output is correct
12 Correct 23 ms 80476 KB Output is correct
13 Correct 22 ms 80476 KB Output is correct
14 Correct 23 ms 80404 KB Output is correct
15 Correct 22 ms 80488 KB Output is correct
16 Correct 23 ms 80476 KB Output is correct
17 Correct 22 ms 80496 KB Output is correct
18 Correct 23 ms 80472 KB Output is correct
19 Correct 23 ms 80472 KB Output is correct
20 Correct 22 ms 80488 KB Output is correct
21 Correct 23 ms 80476 KB Output is correct
22 Correct 22 ms 80408 KB Output is correct
23 Correct 23 ms 80352 KB Output is correct
24 Correct 23 ms 80476 KB Output is correct
25 Correct 23 ms 80472 KB Output is correct
26 Correct 23 ms 80476 KB Output is correct
27 Correct 22 ms 80472 KB Output is correct
28 Correct 22 ms 80476 KB Output is correct
29 Correct 22 ms 80476 KB Output is correct
30 Correct 25 ms 80472 KB Output is correct
31 Correct 23 ms 80472 KB Output is correct
32 Correct 23 ms 80480 KB Output is correct
33 Correct 23 ms 80472 KB Output is correct
34 Correct 23 ms 80408 KB Output is correct
35 Correct 23 ms 80476 KB Output is correct
36 Correct 23 ms 80424 KB Output is correct
37 Correct 24 ms 80660 KB Output is correct
38 Correct 22 ms 80472 KB Output is correct
39 Correct 23 ms 80476 KB Output is correct
40 Correct 22 ms 80476 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 80496 KB Output is correct
44 Correct 23 ms 80472 KB Output is correct
45 Correct 25 ms 80476 KB Output is correct
46 Correct 22 ms 80472 KB Output is correct
47 Correct 23 ms 80476 KB Output is correct
48 Correct 22 ms 80476 KB Output is correct
49 Correct 23 ms 80480 KB Output is correct
50 Correct 22 ms 80404 KB Output is correct
51 Correct 23 ms 80476 KB Output is correct
52 Correct 23 ms 80472 KB Output is correct
53 Correct 22 ms 80544 KB Output is correct
54 Correct 22 ms 80476 KB Output is correct
55 Correct 23 ms 80472 KB Output is correct
56 Correct 23 ms 80476 KB Output is correct
57 Correct 23 ms 80476 KB Output is correct
58 Correct 23 ms 80388 KB Output is correct
59 Correct 23 ms 80440 KB Output is correct
60 Correct 23 ms 80552 KB Output is correct
61 Correct 23 ms 80476 KB Output is correct
62 Correct 24 ms 80476 KB Output is correct
63 Correct 23 ms 80408 KB Output is correct
64 Correct 23 ms 80476 KB Output is correct
65 Correct 23 ms 80476 KB Output is correct
66 Correct 272 ms 143788 KB Output is correct
67 Correct 325 ms 158524 KB Output is correct
68 Correct 341 ms 160676 KB Output is correct
69 Correct 363 ms 157600 KB Output is correct
70 Correct 418 ms 157424 KB Output is correct
71 Correct 330 ms 160676 KB Output is correct
72 Correct 339 ms 160428 KB Output is correct
73 Correct 309 ms 157604 KB Output is correct
74 Correct 341 ms 160572 KB Output is correct
75 Correct 378 ms 160424 KB Output is correct
76 Correct 332 ms 157864 KB Output is correct
77 Correct 338 ms 160520 KB Output is correct
78 Correct 377 ms 156068 KB Output is correct
79 Correct 386 ms 155976 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 80476 KB Output is correct
2 Correct 22 ms 80476 KB Output is correct
3 Correct 23 ms 80472 KB Output is correct
4 Correct 23 ms 80472 KB Output is correct
5 Correct 23 ms 80472 KB Output is correct
6 Correct 23 ms 80476 KB Output is correct
7 Correct 23 ms 80396 KB Output is correct
8 Correct 23 ms 80476 KB Output is correct
9 Correct 22 ms 80476 KB Output is correct
10 Correct 23 ms 80476 KB Output is correct
11 Correct 24 ms 80720 KB Output is correct
12 Correct 23 ms 80476 KB Output is correct
13 Correct 22 ms 80476 KB Output is correct
14 Correct 23 ms 80404 KB Output is correct
15 Correct 22 ms 80488 KB Output is correct
16 Correct 23 ms 80476 KB Output is correct
17 Correct 22 ms 80496 KB Output is correct
18 Correct 23 ms 80472 KB Output is correct
19 Correct 23 ms 80472 KB Output is correct
20 Correct 22 ms 80488 KB Output is correct
21 Correct 23 ms 80476 KB Output is correct
22 Correct 22 ms 80408 KB Output is correct
23 Correct 23 ms 80352 KB Output is correct
24 Correct 23 ms 80476 KB Output is correct
25 Correct 23 ms 80472 KB Output is correct
26 Correct 23 ms 80476 KB Output is correct
27 Correct 22 ms 80472 KB Output is correct
28 Correct 22 ms 80476 KB Output is correct
29 Correct 22 ms 80476 KB Output is correct
30 Correct 25 ms 80472 KB Output is correct
31 Correct 23 ms 80472 KB Output is correct
32 Correct 23 ms 80480 KB Output is correct
33 Correct 23 ms 80472 KB Output is correct
34 Correct 23 ms 80408 KB Output is correct
35 Correct 23 ms 80476 KB Output is correct
36 Correct 23 ms 80424 KB Output is correct
37 Correct 24 ms 80660 KB Output is correct
38 Correct 22 ms 80472 KB Output is correct
39 Correct 23 ms 80476 KB Output is correct
40 Correct 22 ms 80476 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 80496 KB Output is correct
44 Correct 23 ms 80472 KB Output is correct
45 Correct 25 ms 80476 KB Output is correct
46 Correct 22 ms 80472 KB Output is correct
47 Correct 23 ms 80476 KB Output is correct
48 Correct 22 ms 80476 KB Output is correct
49 Correct 23 ms 80480 KB Output is correct
50 Correct 22 ms 80404 KB Output is correct
51 Correct 23 ms 80476 KB Output is correct
52 Correct 23 ms 80472 KB Output is correct
53 Correct 22 ms 80544 KB Output is correct
54 Correct 22 ms 80476 KB Output is correct
55 Correct 23 ms 80472 KB Output is correct
56 Correct 23 ms 80476 KB Output is correct
57 Correct 23 ms 80476 KB Output is correct
58 Correct 23 ms 80388 KB Output is correct
59 Correct 23 ms 80440 KB Output is correct
60 Correct 23 ms 80552 KB Output is correct
61 Correct 23 ms 80476 KB Output is correct
62 Correct 24 ms 80476 KB Output is correct
63 Correct 23 ms 80408 KB Output is correct
64 Correct 23 ms 80476 KB Output is correct
65 Correct 23 ms 80476 KB Output is correct
66 Correct 33 ms 84308 KB Output is correct
67 Correct 30 ms 84316 KB Output is correct
68 Correct 29 ms 84404 KB Output is correct
69 Correct 33 ms 84060 KB Output is correct
70 Correct 29 ms 84056 KB Output is correct
71 Correct 29 ms 84060 KB Output is correct
72 Correct 29 ms 84316 KB Output is correct
73 Correct 29 ms 84704 KB Output is correct
74 Correct 29 ms 84480 KB Output is correct
75 Correct 31 ms 84308 KB Output is correct
76 Correct 29 ms 84316 KB Output is correct
77 Correct 29 ms 84312 KB Output is correct
78 Correct 29 ms 84568 KB Output is correct
79 Correct 28 ms 84316 KB Output is correct
80 Correct 29 ms 84444 KB Output is correct
81 Correct 29 ms 84404 KB Output is correct
82 Runtime error 91 ms 165880 KB Execution killed with signal 11
83 Halted 0 ms 0 KB -