#include<bits/stdc++.h>
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("trapv")
#define st first
#define nd second
#define pb push_back
#define eb emplace_back
#define pp(x) pop_back(x)
#define mp(a, b) make_pair(a, b)
#define all(x) (x).begin(), (x).end()
#define rev(x) reverse(all(x))
#define sor(x) sort(all(x))
#define sz(x) (int)(x).size()
#define rsz(x) resize(x)
using namespace std;
///~~~~~~~~~~~~~~~~~~~~~~~~~~
template <typename H, typename T>
ostream& operator<<(ostream& os, pair<H, T> m){
return os <<"("<< m.st<<", "<<m.nd<<")";
}
template <typename H>
ostream& operator<<(ostream& os, vector<H> V){
os<<"{";
for(int i=0; i<V.size(); i++){
if(i)os<<" ";
os<<V[i];
}
os<<"}";
return os;
}
void debug(){cerr<<"\n";}
template <typename H, typename... T>
void debug(H h, T... t) {cerr<<h; if (sizeof...(t)) cerr << ", "; debug(t...);}
#define deb(x...) cerr<<#x<<" = ";debug(x);
///~~~~~~~~~~~~~~~~~~~~~~~~~
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<pii > vii;
typedef vector<ll> vl;
typedef vector<pll> vll;
typedef string str;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define BOOST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
//mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
const int N=(1<<18), INF=1e9+5, mod=1e9+7, mod2=998244353;
struct modint{
int n=0;
modint(){}
modint(ll x){
n=x%mod;
if(n<0)n+=mod;
}
operator int(){
return n;
}
modint operator+(modint a){a.n = n+a.n; if(a.n>=mod)a.n-=mod;return a;}
modint operator+=(modint a){return (*this)=(*this)+a;}
modint operator-(modint a){a.n = n-a.n; if(a.n<0)a.n+=mod;return a;}
modint operator-=(modint a){return (*this)=(*this)-a;}
modint operator*(modint a){a.n = (n*1ll*a.n)%mod; return a;}
modint operator*=(modint a){return (*this)=(*this)*a;}
modint operator^(const ll &m)const{
modint a(1);
if(m==0)return a;
if(m==1)return (*this);
a=(*this)^(m/2);
a*=a;
return a*((*this)^(m&1));
}
modint odw(){
return (*this)^((ll)mod-2);
}
modint operator/(modint a){return (*this)*a.odw();}
modint operator/=(modint a){return (*this)=(*this)/a;}
bool operator==(modint a){return a.n==n;}
friend ostream& operator<<(ostream& os, modint m) {
return os << m.n;
}
};
modint fact[N], fact2[N];
typedef vector<modint> vm;
void factinit(){
fact[0]=1;
for(int i=1; i<N; i++){
fact[i]=(fact[i-1]*modint(i))%mod;
}
fact2[N-1]=fact[N-1].odw();
for(int i=N-2; i>=0; i--){
fact2[i]=(fact2[i+1]*modint(i+1))%mod;
}
}
modint npok(int _n, int _k){
return fact[_n]*fact2[_k]*fact2[_n-_k];
}
int kto[N], ans[N], co[N];
vector<pair<ll, int> > quer[N];
vector<pii> pocz[N], kon[N];
ll mi[N+N], ma[N+N], gdzie[N+N], sum[N+N], sum2[N+N];//gdzie - cos co daje minimum
void upd(int v){
assert(v<N);
int l=v+v, r=l+1;
sum[v]=sum[l]+sum[r];
sum2[v]=sum2[l]+sum2[r];
ma[v]=max(ma[l],sum[l]+ma[r]);
if(mi[l]>=mi[r]+sum[l]){
gdzie[v]=gdzie[r];
mi[v]=mi[r]+sum[l];
}
else{
gdzie[v]=gdzie[l];
mi[v]=mi[l];
}
}
void ust(int v, ll k){
//deb(v, k);
v+=N;
sum[v]=mi[v]=ma[v]=k;
if(k>=0)sum2[v]=k;
gdzie[v]=v-N;
v/=2;
while(v){
upd(v);
v/=2;
}
}
int licz(int v, ll k){
//deb(v, k);
//deb(sum[N/4], sum[N/4+1], sum[N/8+1]);
int vv=v;
ll s=0, s2=0, res=0, id=0;
v+=N;
while(v!=1){
if(v&1){
v--;
s+=sum[v];
s2+=sum2[v];
//deb(v, sum[v]);
res=min(res, mi[v]-s);
}
v/=2;
}
res+=s;
k=s-res-k;
//deb(s, res, k);
if(k<0)return 0;
s=0;
v=vv+N;
/*while(v!=1){
if(v&1){
v--;
if(sum[v]-mi[v]>k-s){
while(v<N){
int l=v+v, r=l+1;
//deb(v, l, r );
if(sum[r]-mi[r]>k-s)v=r;
else{
v=l;
s+=sum[r];
}
}
//deb(v-N);
return v+1-N;
}
else s+=sum[v];
}
v/=2;
}*/
while(v!=1){
if(v&1){
v--;
if(sum2[v]>k){
while(v<N){
int l=v+v, r=l+1;
//deb(v, l, r );
if(sum2[r]>k)v=r;
else{
v=l;
k-=sum2[r];
}
}
//deb(v-N);
return v-N;
}
else k-=sum2[v];
}
v/=2;
}
assert(false);
}
int main(){
//factinit();
//BOOST;
int n, m, q;
cin>>n>>m>>q;
int wsk=1;
for(int i=1; i<=q; i++){
int t;
cin>>t;
if(t==3){
int a;
ll b;
cin>>a>>b;
co[i]=wsk++;
quer[a].eb(b, i);
}
else{
int l, r;
cin>>l>>r;
if(t==1)cin>>kto[i];
int k;
cin>>k;
if(t==2)k=-k;
pocz[l].eb(k, i);
kon[r].eb(k, i);
}
}
for(int i=1; i<=n; i++){
for(int j=0; j<pocz[i].size(); j++){
ust(pocz[i][j].nd, pocz[i][j].st);
}
for(int j=0; j<quer[i].size(); j++){
int t=licz(quer[i][j].nd, quer[i][j].st);
ans[co[quer[i][j].nd]]=kto[t];
}
for(int j=0; j<kon[i].size(); j++){
ust(kon[i][j].nd, 0);
}
}
for(int i=1; i<wsk;i++){
cout<<ans[i]<<"\n";
}
}
Compilation message
foodcourt.cpp: In function 'int licz(int, ll)':
foodcourt.cpp:152:23: warning: unused variable 'id' [-Wunused-variable]
152 | ll s=0, s2=0, res=0, id=0;
| ^~
foodcourt.cpp: In function 'int main()':
foodcourt.cpp:240:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
240 | for(int j=0; j<pocz[i].size(); j++){
| ~^~~~~~~~~~~~~~~
foodcourt.cpp:243:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
243 | for(int j=0; j<quer[i].size(); j++){
| ~^~~~~~~~~~~~~~~
foodcourt.cpp:247:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
247 | for(int j=0; j<kon[i].size(); j++){
| ~^~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
21204 KB |
Output is correct |
2 |
Correct |
15 ms |
21316 KB |
Output is correct |
3 |
Correct |
14 ms |
21204 KB |
Output is correct |
4 |
Correct |
14 ms |
21332 KB |
Output is correct |
5 |
Correct |
17 ms |
21200 KB |
Output is correct |
6 |
Correct |
12 ms |
21276 KB |
Output is correct |
7 |
Correct |
20 ms |
21332 KB |
Output is correct |
8 |
Correct |
13 ms |
21428 KB |
Output is correct |
9 |
Correct |
15 ms |
21332 KB |
Output is correct |
10 |
Correct |
13 ms |
21348 KB |
Output is correct |
11 |
Correct |
14 ms |
21364 KB |
Output is correct |
12 |
Correct |
17 ms |
21308 KB |
Output is correct |
13 |
Correct |
12 ms |
21204 KB |
Output is correct |
14 |
Correct |
12 ms |
21320 KB |
Output is correct |
15 |
Correct |
12 ms |
21236 KB |
Output is correct |
16 |
Correct |
17 ms |
21320 KB |
Output is correct |
17 |
Correct |
19 ms |
21224 KB |
Output is correct |
18 |
Correct |
20 ms |
21324 KB |
Output is correct |
19 |
Correct |
14 ms |
21232 KB |
Output is correct |
20 |
Correct |
14 ms |
21384 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
21204 KB |
Output is correct |
2 |
Correct |
15 ms |
21316 KB |
Output is correct |
3 |
Correct |
14 ms |
21204 KB |
Output is correct |
4 |
Correct |
14 ms |
21332 KB |
Output is correct |
5 |
Correct |
17 ms |
21200 KB |
Output is correct |
6 |
Correct |
12 ms |
21276 KB |
Output is correct |
7 |
Correct |
20 ms |
21332 KB |
Output is correct |
8 |
Correct |
13 ms |
21428 KB |
Output is correct |
9 |
Correct |
15 ms |
21332 KB |
Output is correct |
10 |
Correct |
13 ms |
21348 KB |
Output is correct |
11 |
Correct |
14 ms |
21364 KB |
Output is correct |
12 |
Correct |
17 ms |
21308 KB |
Output is correct |
13 |
Correct |
12 ms |
21204 KB |
Output is correct |
14 |
Correct |
12 ms |
21320 KB |
Output is correct |
15 |
Correct |
12 ms |
21236 KB |
Output is correct |
16 |
Correct |
17 ms |
21320 KB |
Output is correct |
17 |
Correct |
19 ms |
21224 KB |
Output is correct |
18 |
Correct |
20 ms |
21324 KB |
Output is correct |
19 |
Correct |
14 ms |
21232 KB |
Output is correct |
20 |
Correct |
14 ms |
21384 KB |
Output is correct |
21 |
Correct |
13 ms |
21332 KB |
Output is correct |
22 |
Correct |
15 ms |
21296 KB |
Output is correct |
23 |
Correct |
14 ms |
21308 KB |
Output is correct |
24 |
Correct |
17 ms |
21332 KB |
Output is correct |
25 |
Correct |
13 ms |
21236 KB |
Output is correct |
26 |
Correct |
15 ms |
21232 KB |
Output is correct |
27 |
Correct |
17 ms |
21344 KB |
Output is correct |
28 |
Correct |
14 ms |
21340 KB |
Output is correct |
29 |
Correct |
15 ms |
21376 KB |
Output is correct |
30 |
Correct |
18 ms |
21332 KB |
Output is correct |
31 |
Correct |
14 ms |
21332 KB |
Output is correct |
32 |
Correct |
16 ms |
21368 KB |
Output is correct |
33 |
Correct |
13 ms |
21212 KB |
Output is correct |
34 |
Correct |
14 ms |
21276 KB |
Output is correct |
35 |
Correct |
15 ms |
21228 KB |
Output is correct |
36 |
Correct |
16 ms |
21236 KB |
Output is correct |
37 |
Correct |
13 ms |
21228 KB |
Output is correct |
38 |
Correct |
15 ms |
21460 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
126 ms |
30556 KB |
Output is correct |
2 |
Correct |
150 ms |
30572 KB |
Output is correct |
3 |
Correct |
134 ms |
30704 KB |
Output is correct |
4 |
Correct |
132 ms |
30580 KB |
Output is correct |
5 |
Correct |
153 ms |
30552 KB |
Output is correct |
6 |
Correct |
153 ms |
30636 KB |
Output is correct |
7 |
Correct |
114 ms |
28156 KB |
Output is correct |
8 |
Correct |
90 ms |
28388 KB |
Output is correct |
9 |
Correct |
154 ms |
30532 KB |
Output is correct |
10 |
Correct |
148 ms |
30588 KB |
Output is correct |
11 |
Correct |
135 ms |
30560 KB |
Output is correct |
12 |
Correct |
148 ms |
30588 KB |
Output is correct |
13 |
Correct |
155 ms |
29320 KB |
Output is correct |
14 |
Correct |
166 ms |
30476 KB |
Output is correct |
15 |
Correct |
138 ms |
30280 KB |
Output is correct |
16 |
Correct |
164 ms |
30576 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
556 ms |
54692 KB |
Output is correct |
2 |
Correct |
502 ms |
48716 KB |
Output is correct |
3 |
Correct |
663 ms |
57336 KB |
Output is correct |
4 |
Correct |
466 ms |
48588 KB |
Output is correct |
5 |
Correct |
512 ms |
48704 KB |
Output is correct |
6 |
Correct |
611 ms |
57032 KB |
Output is correct |
7 |
Correct |
312 ms |
51108 KB |
Output is correct |
8 |
Correct |
370 ms |
51596 KB |
Output is correct |
9 |
Correct |
628 ms |
56868 KB |
Output is correct |
10 |
Correct |
625 ms |
56880 KB |
Output is correct |
11 |
Correct |
628 ms |
56368 KB |
Output is correct |
12 |
Correct |
642 ms |
56848 KB |
Output is correct |
13 |
Correct |
647 ms |
56320 KB |
Output is correct |
14 |
Correct |
653 ms |
56828 KB |
Output is correct |
15 |
Correct |
642 ms |
56840 KB |
Output is correct |
16 |
Correct |
633 ms |
56884 KB |
Output is correct |
17 |
Correct |
641 ms |
56848 KB |
Output is correct |
18 |
Correct |
648 ms |
56572 KB |
Output is correct |
19 |
Correct |
635 ms |
56820 KB |
Output is correct |
20 |
Correct |
634 ms |
56652 KB |
Output is correct |
21 |
Correct |
591 ms |
56848 KB |
Output is correct |
22 |
Correct |
683 ms |
56752 KB |
Output is correct |
23 |
Correct |
681 ms |
56912 KB |
Output is correct |
24 |
Correct |
664 ms |
56840 KB |
Output is correct |
25 |
Correct |
525 ms |
53968 KB |
Output is correct |
26 |
Correct |
574 ms |
54496 KB |
Output is correct |
27 |
Correct |
548 ms |
58160 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
21204 KB |
Output is correct |
2 |
Correct |
15 ms |
21316 KB |
Output is correct |
3 |
Correct |
14 ms |
21204 KB |
Output is correct |
4 |
Correct |
14 ms |
21332 KB |
Output is correct |
5 |
Correct |
17 ms |
21200 KB |
Output is correct |
6 |
Correct |
12 ms |
21276 KB |
Output is correct |
7 |
Correct |
20 ms |
21332 KB |
Output is correct |
8 |
Correct |
13 ms |
21428 KB |
Output is correct |
9 |
Correct |
15 ms |
21332 KB |
Output is correct |
10 |
Correct |
13 ms |
21348 KB |
Output is correct |
11 |
Correct |
14 ms |
21364 KB |
Output is correct |
12 |
Correct |
17 ms |
21308 KB |
Output is correct |
13 |
Correct |
12 ms |
21204 KB |
Output is correct |
14 |
Correct |
12 ms |
21320 KB |
Output is correct |
15 |
Correct |
12 ms |
21236 KB |
Output is correct |
16 |
Correct |
17 ms |
21320 KB |
Output is correct |
17 |
Correct |
19 ms |
21224 KB |
Output is correct |
18 |
Correct |
20 ms |
21324 KB |
Output is correct |
19 |
Correct |
14 ms |
21232 KB |
Output is correct |
20 |
Correct |
14 ms |
21384 KB |
Output is correct |
21 |
Correct |
126 ms |
30556 KB |
Output is correct |
22 |
Correct |
150 ms |
30572 KB |
Output is correct |
23 |
Correct |
134 ms |
30704 KB |
Output is correct |
24 |
Correct |
132 ms |
30580 KB |
Output is correct |
25 |
Correct |
153 ms |
30552 KB |
Output is correct |
26 |
Correct |
153 ms |
30636 KB |
Output is correct |
27 |
Correct |
114 ms |
28156 KB |
Output is correct |
28 |
Correct |
90 ms |
28388 KB |
Output is correct |
29 |
Correct |
154 ms |
30532 KB |
Output is correct |
30 |
Correct |
148 ms |
30588 KB |
Output is correct |
31 |
Correct |
135 ms |
30560 KB |
Output is correct |
32 |
Correct |
148 ms |
30588 KB |
Output is correct |
33 |
Correct |
155 ms |
29320 KB |
Output is correct |
34 |
Correct |
166 ms |
30476 KB |
Output is correct |
35 |
Correct |
138 ms |
30280 KB |
Output is correct |
36 |
Correct |
164 ms |
30576 KB |
Output is correct |
37 |
Correct |
136 ms |
29448 KB |
Output is correct |
38 |
Correct |
114 ms |
28408 KB |
Output is correct |
39 |
Correct |
68 ms |
27192 KB |
Output is correct |
40 |
Correct |
67 ms |
28196 KB |
Output is correct |
41 |
Correct |
124 ms |
30208 KB |
Output is correct |
42 |
Correct |
113 ms |
30284 KB |
Output is correct |
43 |
Correct |
150 ms |
30224 KB |
Output is correct |
44 |
Correct |
157 ms |
30256 KB |
Output is correct |
45 |
Correct |
134 ms |
30256 KB |
Output is correct |
46 |
Correct |
163 ms |
30200 KB |
Output is correct |
47 |
Correct |
96 ms |
28984 KB |
Output is correct |
48 |
Correct |
130 ms |
29604 KB |
Output is correct |
49 |
Correct |
135 ms |
27492 KB |
Output is correct |
50 |
Correct |
170 ms |
28984 KB |
Output is correct |
51 |
Correct |
183 ms |
30320 KB |
Output is correct |
52 |
Correct |
132 ms |
30288 KB |
Output is correct |
53 |
Correct |
135 ms |
28524 KB |
Output is correct |
54 |
Correct |
131 ms |
30636 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
133 ms |
29948 KB |
Output is correct |
2 |
Correct |
139 ms |
30732 KB |
Output is correct |
3 |
Correct |
174 ms |
30996 KB |
Output is correct |
4 |
Correct |
113 ms |
27980 KB |
Output is correct |
5 |
Correct |
142 ms |
29600 KB |
Output is correct |
6 |
Correct |
176 ms |
30932 KB |
Output is correct |
7 |
Correct |
121 ms |
28440 KB |
Output is correct |
8 |
Correct |
103 ms |
28112 KB |
Output is correct |
9 |
Correct |
133 ms |
29836 KB |
Output is correct |
10 |
Correct |
99 ms |
27356 KB |
Output is correct |
11 |
Correct |
163 ms |
30036 KB |
Output is correct |
12 |
Correct |
135 ms |
30120 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
21204 KB |
Output is correct |
2 |
Correct |
15 ms |
21316 KB |
Output is correct |
3 |
Correct |
14 ms |
21204 KB |
Output is correct |
4 |
Correct |
14 ms |
21332 KB |
Output is correct |
5 |
Correct |
17 ms |
21200 KB |
Output is correct |
6 |
Correct |
12 ms |
21276 KB |
Output is correct |
7 |
Correct |
20 ms |
21332 KB |
Output is correct |
8 |
Correct |
13 ms |
21428 KB |
Output is correct |
9 |
Correct |
15 ms |
21332 KB |
Output is correct |
10 |
Correct |
13 ms |
21348 KB |
Output is correct |
11 |
Correct |
14 ms |
21364 KB |
Output is correct |
12 |
Correct |
17 ms |
21308 KB |
Output is correct |
13 |
Correct |
12 ms |
21204 KB |
Output is correct |
14 |
Correct |
12 ms |
21320 KB |
Output is correct |
15 |
Correct |
12 ms |
21236 KB |
Output is correct |
16 |
Correct |
17 ms |
21320 KB |
Output is correct |
17 |
Correct |
19 ms |
21224 KB |
Output is correct |
18 |
Correct |
20 ms |
21324 KB |
Output is correct |
19 |
Correct |
14 ms |
21232 KB |
Output is correct |
20 |
Correct |
14 ms |
21384 KB |
Output is correct |
21 |
Correct |
13 ms |
21332 KB |
Output is correct |
22 |
Correct |
15 ms |
21296 KB |
Output is correct |
23 |
Correct |
14 ms |
21308 KB |
Output is correct |
24 |
Correct |
17 ms |
21332 KB |
Output is correct |
25 |
Correct |
13 ms |
21236 KB |
Output is correct |
26 |
Correct |
15 ms |
21232 KB |
Output is correct |
27 |
Correct |
17 ms |
21344 KB |
Output is correct |
28 |
Correct |
14 ms |
21340 KB |
Output is correct |
29 |
Correct |
15 ms |
21376 KB |
Output is correct |
30 |
Correct |
18 ms |
21332 KB |
Output is correct |
31 |
Correct |
14 ms |
21332 KB |
Output is correct |
32 |
Correct |
16 ms |
21368 KB |
Output is correct |
33 |
Correct |
13 ms |
21212 KB |
Output is correct |
34 |
Correct |
14 ms |
21276 KB |
Output is correct |
35 |
Correct |
15 ms |
21228 KB |
Output is correct |
36 |
Correct |
16 ms |
21236 KB |
Output is correct |
37 |
Correct |
13 ms |
21228 KB |
Output is correct |
38 |
Correct |
15 ms |
21460 KB |
Output is correct |
39 |
Correct |
126 ms |
30556 KB |
Output is correct |
40 |
Correct |
150 ms |
30572 KB |
Output is correct |
41 |
Correct |
134 ms |
30704 KB |
Output is correct |
42 |
Correct |
132 ms |
30580 KB |
Output is correct |
43 |
Correct |
153 ms |
30552 KB |
Output is correct |
44 |
Correct |
153 ms |
30636 KB |
Output is correct |
45 |
Correct |
114 ms |
28156 KB |
Output is correct |
46 |
Correct |
90 ms |
28388 KB |
Output is correct |
47 |
Correct |
154 ms |
30532 KB |
Output is correct |
48 |
Correct |
148 ms |
30588 KB |
Output is correct |
49 |
Correct |
135 ms |
30560 KB |
Output is correct |
50 |
Correct |
148 ms |
30588 KB |
Output is correct |
51 |
Correct |
155 ms |
29320 KB |
Output is correct |
52 |
Correct |
166 ms |
30476 KB |
Output is correct |
53 |
Correct |
138 ms |
30280 KB |
Output is correct |
54 |
Correct |
164 ms |
30576 KB |
Output is correct |
55 |
Correct |
136 ms |
29448 KB |
Output is correct |
56 |
Correct |
114 ms |
28408 KB |
Output is correct |
57 |
Correct |
68 ms |
27192 KB |
Output is correct |
58 |
Correct |
67 ms |
28196 KB |
Output is correct |
59 |
Correct |
124 ms |
30208 KB |
Output is correct |
60 |
Correct |
113 ms |
30284 KB |
Output is correct |
61 |
Correct |
150 ms |
30224 KB |
Output is correct |
62 |
Correct |
157 ms |
30256 KB |
Output is correct |
63 |
Correct |
134 ms |
30256 KB |
Output is correct |
64 |
Correct |
163 ms |
30200 KB |
Output is correct |
65 |
Correct |
96 ms |
28984 KB |
Output is correct |
66 |
Correct |
130 ms |
29604 KB |
Output is correct |
67 |
Correct |
135 ms |
27492 KB |
Output is correct |
68 |
Correct |
170 ms |
28984 KB |
Output is correct |
69 |
Correct |
183 ms |
30320 KB |
Output is correct |
70 |
Correct |
132 ms |
30288 KB |
Output is correct |
71 |
Correct |
135 ms |
28524 KB |
Output is correct |
72 |
Correct |
131 ms |
30636 KB |
Output is correct |
73 |
Correct |
133 ms |
29948 KB |
Output is correct |
74 |
Correct |
139 ms |
30732 KB |
Output is correct |
75 |
Correct |
174 ms |
30996 KB |
Output is correct |
76 |
Correct |
113 ms |
27980 KB |
Output is correct |
77 |
Correct |
142 ms |
29600 KB |
Output is correct |
78 |
Correct |
176 ms |
30932 KB |
Output is correct |
79 |
Correct |
121 ms |
28440 KB |
Output is correct |
80 |
Correct |
103 ms |
28112 KB |
Output is correct |
81 |
Correct |
133 ms |
29836 KB |
Output is correct |
82 |
Correct |
99 ms |
27356 KB |
Output is correct |
83 |
Correct |
163 ms |
30036 KB |
Output is correct |
84 |
Correct |
135 ms |
30120 KB |
Output is correct |
85 |
Correct |
158 ms |
29980 KB |
Output is correct |
86 |
Correct |
175 ms |
30928 KB |
Output is correct |
87 |
Correct |
157 ms |
29616 KB |
Output is correct |
88 |
Correct |
160 ms |
30956 KB |
Output is correct |
89 |
Correct |
132 ms |
27552 KB |
Output is correct |
90 |
Correct |
153 ms |
30796 KB |
Output is correct |
91 |
Correct |
149 ms |
28976 KB |
Output is correct |
92 |
Correct |
175 ms |
28552 KB |
Output is correct |
93 |
Correct |
341 ms |
30744 KB |
Output is correct |
94 |
Correct |
166 ms |
30672 KB |
Output is correct |
95 |
Correct |
167 ms |
30680 KB |
Output is correct |
96 |
Correct |
173 ms |
30752 KB |
Output is correct |
97 |
Correct |
152 ms |
30708 KB |
Output is correct |
98 |
Correct |
180 ms |
29244 KB |
Output is correct |
99 |
Correct |
140 ms |
29508 KB |
Output is correct |
100 |
Correct |
120 ms |
28452 KB |
Output is correct |
101 |
Correct |
149 ms |
30156 KB |
Output is correct |
102 |
Correct |
191 ms |
31100 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
21204 KB |
Output is correct |
2 |
Correct |
15 ms |
21316 KB |
Output is correct |
3 |
Correct |
14 ms |
21204 KB |
Output is correct |
4 |
Correct |
14 ms |
21332 KB |
Output is correct |
5 |
Correct |
17 ms |
21200 KB |
Output is correct |
6 |
Correct |
12 ms |
21276 KB |
Output is correct |
7 |
Correct |
20 ms |
21332 KB |
Output is correct |
8 |
Correct |
13 ms |
21428 KB |
Output is correct |
9 |
Correct |
15 ms |
21332 KB |
Output is correct |
10 |
Correct |
13 ms |
21348 KB |
Output is correct |
11 |
Correct |
14 ms |
21364 KB |
Output is correct |
12 |
Correct |
17 ms |
21308 KB |
Output is correct |
13 |
Correct |
12 ms |
21204 KB |
Output is correct |
14 |
Correct |
12 ms |
21320 KB |
Output is correct |
15 |
Correct |
12 ms |
21236 KB |
Output is correct |
16 |
Correct |
17 ms |
21320 KB |
Output is correct |
17 |
Correct |
19 ms |
21224 KB |
Output is correct |
18 |
Correct |
20 ms |
21324 KB |
Output is correct |
19 |
Correct |
14 ms |
21232 KB |
Output is correct |
20 |
Correct |
14 ms |
21384 KB |
Output is correct |
21 |
Correct |
13 ms |
21332 KB |
Output is correct |
22 |
Correct |
15 ms |
21296 KB |
Output is correct |
23 |
Correct |
14 ms |
21308 KB |
Output is correct |
24 |
Correct |
17 ms |
21332 KB |
Output is correct |
25 |
Correct |
13 ms |
21236 KB |
Output is correct |
26 |
Correct |
15 ms |
21232 KB |
Output is correct |
27 |
Correct |
17 ms |
21344 KB |
Output is correct |
28 |
Correct |
14 ms |
21340 KB |
Output is correct |
29 |
Correct |
15 ms |
21376 KB |
Output is correct |
30 |
Correct |
18 ms |
21332 KB |
Output is correct |
31 |
Correct |
14 ms |
21332 KB |
Output is correct |
32 |
Correct |
16 ms |
21368 KB |
Output is correct |
33 |
Correct |
13 ms |
21212 KB |
Output is correct |
34 |
Correct |
14 ms |
21276 KB |
Output is correct |
35 |
Correct |
15 ms |
21228 KB |
Output is correct |
36 |
Correct |
16 ms |
21236 KB |
Output is correct |
37 |
Correct |
13 ms |
21228 KB |
Output is correct |
38 |
Correct |
15 ms |
21460 KB |
Output is correct |
39 |
Correct |
126 ms |
30556 KB |
Output is correct |
40 |
Correct |
150 ms |
30572 KB |
Output is correct |
41 |
Correct |
134 ms |
30704 KB |
Output is correct |
42 |
Correct |
132 ms |
30580 KB |
Output is correct |
43 |
Correct |
153 ms |
30552 KB |
Output is correct |
44 |
Correct |
153 ms |
30636 KB |
Output is correct |
45 |
Correct |
114 ms |
28156 KB |
Output is correct |
46 |
Correct |
90 ms |
28388 KB |
Output is correct |
47 |
Correct |
154 ms |
30532 KB |
Output is correct |
48 |
Correct |
148 ms |
30588 KB |
Output is correct |
49 |
Correct |
135 ms |
30560 KB |
Output is correct |
50 |
Correct |
148 ms |
30588 KB |
Output is correct |
51 |
Correct |
155 ms |
29320 KB |
Output is correct |
52 |
Correct |
166 ms |
30476 KB |
Output is correct |
53 |
Correct |
138 ms |
30280 KB |
Output is correct |
54 |
Correct |
164 ms |
30576 KB |
Output is correct |
55 |
Correct |
556 ms |
54692 KB |
Output is correct |
56 |
Correct |
502 ms |
48716 KB |
Output is correct |
57 |
Correct |
663 ms |
57336 KB |
Output is correct |
58 |
Correct |
466 ms |
48588 KB |
Output is correct |
59 |
Correct |
512 ms |
48704 KB |
Output is correct |
60 |
Correct |
611 ms |
57032 KB |
Output is correct |
61 |
Correct |
312 ms |
51108 KB |
Output is correct |
62 |
Correct |
370 ms |
51596 KB |
Output is correct |
63 |
Correct |
628 ms |
56868 KB |
Output is correct |
64 |
Correct |
625 ms |
56880 KB |
Output is correct |
65 |
Correct |
628 ms |
56368 KB |
Output is correct |
66 |
Correct |
642 ms |
56848 KB |
Output is correct |
67 |
Correct |
647 ms |
56320 KB |
Output is correct |
68 |
Correct |
653 ms |
56828 KB |
Output is correct |
69 |
Correct |
642 ms |
56840 KB |
Output is correct |
70 |
Correct |
633 ms |
56884 KB |
Output is correct |
71 |
Correct |
641 ms |
56848 KB |
Output is correct |
72 |
Correct |
648 ms |
56572 KB |
Output is correct |
73 |
Correct |
635 ms |
56820 KB |
Output is correct |
74 |
Correct |
634 ms |
56652 KB |
Output is correct |
75 |
Correct |
591 ms |
56848 KB |
Output is correct |
76 |
Correct |
683 ms |
56752 KB |
Output is correct |
77 |
Correct |
681 ms |
56912 KB |
Output is correct |
78 |
Correct |
664 ms |
56840 KB |
Output is correct |
79 |
Correct |
525 ms |
53968 KB |
Output is correct |
80 |
Correct |
574 ms |
54496 KB |
Output is correct |
81 |
Correct |
548 ms |
58160 KB |
Output is correct |
82 |
Correct |
136 ms |
29448 KB |
Output is correct |
83 |
Correct |
114 ms |
28408 KB |
Output is correct |
84 |
Correct |
68 ms |
27192 KB |
Output is correct |
85 |
Correct |
67 ms |
28196 KB |
Output is correct |
86 |
Correct |
124 ms |
30208 KB |
Output is correct |
87 |
Correct |
113 ms |
30284 KB |
Output is correct |
88 |
Correct |
150 ms |
30224 KB |
Output is correct |
89 |
Correct |
157 ms |
30256 KB |
Output is correct |
90 |
Correct |
134 ms |
30256 KB |
Output is correct |
91 |
Correct |
163 ms |
30200 KB |
Output is correct |
92 |
Correct |
96 ms |
28984 KB |
Output is correct |
93 |
Correct |
130 ms |
29604 KB |
Output is correct |
94 |
Correct |
135 ms |
27492 KB |
Output is correct |
95 |
Correct |
170 ms |
28984 KB |
Output is correct |
96 |
Correct |
183 ms |
30320 KB |
Output is correct |
97 |
Correct |
132 ms |
30288 KB |
Output is correct |
98 |
Correct |
135 ms |
28524 KB |
Output is correct |
99 |
Correct |
131 ms |
30636 KB |
Output is correct |
100 |
Correct |
133 ms |
29948 KB |
Output is correct |
101 |
Correct |
139 ms |
30732 KB |
Output is correct |
102 |
Correct |
174 ms |
30996 KB |
Output is correct |
103 |
Correct |
113 ms |
27980 KB |
Output is correct |
104 |
Correct |
142 ms |
29600 KB |
Output is correct |
105 |
Correct |
176 ms |
30932 KB |
Output is correct |
106 |
Correct |
121 ms |
28440 KB |
Output is correct |
107 |
Correct |
103 ms |
28112 KB |
Output is correct |
108 |
Correct |
133 ms |
29836 KB |
Output is correct |
109 |
Correct |
99 ms |
27356 KB |
Output is correct |
110 |
Correct |
163 ms |
30036 KB |
Output is correct |
111 |
Correct |
135 ms |
30120 KB |
Output is correct |
112 |
Correct |
158 ms |
29980 KB |
Output is correct |
113 |
Correct |
175 ms |
30928 KB |
Output is correct |
114 |
Correct |
157 ms |
29616 KB |
Output is correct |
115 |
Correct |
160 ms |
30956 KB |
Output is correct |
116 |
Correct |
132 ms |
27552 KB |
Output is correct |
117 |
Correct |
153 ms |
30796 KB |
Output is correct |
118 |
Correct |
149 ms |
28976 KB |
Output is correct |
119 |
Correct |
175 ms |
28552 KB |
Output is correct |
120 |
Correct |
341 ms |
30744 KB |
Output is correct |
121 |
Correct |
166 ms |
30672 KB |
Output is correct |
122 |
Correct |
167 ms |
30680 KB |
Output is correct |
123 |
Correct |
173 ms |
30752 KB |
Output is correct |
124 |
Correct |
152 ms |
30708 KB |
Output is correct |
125 |
Correct |
180 ms |
29244 KB |
Output is correct |
126 |
Correct |
140 ms |
29508 KB |
Output is correct |
127 |
Correct |
120 ms |
28452 KB |
Output is correct |
128 |
Correct |
149 ms |
30156 KB |
Output is correct |
129 |
Correct |
191 ms |
31100 KB |
Output is correct |
130 |
Correct |
720 ms |
58068 KB |
Output is correct |
131 |
Correct |
469 ms |
48928 KB |
Output is correct |
132 |
Correct |
693 ms |
58124 KB |
Output is correct |
133 |
Correct |
655 ms |
56276 KB |
Output is correct |
134 |
Correct |
553 ms |
53140 KB |
Output is correct |
135 |
Correct |
691 ms |
57616 KB |
Output is correct |
136 |
Correct |
580 ms |
57884 KB |
Output is correct |
137 |
Correct |
650 ms |
57736 KB |
Output is correct |
138 |
Correct |
626 ms |
57056 KB |
Output is correct |
139 |
Correct |
641 ms |
57488 KB |
Output is correct |
140 |
Correct |
624 ms |
57064 KB |
Output is correct |
141 |
Correct |
633 ms |
57468 KB |
Output is correct |
142 |
Correct |
674 ms |
57444 KB |
Output is correct |
143 |
Correct |
668 ms |
57620 KB |
Output is correct |
144 |
Correct |
685 ms |
57232 KB |
Output is correct |
145 |
Correct |
696 ms |
57492 KB |
Output is correct |
146 |
Correct |
704 ms |
57368 KB |
Output is correct |
147 |
Correct |
680 ms |
57528 KB |
Output is correct |
148 |
Correct |
717 ms |
57492 KB |
Output is correct |
149 |
Correct |
660 ms |
57548 KB |
Output is correct |
150 |
Correct |
461 ms |
53336 KB |
Output is correct |
151 |
Correct |
626 ms |
55372 KB |
Output is correct |
152 |
Correct |
603 ms |
55304 KB |
Output is correct |
153 |
Correct |
648 ms |
58816 KB |
Output is correct |