#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,f[mxn],g[mxn];
vll graph[mxn];
void Lovesper(const ll&TestCase){
cin>>n;
ll LoveSub3_1=1,LoveSub3_2=1;
vll c;
fu(i,1,n){
ll x;cin>>x;g[i]=x,c.pb(x);
LoveSub3_1&=(g[i]>g[i-1]);
}
f[0]=1;
fu(i,1,n+7)f[i]=(f[i-1]*i)%Mod;
fd(i,n-1,1)LoveSub3_2&=(g[i]>g[i+1]);
sort(all(c));
fu(i,1,n)g[i]=lower_bound(all(c),g[i])-c.begin()+1;
struct Love1{
function<void()>DreamyLove=[&](){
if(g[1]<=g[2])return void(cout<<1);
cout<<2;
};
};
struct Love2{
function<void()>DreamyLove=[&](){
vll c;
fu(i,1,n)c.pb(g[i]);
sort(all(c));
ll j=0;
do{
auto chk=[&](){
fu(i,1,n)if(c[i-1]!=g[i])return 0;
return 1;
};
j++;
if(chk())return void(cout<<j);
}while(next_permutation(all(c)));
};
};
struct Love3{
function<void(ll)>DreamyLove=[&](ll a){
if(a)return void(cout<<1);
cout<<f[n];
};
};
struct Love4{
function<void()>DreamyLove=[&](){
ll j;
fu(i,3,n)if(g[i]!=g[i-1]+1){j=i-2;break;}
cout<<(j*f[n-1]+1)%Mod;
};
};
struct Love56{
function<void()>DreamyLove=[&](){
vll d(n+7,0),id(n+7,0);
ll sad=1;
fu(k,1,n){
vll c;
fu(i,1,n)if(!d[i])c.pb(i);
ll j=k;
fu(i,0,c.size()-1)id[c[i]]=j++;
add(sad,((id[g[k]]-k)*f[n-k]%Mod));
d[g[k]]=1;
}
cout<<sad;
};
};
struct Love78{
function<void()>DreamyLove=[&](){
vll d(n+7,0),id(n+7,0);
vll fen(n+7,0);
function<void(ll,ll)>update=[&](ll id,ll val){
for(;id<=n;id+=id&-id)fen[id]+=val;
};
function<ll(ll)>get=[&](ll id){
ll ans=0;
for(;id;id-=id&-id)ans+=fen[id];
return ans;
};
ll sad=1;
fu(i,1,n)update(i,1);
fu(i,1,n){
add(sad,(get(g[i])-1ll)*f[n-i]%Mod);
update(g[i],-1);
}
cout<<sad;
};
};
if(n==2)(new Love1())->DreamyLove();
else if(n<=8)(new Love2())->DreamyLove();
else if(LoveSub3_1||LoveSub3_2)(new Love3())->DreamyLove(LoveSub3_1);
else if(n<=3e3)(new Love56())->DreamyLove();
else if(n<=3e5)(new Love78())->DreamyLove();
else (new Love4())->DreamyLove();
// (new Love2())->DreamyLove();
// cout<<'\n';
// debug
// (new Love78())->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
Crypto.cpp:14:13: warning: ISO C++11 requires whitespace after the macro name
14 | #define Love<3 HerLoveForMeJustaDream
| ^~~~
Crypto.cpp: In function 'std::ostream& operator<<(std::ostream&, __int128)':
Crypto.cpp:67:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
67 | if(value<0)d--,*d='-';ll len=end(buffer)-d;
| ^~
Crypto.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;
| ^~
Crypto.cpp: In lambda function:
Crypto.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++)
......
140 | fu(i,0,c.size()-1)id[c[i]]=j++;
| ~~~~~~~~~~~~~~
Crypto.cpp:140:17: note: in expansion of macro 'fu'
140 | fu(i,0,c.size()-1)id[c[i]]=j++;
| ^~
Crypto.cpp: In function 'void OpenLove(const str&)':
Crypto.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);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Crypto.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);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Crypto.cpp: In static member function 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = void; _Functor = Lovesper(const ll&)::Love4::<lambda()>; _ArgTypes = {}]':
Crypto.cpp:129:21: warning: 'j' may be used uninitialized in this function [-Wmaybe-uninitialized]
129 | cout<<(j*f[n-1]+1)%Mod;
| ~^~~~~~~
Crypto.cpp:127:16: note: 'j' was declared here
127 | ll j;
| ^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
23900 KB |
Output is correct |
2 |
Correct |
10 ms |
23900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
23900 KB |
Output is correct |
2 |
Correct |
10 ms |
23900 KB |
Output is correct |
3 |
Correct |
11 ms |
23956 KB |
Output is correct |
4 |
Correct |
10 ms |
23900 KB |
Output is correct |
5 |
Correct |
11 ms |
23900 KB |
Output is correct |
6 |
Correct |
10 ms |
23900 KB |
Output is correct |
7 |
Correct |
10 ms |
23960 KB |
Output is correct |
8 |
Correct |
12 ms |
23900 KB |
Output is correct |
9 |
Correct |
11 ms |
23748 KB |
Output is correct |
10 |
Correct |
12 ms |
23900 KB |
Output is correct |
11 |
Correct |
11 ms |
23896 KB |
Output is correct |
12 |
Correct |
11 ms |
23900 KB |
Output is correct |
13 |
Correct |
14 ms |
23948 KB |
Output is correct |
14 |
Correct |
15 ms |
23900 KB |
Output is correct |
15 |
Correct |
11 ms |
23900 KB |
Output is correct |
16 |
Correct |
11 ms |
23900 KB |
Output is correct |
17 |
Correct |
11 ms |
23900 KB |
Output is correct |
18 |
Correct |
10 ms |
23952 KB |
Output is correct |
19 |
Correct |
14 ms |
23764 KB |
Output is correct |
20 |
Correct |
12 ms |
23900 KB |
Output is correct |
21 |
Correct |
11 ms |
23900 KB |
Output is correct |
22 |
Correct |
12 ms |
23836 KB |
Output is correct |
23 |
Correct |
12 ms |
23952 KB |
Output is correct |
24 |
Correct |
11 ms |
23828 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
23900 KB |
Output is correct |
2 |
Correct |
52 ms |
33928 KB |
Output is correct |
3 |
Correct |
54 ms |
33980 KB |
Output is correct |
4 |
Correct |
53 ms |
33872 KB |
Output is correct |
5 |
Correct |
53 ms |
33988 KB |
Output is correct |
6 |
Correct |
62 ms |
33984 KB |
Output is correct |
7 |
Correct |
53 ms |
33992 KB |
Output is correct |
8 |
Correct |
55 ms |
33948 KB |
Output is correct |
9 |
Correct |
59 ms |
33972 KB |
Output is correct |
10 |
Correct |
73 ms |
33800 KB |
Output is correct |
11 |
Correct |
51 ms |
33892 KB |
Output is correct |
12 |
Correct |
53 ms |
33992 KB |
Output is correct |
13 |
Correct |
51 ms |
33988 KB |
Output is correct |
14 |
Correct |
49 ms |
34000 KB |
Output is correct |
15 |
Correct |
51 ms |
33884 KB |
Output is correct |
16 |
Correct |
53 ms |
33884 KB |
Output is correct |
17 |
Correct |
52 ms |
33912 KB |
Output is correct |
18 |
Correct |
52 ms |
33940 KB |
Output is correct |
19 |
Correct |
69 ms |
33988 KB |
Output is correct |
20 |
Correct |
60 ms |
33984 KB |
Output is correct |
21 |
Correct |
51 ms |
33992 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
23896 KB |
Output is correct |
2 |
Correct |
63 ms |
39872 KB |
Output is correct |
3 |
Correct |
63 ms |
40124 KB |
Output is correct |
4 |
Correct |
64 ms |
39872 KB |
Output is correct |
5 |
Correct |
62 ms |
39872 KB |
Output is correct |
6 |
Correct |
63 ms |
39896 KB |
Output is correct |
7 |
Correct |
66 ms |
39960 KB |
Output is correct |
8 |
Correct |
61 ms |
39872 KB |
Output is correct |
9 |
Correct |
63 ms |
40104 KB |
Output is correct |
10 |
Correct |
61 ms |
39924 KB |
Output is correct |
11 |
Correct |
62 ms |
39880 KB |
Output is correct |
12 |
Correct |
62 ms |
40128 KB |
Output is correct |
13 |
Correct |
59 ms |
40120 KB |
Output is correct |
14 |
Correct |
57 ms |
40032 KB |
Output is correct |
15 |
Correct |
61 ms |
39872 KB |
Output is correct |
16 |
Correct |
63 ms |
39988 KB |
Output is correct |
17 |
Correct |
60 ms |
39876 KB |
Output is correct |
18 |
Correct |
60 ms |
39872 KB |
Output is correct |
19 |
Correct |
59 ms |
39984 KB |
Output is correct |
20 |
Correct |
81 ms |
40120 KB |
Output is correct |
21 |
Correct |
65 ms |
39876 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
23896 KB |
Output is correct |
2 |
Correct |
36 ms |
24152 KB |
Output is correct |
3 |
Correct |
41 ms |
24152 KB |
Output is correct |
4 |
Correct |
42 ms |
24156 KB |
Output is correct |
5 |
Correct |
52 ms |
24152 KB |
Output is correct |
6 |
Correct |
37 ms |
24156 KB |
Output is correct |
7 |
Correct |
36 ms |
24152 KB |
Output is correct |
8 |
Correct |
42 ms |
24152 KB |
Output is correct |
9 |
Correct |
35 ms |
24156 KB |
Output is correct |
10 |
Correct |
36 ms |
24156 KB |
Output is correct |
11 |
Correct |
36 ms |
23900 KB |
Output is correct |
12 |
Correct |
43 ms |
24152 KB |
Output is correct |
13 |
Correct |
40 ms |
23964 KB |
Output is correct |
14 |
Correct |
36 ms |
24156 KB |
Output is correct |
15 |
Correct |
11 ms |
23900 KB |
Output is correct |
16 |
Correct |
37 ms |
24156 KB |
Output is correct |
17 |
Correct |
46 ms |
24156 KB |
Output is correct |
18 |
Correct |
49 ms |
24156 KB |
Output is correct |
19 |
Correct |
36 ms |
24152 KB |
Output is correct |
20 |
Correct |
36 ms |
24156 KB |
Output is correct |
21 |
Correct |
36 ms |
24156 KB |
Output is correct |
22 |
Correct |
37 ms |
24156 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
23900 KB |
Output is correct |
2 |
Correct |
10 ms |
23900 KB |
Output is correct |
3 |
Correct |
11 ms |
23956 KB |
Output is correct |
4 |
Correct |
10 ms |
23900 KB |
Output is correct |
5 |
Correct |
11 ms |
23900 KB |
Output is correct |
6 |
Correct |
10 ms |
23900 KB |
Output is correct |
7 |
Correct |
10 ms |
23960 KB |
Output is correct |
8 |
Correct |
12 ms |
23900 KB |
Output is correct |
9 |
Correct |
11 ms |
23748 KB |
Output is correct |
10 |
Correct |
12 ms |
23900 KB |
Output is correct |
11 |
Correct |
11 ms |
23896 KB |
Output is correct |
12 |
Correct |
11 ms |
23900 KB |
Output is correct |
13 |
Correct |
14 ms |
23948 KB |
Output is correct |
14 |
Correct |
15 ms |
23900 KB |
Output is correct |
15 |
Correct |
11 ms |
23900 KB |
Output is correct |
16 |
Correct |
11 ms |
23900 KB |
Output is correct |
17 |
Correct |
11 ms |
23900 KB |
Output is correct |
18 |
Correct |
10 ms |
23952 KB |
Output is correct |
19 |
Correct |
14 ms |
23764 KB |
Output is correct |
20 |
Correct |
12 ms |
23900 KB |
Output is correct |
21 |
Correct |
11 ms |
23900 KB |
Output is correct |
22 |
Correct |
12 ms |
23836 KB |
Output is correct |
23 |
Correct |
12 ms |
23952 KB |
Output is correct |
24 |
Correct |
11 ms |
23828 KB |
Output is correct |
25 |
Correct |
10 ms |
23896 KB |
Output is correct |
26 |
Correct |
36 ms |
24152 KB |
Output is correct |
27 |
Correct |
41 ms |
24152 KB |
Output is correct |
28 |
Correct |
42 ms |
24156 KB |
Output is correct |
29 |
Correct |
52 ms |
24152 KB |
Output is correct |
30 |
Correct |
37 ms |
24156 KB |
Output is correct |
31 |
Correct |
36 ms |
24152 KB |
Output is correct |
32 |
Correct |
42 ms |
24152 KB |
Output is correct |
33 |
Correct |
35 ms |
24156 KB |
Output is correct |
34 |
Correct |
36 ms |
24156 KB |
Output is correct |
35 |
Correct |
36 ms |
23900 KB |
Output is correct |
36 |
Correct |
43 ms |
24152 KB |
Output is correct |
37 |
Correct |
40 ms |
23964 KB |
Output is correct |
38 |
Correct |
36 ms |
24156 KB |
Output is correct |
39 |
Correct |
11 ms |
23900 KB |
Output is correct |
40 |
Correct |
37 ms |
24156 KB |
Output is correct |
41 |
Correct |
46 ms |
24156 KB |
Output is correct |
42 |
Correct |
49 ms |
24156 KB |
Output is correct |
43 |
Correct |
36 ms |
24152 KB |
Output is correct |
44 |
Correct |
36 ms |
24156 KB |
Output is correct |
45 |
Correct |
36 ms |
24156 KB |
Output is correct |
46 |
Correct |
37 ms |
24156 KB |
Output is correct |
47 |
Correct |
12 ms |
23900 KB |
Output is correct |
48 |
Correct |
36 ms |
24156 KB |
Output is correct |
49 |
Correct |
36 ms |
24152 KB |
Output is correct |
50 |
Correct |
41 ms |
24152 KB |
Output is correct |
51 |
Correct |
37 ms |
24152 KB |
Output is correct |
52 |
Correct |
38 ms |
24156 KB |
Output is correct |
53 |
Correct |
40 ms |
24156 KB |
Output is correct |
54 |
Correct |
41 ms |
24408 KB |
Output is correct |
55 |
Correct |
37 ms |
24152 KB |
Output is correct |
56 |
Correct |
37 ms |
24156 KB |
Output is correct |
57 |
Correct |
37 ms |
24156 KB |
Output is correct |
58 |
Correct |
50 ms |
24156 KB |
Output is correct |
59 |
Correct |
37 ms |
24156 KB |
Output is correct |
60 |
Correct |
37 ms |
23928 KB |
Output is correct |
61 |
Correct |
14 ms |
23900 KB |
Output is correct |
62 |
Correct |
36 ms |
24160 KB |
Output is correct |
63 |
Correct |
37 ms |
24152 KB |
Output is correct |
64 |
Correct |
37 ms |
23972 KB |
Output is correct |
65 |
Correct |
39 ms |
24176 KB |
Output is correct |
66 |
Correct |
35 ms |
24152 KB |
Output is correct |
67 |
Correct |
36 ms |
24156 KB |
Output is correct |
68 |
Correct |
37 ms |
24152 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
23896 KB |
Output is correct |
2 |
Correct |
63 ms |
39872 KB |
Output is correct |
3 |
Correct |
63 ms |
40124 KB |
Output is correct |
4 |
Correct |
64 ms |
39872 KB |
Output is correct |
5 |
Correct |
62 ms |
39872 KB |
Output is correct |
6 |
Correct |
63 ms |
39896 KB |
Output is correct |
7 |
Correct |
66 ms |
39960 KB |
Output is correct |
8 |
Correct |
61 ms |
39872 KB |
Output is correct |
9 |
Correct |
63 ms |
40104 KB |
Output is correct |
10 |
Correct |
61 ms |
39924 KB |
Output is correct |
11 |
Correct |
62 ms |
39880 KB |
Output is correct |
12 |
Correct |
62 ms |
40128 KB |
Output is correct |
13 |
Correct |
59 ms |
40120 KB |
Output is correct |
14 |
Correct |
57 ms |
40032 KB |
Output is correct |
15 |
Correct |
61 ms |
39872 KB |
Output is correct |
16 |
Correct |
63 ms |
39988 KB |
Output is correct |
17 |
Correct |
60 ms |
39876 KB |
Output is correct |
18 |
Correct |
60 ms |
39872 KB |
Output is correct |
19 |
Correct |
59 ms |
39984 KB |
Output is correct |
20 |
Correct |
81 ms |
40120 KB |
Output is correct |
21 |
Correct |
65 ms |
39876 KB |
Output is correct |
22 |
Correct |
10 ms |
23896 KB |
Output is correct |
23 |
Correct |
36 ms |
24152 KB |
Output is correct |
24 |
Correct |
41 ms |
24152 KB |
Output is correct |
25 |
Correct |
42 ms |
24156 KB |
Output is correct |
26 |
Correct |
52 ms |
24152 KB |
Output is correct |
27 |
Correct |
37 ms |
24156 KB |
Output is correct |
28 |
Correct |
36 ms |
24152 KB |
Output is correct |
29 |
Correct |
42 ms |
24152 KB |
Output is correct |
30 |
Correct |
35 ms |
24156 KB |
Output is correct |
31 |
Correct |
36 ms |
24156 KB |
Output is correct |
32 |
Correct |
36 ms |
23900 KB |
Output is correct |
33 |
Correct |
43 ms |
24152 KB |
Output is correct |
34 |
Correct |
40 ms |
23964 KB |
Output is correct |
35 |
Correct |
36 ms |
24156 KB |
Output is correct |
36 |
Correct |
11 ms |
23900 KB |
Output is correct |
37 |
Correct |
37 ms |
24156 KB |
Output is correct |
38 |
Correct |
46 ms |
24156 KB |
Output is correct |
39 |
Correct |
49 ms |
24156 KB |
Output is correct |
40 |
Correct |
36 ms |
24152 KB |
Output is correct |
41 |
Correct |
36 ms |
24156 KB |
Output is correct |
42 |
Correct |
36 ms |
24156 KB |
Output is correct |
43 |
Correct |
37 ms |
24156 KB |
Output is correct |
44 |
Correct |
11 ms |
23864 KB |
Output is correct |
45 |
Correct |
116 ms |
40012 KB |
Output is correct |
46 |
Correct |
117 ms |
40012 KB |
Output is correct |
47 |
Correct |
113 ms |
40128 KB |
Output is correct |
48 |
Correct |
113 ms |
40124 KB |
Output is correct |
49 |
Correct |
114 ms |
40128 KB |
Output is correct |
50 |
Correct |
113 ms |
39872 KB |
Output is correct |
51 |
Correct |
112 ms |
39956 KB |
Output is correct |
52 |
Correct |
114 ms |
40128 KB |
Output is correct |
53 |
Correct |
116 ms |
40124 KB |
Output is correct |
54 |
Correct |
115 ms |
40124 KB |
Output is correct |
55 |
Correct |
135 ms |
40124 KB |
Output is correct |
56 |
Correct |
117 ms |
40112 KB |
Output is correct |
57 |
Correct |
113 ms |
40000 KB |
Output is correct |
58 |
Correct |
12 ms |
23900 KB |
Output is correct |
59 |
Correct |
124 ms |
39992 KB |
Output is correct |
60 |
Correct |
113 ms |
39988 KB |
Output is correct |
61 |
Correct |
112 ms |
39992 KB |
Output is correct |
62 |
Correct |
124 ms |
40124 KB |
Output is correct |
63 |
Correct |
113 ms |
40032 KB |
Output is correct |
64 |
Correct |
120 ms |
40112 KB |
Output is correct |
65 |
Correct |
111 ms |
40120 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
23900 KB |
Output is correct |
2 |
Correct |
10 ms |
23900 KB |
Output is correct |
3 |
Correct |
11 ms |
23956 KB |
Output is correct |
4 |
Correct |
10 ms |
23900 KB |
Output is correct |
5 |
Correct |
11 ms |
23900 KB |
Output is correct |
6 |
Correct |
10 ms |
23900 KB |
Output is correct |
7 |
Correct |
10 ms |
23960 KB |
Output is correct |
8 |
Correct |
12 ms |
23900 KB |
Output is correct |
9 |
Correct |
11 ms |
23748 KB |
Output is correct |
10 |
Correct |
12 ms |
23900 KB |
Output is correct |
11 |
Correct |
11 ms |
23896 KB |
Output is correct |
12 |
Correct |
11 ms |
23900 KB |
Output is correct |
13 |
Correct |
14 ms |
23948 KB |
Output is correct |
14 |
Correct |
15 ms |
23900 KB |
Output is correct |
15 |
Correct |
11 ms |
23900 KB |
Output is correct |
16 |
Correct |
11 ms |
23900 KB |
Output is correct |
17 |
Correct |
11 ms |
23900 KB |
Output is correct |
18 |
Correct |
10 ms |
23952 KB |
Output is correct |
19 |
Correct |
14 ms |
23764 KB |
Output is correct |
20 |
Correct |
12 ms |
23900 KB |
Output is correct |
21 |
Correct |
11 ms |
23900 KB |
Output is correct |
22 |
Correct |
12 ms |
23836 KB |
Output is correct |
23 |
Correct |
12 ms |
23952 KB |
Output is correct |
24 |
Correct |
11 ms |
23828 KB |
Output is correct |
25 |
Correct |
11 ms |
23900 KB |
Output is correct |
26 |
Correct |
52 ms |
33928 KB |
Output is correct |
27 |
Correct |
54 ms |
33980 KB |
Output is correct |
28 |
Correct |
53 ms |
33872 KB |
Output is correct |
29 |
Correct |
53 ms |
33988 KB |
Output is correct |
30 |
Correct |
62 ms |
33984 KB |
Output is correct |
31 |
Correct |
53 ms |
33992 KB |
Output is correct |
32 |
Correct |
55 ms |
33948 KB |
Output is correct |
33 |
Correct |
59 ms |
33972 KB |
Output is correct |
34 |
Correct |
73 ms |
33800 KB |
Output is correct |
35 |
Correct |
51 ms |
33892 KB |
Output is correct |
36 |
Correct |
53 ms |
33992 KB |
Output is correct |
37 |
Correct |
51 ms |
33988 KB |
Output is correct |
38 |
Correct |
49 ms |
34000 KB |
Output is correct |
39 |
Correct |
51 ms |
33884 KB |
Output is correct |
40 |
Correct |
53 ms |
33884 KB |
Output is correct |
41 |
Correct |
52 ms |
33912 KB |
Output is correct |
42 |
Correct |
52 ms |
33940 KB |
Output is correct |
43 |
Correct |
69 ms |
33988 KB |
Output is correct |
44 |
Correct |
60 ms |
33984 KB |
Output is correct |
45 |
Correct |
51 ms |
33992 KB |
Output is correct |
46 |
Correct |
11 ms |
23896 KB |
Output is correct |
47 |
Correct |
63 ms |
39872 KB |
Output is correct |
48 |
Correct |
63 ms |
40124 KB |
Output is correct |
49 |
Correct |
64 ms |
39872 KB |
Output is correct |
50 |
Correct |
62 ms |
39872 KB |
Output is correct |
51 |
Correct |
63 ms |
39896 KB |
Output is correct |
52 |
Correct |
66 ms |
39960 KB |
Output is correct |
53 |
Correct |
61 ms |
39872 KB |
Output is correct |
54 |
Correct |
63 ms |
40104 KB |
Output is correct |
55 |
Correct |
61 ms |
39924 KB |
Output is correct |
56 |
Correct |
62 ms |
39880 KB |
Output is correct |
57 |
Correct |
62 ms |
40128 KB |
Output is correct |
58 |
Correct |
59 ms |
40120 KB |
Output is correct |
59 |
Correct |
57 ms |
40032 KB |
Output is correct |
60 |
Correct |
61 ms |
39872 KB |
Output is correct |
61 |
Correct |
63 ms |
39988 KB |
Output is correct |
62 |
Correct |
60 ms |
39876 KB |
Output is correct |
63 |
Correct |
60 ms |
39872 KB |
Output is correct |
64 |
Correct |
59 ms |
39984 KB |
Output is correct |
65 |
Correct |
81 ms |
40120 KB |
Output is correct |
66 |
Correct |
65 ms |
39876 KB |
Output is correct |
67 |
Correct |
10 ms |
23896 KB |
Output is correct |
68 |
Correct |
36 ms |
24152 KB |
Output is correct |
69 |
Correct |
41 ms |
24152 KB |
Output is correct |
70 |
Correct |
42 ms |
24156 KB |
Output is correct |
71 |
Correct |
52 ms |
24152 KB |
Output is correct |
72 |
Correct |
37 ms |
24156 KB |
Output is correct |
73 |
Correct |
36 ms |
24152 KB |
Output is correct |
74 |
Correct |
42 ms |
24152 KB |
Output is correct |
75 |
Correct |
35 ms |
24156 KB |
Output is correct |
76 |
Correct |
36 ms |
24156 KB |
Output is correct |
77 |
Correct |
36 ms |
23900 KB |
Output is correct |
78 |
Correct |
43 ms |
24152 KB |
Output is correct |
79 |
Correct |
40 ms |
23964 KB |
Output is correct |
80 |
Correct |
36 ms |
24156 KB |
Output is correct |
81 |
Correct |
11 ms |
23900 KB |
Output is correct |
82 |
Correct |
37 ms |
24156 KB |
Output is correct |
83 |
Correct |
46 ms |
24156 KB |
Output is correct |
84 |
Correct |
49 ms |
24156 KB |
Output is correct |
85 |
Correct |
36 ms |
24152 KB |
Output is correct |
86 |
Correct |
36 ms |
24156 KB |
Output is correct |
87 |
Correct |
36 ms |
24156 KB |
Output is correct |
88 |
Correct |
37 ms |
24156 KB |
Output is correct |
89 |
Correct |
12 ms |
23900 KB |
Output is correct |
90 |
Correct |
36 ms |
24156 KB |
Output is correct |
91 |
Correct |
36 ms |
24152 KB |
Output is correct |
92 |
Correct |
41 ms |
24152 KB |
Output is correct |
93 |
Correct |
37 ms |
24152 KB |
Output is correct |
94 |
Correct |
38 ms |
24156 KB |
Output is correct |
95 |
Correct |
40 ms |
24156 KB |
Output is correct |
96 |
Correct |
41 ms |
24408 KB |
Output is correct |
97 |
Correct |
37 ms |
24152 KB |
Output is correct |
98 |
Correct |
37 ms |
24156 KB |
Output is correct |
99 |
Correct |
37 ms |
24156 KB |
Output is correct |
100 |
Correct |
50 ms |
24156 KB |
Output is correct |
101 |
Correct |
37 ms |
24156 KB |
Output is correct |
102 |
Correct |
37 ms |
23928 KB |
Output is correct |
103 |
Correct |
14 ms |
23900 KB |
Output is correct |
104 |
Correct |
36 ms |
24160 KB |
Output is correct |
105 |
Correct |
37 ms |
24152 KB |
Output is correct |
106 |
Correct |
37 ms |
23972 KB |
Output is correct |
107 |
Correct |
39 ms |
24176 KB |
Output is correct |
108 |
Correct |
35 ms |
24152 KB |
Output is correct |
109 |
Correct |
36 ms |
24156 KB |
Output is correct |
110 |
Correct |
37 ms |
24152 KB |
Output is correct |
111 |
Correct |
11 ms |
23864 KB |
Output is correct |
112 |
Correct |
116 ms |
40012 KB |
Output is correct |
113 |
Correct |
117 ms |
40012 KB |
Output is correct |
114 |
Correct |
113 ms |
40128 KB |
Output is correct |
115 |
Correct |
113 ms |
40124 KB |
Output is correct |
116 |
Correct |
114 ms |
40128 KB |
Output is correct |
117 |
Correct |
113 ms |
39872 KB |
Output is correct |
118 |
Correct |
112 ms |
39956 KB |
Output is correct |
119 |
Correct |
114 ms |
40128 KB |
Output is correct |
120 |
Correct |
116 ms |
40124 KB |
Output is correct |
121 |
Correct |
115 ms |
40124 KB |
Output is correct |
122 |
Correct |
135 ms |
40124 KB |
Output is correct |
123 |
Correct |
117 ms |
40112 KB |
Output is correct |
124 |
Correct |
113 ms |
40000 KB |
Output is correct |
125 |
Correct |
12 ms |
23900 KB |
Output is correct |
126 |
Correct |
124 ms |
39992 KB |
Output is correct |
127 |
Correct |
113 ms |
39988 KB |
Output is correct |
128 |
Correct |
112 ms |
39992 KB |
Output is correct |
129 |
Correct |
124 ms |
40124 KB |
Output is correct |
130 |
Correct |
113 ms |
40032 KB |
Output is correct |
131 |
Correct |
120 ms |
40112 KB |
Output is correct |
132 |
Correct |
111 ms |
40120 KB |
Output is correct |
133 |
Correct |
11 ms |
23900 KB |
Output is correct |
134 |
Correct |
123 ms |
40896 KB |
Output is correct |
135 |
Correct |
116 ms |
40948 KB |
Output is correct |
136 |
Correct |
132 ms |
40896 KB |
Output is correct |
137 |
Correct |
117 ms |
40896 KB |
Output is correct |
138 |
Correct |
115 ms |
40916 KB |
Output is correct |
139 |
Correct |
117 ms |
40896 KB |
Output is correct |
140 |
Correct |
121 ms |
40896 KB |
Output is correct |
141 |
Correct |
122 ms |
40852 KB |
Output is correct |
142 |
Correct |
124 ms |
40896 KB |
Output is correct |
143 |
Correct |
128 ms |
41004 KB |
Output is correct |
144 |
Correct |
116 ms |
40892 KB |
Output is correct |
145 |
Correct |
120 ms |
40896 KB |
Output is correct |
146 |
Correct |
113 ms |
40952 KB |
Output is correct |
147 |
Correct |
14 ms |
23900 KB |
Output is correct |
148 |
Correct |
121 ms |
40948 KB |
Output is correct |
149 |
Correct |
118 ms |
40892 KB |
Output is correct |
150 |
Correct |
116 ms |
40984 KB |
Output is correct |
151 |
Correct |
113 ms |
40940 KB |
Output is correct |
152 |
Correct |
122 ms |
40852 KB |
Output is correct |
153 |
Correct |
113 ms |
41048 KB |
Output is correct |
154 |
Correct |
114 ms |
40856 KB |
Output is correct |