Submission #1100232

# Submission time Handle Problem Language Result Execution time Memory
1100232 2024-10-13T10:33:21 Z Dreamy_lovesper Labels (NOI20_labels) C++17
100 / 100
54 ms 37460 KB
#include<bits/stdc++.h>

using namespace std;
namespace std {
    // #include<Love>
    using ll=long long;
    using str=string;
    using int128=__int128_t;
    using ld=long double;

    typedef unsigned int ui;
    typedef unsigned long long ull;

    #define Love<3 HerLoveForMeJustaDream
}

#define Lovesper_ ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pll pair<ll,ll>
#define mll map<ll,ll>
#define vll vector<ll>
#define pb push_back
#define all(c) c.begin(),c.end()
#define fi first
#define se second
#define debug cout<<"I Love You\n";
#define fu(i,a,b) for(ll i=a;i<=b;i++)
#define fd(i,a,b) for(int i=a;i>=b;i--)
#define fa(i,s) for(auto&i:s)
#define Bitc(x,i) (((x)>>(i))&1)
#define _log(_x) 63-__builtin_clzll(_x)
#define LoveTime chrono::steady_clock::now().time_since_epoch().count()

const pll dxy4[]={{-1,0},{0,-1},{0,1},{1,0}};
const pll dxy8[]={{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};
constexpr  ll Mod=1e9+7;
constexpr  ll mxn=1e6+7,mxm=3e3+7;
constexpr long long inf=(1ll<<31);
constexpr ll lnf=(1ll<<60);

struct __TS {
    ~__TS() {
        // cerr<<"Time elapsed: "<<clock()*1.0/CLOCKS_PER_SEC<<'\n';
    }
}__ts;

mt19937 rng(LoveTime);

#define setup ((1<<3)-1>>1)
void OpenLove(const str&name){

    // I'm So Lonely. I am Trying To Get Out This Lonely With Her Love

    Lovesper_
    if(fopen((name+".inp").c_str(),"r")){
        //    freopen((name+".test").c_str(),"r",stdin);
       freopen((name+".inp").c_str(),"r",stdin);
        freopen((name+".out").c_str(),"w",stdout);
    }
}
template<class X,class Y>bool maximize(X&x,const Y&y){X eps=1e-18;if(x+eps<y){x=y;return 1;}return 0;}
template<class X,class Y>bool minimize(X&x,const Y&y){X eps=1e-18;if(x>y+eps){x=y;return 1;}return 0;}

ostream&operator<<( std::ostream& dest, __int128_t value){
    ostream::sentry s(dest);__uint128_t tmp=value<0?-value:value;
    char buffer[128];char*d=end(buffer);
    do{d--;*d="0123456789"[tmp%10];tmp/=10;}while(tmp);
    if(value<0)d--,*d='-';ll len=end(buffer)-d;
    if(dest.rdbuf()->sputn(d,len)!=len)dest.setstate(ios_base::badbit);
    return dest;
}

struct custom_hash{
    size_t operator()(uint64_t x)const{
        static const uint64_t HashRand=LoveTime;
        x^=HashRand;return x^(x>>16);
}};

int64_t add(ll&a,ll b){a+=b;if(a>=Mod)a%=Mod;while(a<0)a+=Mod;return a;}
int64_t mul(ll&a,ll b,ll mod){a=1ll*a*b%mod;return a;}
int64_t mpow(ll a,ll b,ll mod){ll ans=1;for(;b;b>>=1,a=mul(a,a,mod))if(b&1)ans=mul(ans,a,mod);return ans;}

ll n,m,q,f[mxn],g[mxn];
vector<pll>graph[mxn];
void Lovesper(const ll&TestCase){
    cin>>n;
    fu(i,1,n-1)cin>>g[i];
    struct Love12{
        function<void()>DreamyLove=[&](){
            vll c(n);
            fu(i,1,n)c[i-1]=i;
            do{
                auto chk=[&](){
                    fu(i,1,c.size()-1)if(c[i]-c[i-1]!=g[i])return 0;
                    return 1;
                };
                if(chk()){fa(i,c)cout<<i<<' ';return;}
            }while(next_permutation(all(c)));
            cout<<-1;
        };
    };
    struct LoveLast{
        function<void()>DreamyLove=[&](){
            f[1]=n;ll gf=0;
            fu(i,1,n-1){
                ll j=i+1;f[j]=f[i]+g[i];
                gf=max(gf,f[j]-n);
            }
            ll cr=lnf;
            fu(i,1,n)minimize(cr,f[i]=f[i]-gf);
            if(cr!=1)return void(cout<<-1);
            fu(i,1,n)cout<<f[i]<<' ';
        };
    };
    // if(n<=10)(new Love12)->DreamyLove();
    // else (new LoveLast)->DreamyLove();
    // cout<<'\n';
    (new LoveLast)->DreamyLove();
}
signed main(int argc, char const *argv[]){
    OpenLove("lovesper");
    int tt=1;
    // cin>>tt;
    for(ll i=1;i<=tt;i++){
        Lovesper(i);
        if(i<tt)cout<<'\n';
    }
    return false;
}

Compilation message

Labels.cpp:14:13: warning: ISO C++11 requires whitespace after the macro name
   14 |     #define Love<3 HerLoveForMeJustaDream
      |             ^~~~
Labels.cpp: In function 'std::ostream& operator<<(std::ostream&, __int128)':
Labels.cpp:67:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   67 |     if(value<0)d--,*d='-';ll len=end(buffer)-d;
      |     ^~
Labels.cpp:67:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   67 |     if(value<0)d--,*d='-';ll len=end(buffer)-d;
      |                           ^~
Labels.cpp: In lambda function:
Labels.cpp:26:31: warning: comparison of integer expressions of different signedness: 'std::ll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   26 | #define fu(i,a,b) for(ll i=a;i<=b;i++)
......
   93 |                     fu(i,1,c.size()-1)if(c[i]-c[i-1]!=g[i])return 0;
      |                        ~~~~~~~~~~~~~~
Labels.cpp:93:21: note: in expansion of macro 'fu'
   93 |                     fu(i,1,c.size()-1)if(c[i]-c[i-1]!=g[i])return 0;
      |                     ^~
Labels.cpp: In function 'void OpenLove(const str&)':
Labels.cpp:56:15: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   56 |        freopen((name+".inp").c_str(),"r",stdin);
      |        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Labels.cpp:57:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   57 |         freopen((name+".out").c_str(),"w",stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 5 ms 29264 KB Output is correct
2 Correct 6 ms 29344 KB Output is correct
3 Correct 5 ms 29280 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 29264 KB Output is correct
2 Correct 6 ms 29344 KB Output is correct
3 Correct 5 ms 29280 KB Output is correct
4 Correct 5 ms 29268 KB Output is correct
5 Correct 7 ms 29268 KB Output is correct
6 Correct 6 ms 29524 KB Output is correct
7 Correct 6 ms 29268 KB Output is correct
8 Correct 5 ms 29268 KB Output is correct
9 Correct 4 ms 29268 KB Output is correct
10 Correct 6 ms 29268 KB Output is correct
11 Correct 6 ms 29268 KB Output is correct
12 Correct 5 ms 29268 KB Output is correct
13 Correct 6 ms 29268 KB Output is correct
14 Correct 5 ms 29268 KB Output is correct
15 Correct 5 ms 29348 KB Output is correct
16 Correct 5 ms 29268 KB Output is correct
17 Correct 5 ms 29268 KB Output is correct
18 Correct 5 ms 29268 KB Output is correct
19 Correct 5 ms 29268 KB Output is correct
20 Correct 5 ms 29524 KB Output is correct
21 Correct 5 ms 29268 KB Output is correct
22 Correct 5 ms 29340 KB Output is correct
23 Correct 5 ms 29300 KB Output is correct
24 Correct 6 ms 29268 KB Output is correct
25 Correct 5 ms 29436 KB Output is correct
26 Correct 5 ms 29268 KB Output is correct
27 Correct 6 ms 29268 KB Output is correct
28 Correct 7 ms 29268 KB Output is correct
29 Correct 5 ms 29524 KB Output is correct
30 Correct 6 ms 29268 KB Output is correct
31 Correct 5 ms 29432 KB Output is correct
32 Correct 5 ms 29268 KB Output is correct
33 Correct 5 ms 29268 KB Output is correct
34 Correct 6 ms 29268 KB Output is correct
35 Correct 6 ms 29348 KB Output is correct
36 Correct 5 ms 29268 KB Output is correct
37 Correct 6 ms 29436 KB Output is correct
38 Correct 6 ms 29340 KB Output is correct
39 Correct 5 ms 29268 KB Output is correct
40 Correct 7 ms 29268 KB Output is correct
41 Correct 6 ms 29280 KB Output is correct
42 Correct 7 ms 29268 KB Output is correct
43 Correct 5 ms 29268 KB Output is correct
44 Correct 6 ms 29268 KB Output is correct
45 Correct 6 ms 29428 KB Output is correct
46 Correct 5 ms 29268 KB Output is correct
47 Correct 6 ms 29268 KB Output is correct
48 Correct 6 ms 29268 KB Output is correct
49 Correct 6 ms 29268 KB Output is correct
50 Correct 5 ms 29268 KB Output is correct
51 Correct 5 ms 29280 KB Output is correct
52 Correct 5 ms 29284 KB Output is correct
53 Correct 6 ms 29284 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 29264 KB Output is correct
2 Correct 6 ms 29344 KB Output is correct
3 Correct 5 ms 29280 KB Output is correct
4 Correct 5 ms 29268 KB Output is correct
5 Correct 7 ms 29268 KB Output is correct
6 Correct 6 ms 29524 KB Output is correct
7 Correct 6 ms 29268 KB Output is correct
8 Correct 5 ms 29268 KB Output is correct
9 Correct 4 ms 29268 KB Output is correct
10 Correct 6 ms 29268 KB Output is correct
11 Correct 6 ms 29268 KB Output is correct
12 Correct 5 ms 29268 KB Output is correct
13 Correct 6 ms 29268 KB Output is correct
14 Correct 5 ms 29268 KB Output is correct
15 Correct 5 ms 29348 KB Output is correct
16 Correct 5 ms 29268 KB Output is correct
17 Correct 5 ms 29268 KB Output is correct
18 Correct 5 ms 29268 KB Output is correct
19 Correct 5 ms 29268 KB Output is correct
20 Correct 5 ms 29524 KB Output is correct
21 Correct 5 ms 29268 KB Output is correct
22 Correct 5 ms 29340 KB Output is correct
23 Correct 5 ms 29300 KB Output is correct
24 Correct 6 ms 29268 KB Output is correct
25 Correct 5 ms 29436 KB Output is correct
26 Correct 5 ms 29268 KB Output is correct
27 Correct 6 ms 29268 KB Output is correct
28 Correct 7 ms 29268 KB Output is correct
29 Correct 5 ms 29524 KB Output is correct
30 Correct 6 ms 29268 KB Output is correct
31 Correct 5 ms 29432 KB Output is correct
32 Correct 5 ms 29268 KB Output is correct
33 Correct 5 ms 29268 KB Output is correct
34 Correct 6 ms 29268 KB Output is correct
35 Correct 6 ms 29348 KB Output is correct
36 Correct 5 ms 29268 KB Output is correct
37 Correct 6 ms 29436 KB Output is correct
38 Correct 6 ms 29340 KB Output is correct
39 Correct 5 ms 29268 KB Output is correct
40 Correct 7 ms 29268 KB Output is correct
41 Correct 6 ms 29280 KB Output is correct
42 Correct 7 ms 29268 KB Output is correct
43 Correct 5 ms 29268 KB Output is correct
44 Correct 6 ms 29268 KB Output is correct
45 Correct 6 ms 29428 KB Output is correct
46 Correct 5 ms 29268 KB Output is correct
47 Correct 6 ms 29268 KB Output is correct
48 Correct 6 ms 29268 KB Output is correct
49 Correct 6 ms 29268 KB Output is correct
50 Correct 5 ms 29268 KB Output is correct
51 Correct 5 ms 29280 KB Output is correct
52 Correct 5 ms 29284 KB Output is correct
53 Correct 6 ms 29284 KB Output is correct
54 Correct 8 ms 29268 KB Output is correct
55 Correct 5 ms 29268 KB Output is correct
56 Correct 5 ms 29504 KB Output is correct
57 Correct 5 ms 29268 KB Output is correct
58 Correct 6 ms 29268 KB Output is correct
59 Correct 6 ms 29268 KB Output is correct
60 Correct 5 ms 29432 KB Output is correct
61 Correct 5 ms 29268 KB Output is correct
62 Correct 5 ms 29268 KB Output is correct
63 Correct 6 ms 29432 KB Output is correct
64 Correct 6 ms 29300 KB Output is correct
65 Correct 5 ms 29268 KB Output is correct
66 Correct 5 ms 29268 KB Output is correct
67 Correct 5 ms 29268 KB Output is correct
68 Correct 5 ms 29268 KB Output is correct
69 Correct 5 ms 29268 KB Output is correct
70 Correct 5 ms 29268 KB Output is correct
71 Correct 4 ms 29268 KB Output is correct
72 Correct 5 ms 29268 KB Output is correct
73 Correct 5 ms 29304 KB Output is correct
74 Correct 5 ms 29432 KB Output is correct
75 Correct 4 ms 29268 KB Output is correct
76 Correct 4 ms 29268 KB Output is correct
77 Correct 5 ms 29268 KB Output is correct
78 Correct 5 ms 29268 KB Output is correct
79 Correct 5 ms 29268 KB Output is correct
80 Correct 5 ms 29268 KB Output is correct
81 Correct 4 ms 29340 KB Output is correct
82 Correct 5 ms 29268 KB Output is correct
83 Correct 5 ms 29440 KB Output is correct
84 Correct 6 ms 29344 KB Output is correct
85 Correct 5 ms 29268 KB Output is correct
86 Correct 5 ms 29268 KB Output is correct
87 Correct 5 ms 29268 KB Output is correct
88 Correct 5 ms 29272 KB Output is correct
89 Correct 7 ms 29272 KB Output is correct
90 Correct 5 ms 29280 KB Output is correct
91 Correct 4 ms 29276 KB Output is correct
92 Correct 5 ms 29268 KB Output is correct
93 Correct 5 ms 29340 KB Output is correct
94 Correct 5 ms 29268 KB Output is correct
95 Correct 5 ms 29268 KB Output is correct
96 Correct 5 ms 29268 KB Output is correct
97 Correct 5 ms 29344 KB Output is correct
98 Correct 5 ms 29268 KB Output is correct
99 Correct 5 ms 29336 KB Output is correct
100 Correct 5 ms 29268 KB Output is correct
101 Correct 5 ms 29432 KB Output is correct
102 Correct 5 ms 29268 KB Output is correct
103 Correct 5 ms 29268 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 36 ms 35408 KB Output is correct
2 Correct 5 ms 29264 KB Output is correct
3 Correct 38 ms 35400 KB Output is correct
4 Correct 15 ms 33536 KB Output is correct
5 Correct 19 ms 34188 KB Output is correct
6 Correct 19 ms 34132 KB Output is correct
7 Correct 17 ms 33876 KB Output is correct
8 Correct 21 ms 34060 KB Output is correct
9 Correct 5 ms 29312 KB Output is correct
10 Correct 6 ms 29268 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 29264 KB Output is correct
2 Correct 6 ms 29344 KB Output is correct
3 Correct 5 ms 29280 KB Output is correct
4 Correct 5 ms 29268 KB Output is correct
5 Correct 7 ms 29268 KB Output is correct
6 Correct 6 ms 29524 KB Output is correct
7 Correct 6 ms 29268 KB Output is correct
8 Correct 5 ms 29268 KB Output is correct
9 Correct 4 ms 29268 KB Output is correct
10 Correct 6 ms 29268 KB Output is correct
11 Correct 6 ms 29268 KB Output is correct
12 Correct 5 ms 29268 KB Output is correct
13 Correct 6 ms 29268 KB Output is correct
14 Correct 5 ms 29268 KB Output is correct
15 Correct 5 ms 29348 KB Output is correct
16 Correct 5 ms 29268 KB Output is correct
17 Correct 5 ms 29268 KB Output is correct
18 Correct 5 ms 29268 KB Output is correct
19 Correct 5 ms 29268 KB Output is correct
20 Correct 5 ms 29524 KB Output is correct
21 Correct 5 ms 29268 KB Output is correct
22 Correct 5 ms 29340 KB Output is correct
23 Correct 5 ms 29300 KB Output is correct
24 Correct 6 ms 29268 KB Output is correct
25 Correct 5 ms 29436 KB Output is correct
26 Correct 5 ms 29268 KB Output is correct
27 Correct 6 ms 29268 KB Output is correct
28 Correct 7 ms 29268 KB Output is correct
29 Correct 5 ms 29524 KB Output is correct
30 Correct 6 ms 29268 KB Output is correct
31 Correct 5 ms 29432 KB Output is correct
32 Correct 5 ms 29268 KB Output is correct
33 Correct 5 ms 29268 KB Output is correct
34 Correct 6 ms 29268 KB Output is correct
35 Correct 6 ms 29348 KB Output is correct
36 Correct 5 ms 29268 KB Output is correct
37 Correct 6 ms 29436 KB Output is correct
38 Correct 6 ms 29340 KB Output is correct
39 Correct 5 ms 29268 KB Output is correct
40 Correct 7 ms 29268 KB Output is correct
41 Correct 6 ms 29280 KB Output is correct
42 Correct 7 ms 29268 KB Output is correct
43 Correct 5 ms 29268 KB Output is correct
44 Correct 6 ms 29268 KB Output is correct
45 Correct 6 ms 29428 KB Output is correct
46 Correct 5 ms 29268 KB Output is correct
47 Correct 6 ms 29268 KB Output is correct
48 Correct 6 ms 29268 KB Output is correct
49 Correct 6 ms 29268 KB Output is correct
50 Correct 5 ms 29268 KB Output is correct
51 Correct 5 ms 29280 KB Output is correct
52 Correct 5 ms 29284 KB Output is correct
53 Correct 6 ms 29284 KB Output is correct
54 Correct 8 ms 29268 KB Output is correct
55 Correct 5 ms 29268 KB Output is correct
56 Correct 5 ms 29504 KB Output is correct
57 Correct 5 ms 29268 KB Output is correct
58 Correct 6 ms 29268 KB Output is correct
59 Correct 6 ms 29268 KB Output is correct
60 Correct 5 ms 29432 KB Output is correct
61 Correct 5 ms 29268 KB Output is correct
62 Correct 5 ms 29268 KB Output is correct
63 Correct 6 ms 29432 KB Output is correct
64 Correct 6 ms 29300 KB Output is correct
65 Correct 5 ms 29268 KB Output is correct
66 Correct 5 ms 29268 KB Output is correct
67 Correct 5 ms 29268 KB Output is correct
68 Correct 5 ms 29268 KB Output is correct
69 Correct 5 ms 29268 KB Output is correct
70 Correct 5 ms 29268 KB Output is correct
71 Correct 4 ms 29268 KB Output is correct
72 Correct 5 ms 29268 KB Output is correct
73 Correct 5 ms 29304 KB Output is correct
74 Correct 5 ms 29432 KB Output is correct
75 Correct 4 ms 29268 KB Output is correct
76 Correct 4 ms 29268 KB Output is correct
77 Correct 5 ms 29268 KB Output is correct
78 Correct 5 ms 29268 KB Output is correct
79 Correct 5 ms 29268 KB Output is correct
80 Correct 5 ms 29268 KB Output is correct
81 Correct 4 ms 29340 KB Output is correct
82 Correct 5 ms 29268 KB Output is correct
83 Correct 5 ms 29440 KB Output is correct
84 Correct 6 ms 29344 KB Output is correct
85 Correct 5 ms 29268 KB Output is correct
86 Correct 5 ms 29268 KB Output is correct
87 Correct 5 ms 29268 KB Output is correct
88 Correct 5 ms 29272 KB Output is correct
89 Correct 7 ms 29272 KB Output is correct
90 Correct 5 ms 29280 KB Output is correct
91 Correct 4 ms 29276 KB Output is correct
92 Correct 5 ms 29268 KB Output is correct
93 Correct 5 ms 29340 KB Output is correct
94 Correct 5 ms 29268 KB Output is correct
95 Correct 5 ms 29268 KB Output is correct
96 Correct 5 ms 29268 KB Output is correct
97 Correct 5 ms 29344 KB Output is correct
98 Correct 5 ms 29268 KB Output is correct
99 Correct 5 ms 29336 KB Output is correct
100 Correct 5 ms 29268 KB Output is correct
101 Correct 5 ms 29432 KB Output is correct
102 Correct 5 ms 29268 KB Output is correct
103 Correct 5 ms 29268 KB Output is correct
104 Correct 36 ms 35408 KB Output is correct
105 Correct 5 ms 29264 KB Output is correct
106 Correct 38 ms 35400 KB Output is correct
107 Correct 15 ms 33536 KB Output is correct
108 Correct 19 ms 34188 KB Output is correct
109 Correct 19 ms 34132 KB Output is correct
110 Correct 17 ms 33876 KB Output is correct
111 Correct 21 ms 34060 KB Output is correct
112 Correct 5 ms 29312 KB Output is correct
113 Correct 6 ms 29268 KB Output is correct
114 Correct 25 ms 35148 KB Output is correct
115 Correct 43 ms 37460 KB Output is correct
116 Correct 25 ms 35412 KB Output is correct
117 Correct 24 ms 35208 KB Output is correct
118 Correct 41 ms 37388 KB Output is correct
119 Correct 24 ms 35208 KB Output is correct
120 Correct 43 ms 37452 KB Output is correct
121 Correct 43 ms 37336 KB Output is correct
122 Correct 45 ms 37388 KB Output is correct
123 Correct 26 ms 35412 KB Output is correct
124 Correct 54 ms 37384 KB Output is correct
125 Correct 52 ms 37456 KB Output is correct
126 Correct 43 ms 37388 KB Output is correct
127 Correct 40 ms 37452 KB Output is correct
128 Correct 25 ms 35156 KB Output is correct
129 Correct 43 ms 37260 KB Output is correct
130 Correct 42 ms 37260 KB Output is correct
131 Correct 41 ms 37256 KB Output is correct
132 Correct 40 ms 37452 KB Output is correct
133 Correct 43 ms 37452 KB Output is correct
134 Correct 25 ms 35412 KB Output is correct
135 Correct 43 ms 37256 KB Output is correct
136 Correct 25 ms 35412 KB Output is correct
137 Correct 24 ms 35340 KB Output is correct
138 Correct 29 ms 35412 KB Output is correct
139 Correct 27 ms 35404 KB Output is correct
140 Correct 26 ms 35316 KB Output is correct
141 Correct 26 ms 35412 KB Output is correct
142 Correct 50 ms 37252 KB Output is correct
143 Correct 25 ms 35412 KB Output is correct
144 Correct 26 ms 35404 KB Output is correct
145 Correct 42 ms 37384 KB Output is correct
146 Correct 43 ms 37452 KB Output is correct
147 Correct 45 ms 37456 KB Output is correct
148 Correct 48 ms 37452 KB Output is correct
149 Correct 33 ms 35916 KB Output is correct
150 Correct 34 ms 36172 KB Output is correct
151 Correct 15 ms 33876 KB Output is correct
152 Correct 19 ms 34140 KB Output is correct
153 Correct 18 ms 34132 KB Output is correct
154 Correct 17 ms 33876 KB Output is correct
155 Correct 18 ms 34144 KB Output is correct
156 Correct 6 ms 29268 KB Output is correct
157 Correct 5 ms 29268 KB Output is correct
158 Correct 23 ms 35452 KB Output is correct
159 Correct 5 ms 29268 KB Output is correct
160 Correct 38 ms 37452 KB Output is correct
161 Correct 23 ms 35404 KB Output is correct
162 Correct 24 ms 35412 KB Output is correct
163 Correct 25 ms 35404 KB Output is correct