#include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define X first
#define Y second
#define y0 y12
#define y1 y22
#define INF 987654321
#define PI 3.141592653589793238462643383279502884
#define fup(i,a,b,c) for(int (i)=(a);(i)<=(b);(i)+=(c))
#define fdn(i,a,b,c) for(int (i)=(a);(i)>=(b);(i)-=(c))
#define MEM0(a) memset((a),0,sizeof(a))
#define MEM_1(a) memset((a),-1,sizeof(a))
#define ALL(a) a.begin(),a.end()
#define COMPRESS(a) sort(ALL(a));a.resize(unique(ALL(a))-a.begin())
#define SYNC ios_base::sync_with_stdio(false);cin.tie(0)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef double db;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<int, int> Pi;
typedef pair<ll, ll> Pll;
typedef pair<ld, ld> Pd;
typedef vector<int> Vi;
typedef vector<ll> Vll;
typedef vector<ld> Vd;
typedef vector<Pi> VPi;
typedef vector<Pll> VPll;
typedef vector<Pd> VPd;
typedef tuple<int, int, int> iii;
typedef tuple<int, int, int, int> iiii;
typedef tuple<ll, ll, ll> LLL;
typedef vector<iii> Viii;
typedef vector<LLL> VLLL;
typedef complex<double> base;
const int MOD = 1000000007;
ll POW(ll a, ll b, ll MMM = MOD) { ll ret = 1; for (; b; b >>= 1, a = (a*a) % MMM)if (b & 1)ret = (ret*a) % MMM; return ret; }
int dx[] = { 0,1,0,-1,1,1,-1,-1 }, dy[] = { 1,0,-1,0,1,-1,1,-1 };
int ddx[] = { -1,-2,1,-2,2,-1,2,1 }, ddy[] = { -2,-1,-2,1,-1,2,1,2 };
Pll lazy[524288];
ll tree[524288];
void g(Pll &p1,Pll p2){
if(p1.Y<=p2.X){
p1.X+=p2.X-p1.Y;
p1.Y=p2.Y;
}else{
p1.Y+=p2.Y-p2.X;
}
}
void propagation(int node,int S,int E){
tree[node]=max(tree[node]-lazy[node].X,0ll)+lazy[node].Y;
if(S!=E){
int L=node<<1,R=L|1;
g(lazy[L],lazy[node]);
g(lazy[R],lazy[node]);
}
lazy[node]=mp(0,0);
}
void upd(int node,int S,int E,int i,int j,ll k){
propagation(node,S,E);
if (i>E || j<S)return;
if(i<=S && E<=j){
if(k>0)lazy[node].Y+=k;
else lazy[node].X-=k;
propagation(node,S,E);
return;
}
upd(node<<1,S,(S+E)/2,i,j,k);
upd(node<<1|1,(S+E)/2+1,E,i,j,k);
}
ll find(int node,int S,int E,int i,int j){
propagation(node,S,E);
if (i>E || j<S)return 0;
if(i<=S && E<=j)return tree[node];
return find(node<<1,S,(S+E)/2,i,j)+find(node<<1|1,(S+E)/2+1,E,i,j);
}
int t[250000],a[250000],b[250000],c[250000],ans[250000];
ll d[250000],cnt[250000];
ll tree2[524288];
void upd(int node, int S, int E, int k, ll dif){
tree2[node] += dif;
if (S == E)return;
if (k <= (S + E) / 2)upd(node * 2, S, (S + E) / 2, k, dif);
else upd(node * 2 + 1, (S + E) / 2 + 1, E, k, dif);
}
ll find2(int node, int S, int E, int i, int j){
if (i > E || j < S)return 0;
if (i <= S && j >= E)return tree2[node];
return find2(node * 2, S, (S + E) / 2, i, j) + find2(node * 2 + 1, (S + E) / 2 + 1, E, i, j);
}
int findK(int node, int S, int E, ll k){
if (S == E)return c[S];
if (k <= tree2[node * 2])return findK(node * 2, S, (S + E) / 2, k);
return findK(node * 2 + 1, (S + E) / 2 + 1, E, k - tree2[node * 2]);
}
int main(){
int n,m,q;
scanf("%d%d%d",&n,&m,&q);
Viii E;
fup(i,0,q-1,1){
scanf("%d",t+i);
if(t[i]==1){
scanf("%d%d%d%lld",a+i,b+i,c+i,d+i);
upd(1,1,n,a[i],b[i],d[i]);
E.pb(iii(a[i],0,i));
E.pb(iii(b[i]+1,1,i));
}else if(t[i]==2){
scanf("%d%d%lld",a+i,b+i,d+i);
upd(1,1,n,a[i],b[i],-d[i]);
}else{
scanf("%d%lld",a+i,d+i);
cnt[i]=find(1,1,n,a[i],a[i]);
E.pb(iii(a[i],2,i));
}
}
sort(ALL(E));
for(auto [x,k,i]:E){
if(k==0){
upd(1,0,q-1,i,d[i]);
}else if(k==1){
upd(1,0,q-1,i,-d[i]);
}else{
if(d[i]>cnt[i])ans[i]=0;
else{
ll tot=find2(1,0,q-1,0,i);
ll K=tot-cnt[i]+d[i];
ans[i]=findK(1,0,q-1,K);
}
}
}
fup(i,0,q-1,1){
if(t[i]==3)printf("%d\n",ans[i]);
}
}
Compilation message
foodcourt.cpp: In function 'int main()':
foodcourt.cpp:10:30: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
10 | #define fup(i,a,b,c) for(int (i)=(a);(i)<=(b);(i)+=(c))
| ^
foodcourt.cpp:104:2: note: in expansion of macro 'fup'
104 | fup(i,0,q-1,1){
| ^~~
foodcourt.cpp:10:30: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
10 | #define fup(i,a,b,c) for(int (i)=(a);(i)<=(b);(i)+=(c))
| ^
foodcourt.cpp:135:2: note: in expansion of macro 'fup'
135 | fup(i,0,q-1,1){
| ^~~
foodcourt.cpp:102:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
102 | scanf("%d%d%d",&n,&m,&q);
| ~~~~~^~~~~~~~~~~~~~~~~~~
foodcourt.cpp:105:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
105 | scanf("%d",t+i);
| ~~~~~^~~~~~~~~~
foodcourt.cpp:107:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
107 | scanf("%d%d%d%lld",a+i,b+i,c+i,d+i);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:112:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
112 | scanf("%d%d%lld",a+i,b+i,d+i);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:115:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
115 | scanf("%d%lld",a+i,d+i);
| ~~~~~^~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
460 KB |
Output is correct |
2 |
Correct |
3 ms |
568 KB |
Output is correct |
3 |
Correct |
3 ms |
588 KB |
Output is correct |
4 |
Correct |
3 ms |
568 KB |
Output is correct |
5 |
Correct |
2 ms |
460 KB |
Output is correct |
6 |
Correct |
2 ms |
460 KB |
Output is correct |
7 |
Correct |
3 ms |
588 KB |
Output is correct |
8 |
Correct |
3 ms |
588 KB |
Output is correct |
9 |
Correct |
3 ms |
588 KB |
Output is correct |
10 |
Correct |
4 ms |
588 KB |
Output is correct |
11 |
Correct |
4 ms |
588 KB |
Output is correct |
12 |
Correct |
3 ms |
588 KB |
Output is correct |
13 |
Correct |
2 ms |
588 KB |
Output is correct |
14 |
Correct |
2 ms |
588 KB |
Output is correct |
15 |
Correct |
3 ms |
588 KB |
Output is correct |
16 |
Correct |
3 ms |
588 KB |
Output is correct |
17 |
Correct |
3 ms |
588 KB |
Output is correct |
18 |
Correct |
3 ms |
588 KB |
Output is correct |
19 |
Correct |
3 ms |
588 KB |
Output is correct |
20 |
Correct |
3 ms |
588 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
460 KB |
Output is correct |
2 |
Correct |
3 ms |
568 KB |
Output is correct |
3 |
Correct |
3 ms |
588 KB |
Output is correct |
4 |
Correct |
3 ms |
568 KB |
Output is correct |
5 |
Correct |
2 ms |
460 KB |
Output is correct |
6 |
Correct |
2 ms |
460 KB |
Output is correct |
7 |
Correct |
3 ms |
588 KB |
Output is correct |
8 |
Correct |
3 ms |
588 KB |
Output is correct |
9 |
Correct |
3 ms |
588 KB |
Output is correct |
10 |
Correct |
4 ms |
588 KB |
Output is correct |
11 |
Correct |
4 ms |
588 KB |
Output is correct |
12 |
Correct |
3 ms |
588 KB |
Output is correct |
13 |
Correct |
2 ms |
588 KB |
Output is correct |
14 |
Correct |
2 ms |
588 KB |
Output is correct |
15 |
Correct |
3 ms |
588 KB |
Output is correct |
16 |
Correct |
3 ms |
588 KB |
Output is correct |
17 |
Correct |
3 ms |
588 KB |
Output is correct |
18 |
Correct |
3 ms |
588 KB |
Output is correct |
19 |
Correct |
3 ms |
588 KB |
Output is correct |
20 |
Correct |
3 ms |
588 KB |
Output is correct |
21 |
Correct |
3 ms |
588 KB |
Output is correct |
22 |
Correct |
3 ms |
564 KB |
Output is correct |
23 |
Correct |
3 ms |
588 KB |
Output is correct |
24 |
Correct |
3 ms |
588 KB |
Output is correct |
25 |
Correct |
2 ms |
444 KB |
Output is correct |
26 |
Correct |
2 ms |
460 KB |
Output is correct |
27 |
Correct |
3 ms |
588 KB |
Output is correct |
28 |
Correct |
3 ms |
588 KB |
Output is correct |
29 |
Correct |
3 ms |
588 KB |
Output is correct |
30 |
Correct |
4 ms |
588 KB |
Output is correct |
31 |
Correct |
3 ms |
588 KB |
Output is correct |
32 |
Correct |
3 ms |
588 KB |
Output is correct |
33 |
Correct |
3 ms |
588 KB |
Output is correct |
34 |
Correct |
2 ms |
588 KB |
Output is correct |
35 |
Correct |
3 ms |
568 KB |
Output is correct |
36 |
Correct |
3 ms |
588 KB |
Output is correct |
37 |
Correct |
3 ms |
588 KB |
Output is correct |
38 |
Correct |
3 ms |
588 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
126 ms |
7608 KB |
Output is correct |
2 |
Correct |
105 ms |
9084 KB |
Output is correct |
3 |
Correct |
103 ms |
8740 KB |
Output is correct |
4 |
Correct |
92 ms |
8752 KB |
Output is correct |
5 |
Correct |
101 ms |
8980 KB |
Output is correct |
6 |
Correct |
105 ms |
9044 KB |
Output is correct |
7 |
Correct |
39 ms |
5052 KB |
Output is correct |
8 |
Correct |
42 ms |
5208 KB |
Output is correct |
9 |
Correct |
103 ms |
8464 KB |
Output is correct |
10 |
Correct |
99 ms |
8872 KB |
Output is correct |
11 |
Correct |
94 ms |
8636 KB |
Output is correct |
12 |
Correct |
132 ms |
8864 KB |
Output is correct |
13 |
Correct |
82 ms |
8608 KB |
Output is correct |
14 |
Correct |
96 ms |
9012 KB |
Output is correct |
15 |
Correct |
102 ms |
9396 KB |
Output is correct |
16 |
Correct |
107 ms |
9652 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
563 ms |
27844 KB |
Output is correct |
2 |
Correct |
425 ms |
25516 KB |
Output is correct |
3 |
Correct |
726 ms |
28732 KB |
Output is correct |
4 |
Correct |
498 ms |
25852 KB |
Output is correct |
5 |
Correct |
497 ms |
26084 KB |
Output is correct |
6 |
Correct |
758 ms |
29332 KB |
Output is correct |
7 |
Correct |
180 ms |
16428 KB |
Output is correct |
8 |
Correct |
183 ms |
16384 KB |
Output is correct |
9 |
Correct |
674 ms |
30236 KB |
Output is correct |
10 |
Correct |
641 ms |
30116 KB |
Output is correct |
11 |
Correct |
641 ms |
26168 KB |
Output is correct |
12 |
Correct |
617 ms |
28592 KB |
Output is correct |
13 |
Correct |
602 ms |
26404 KB |
Output is correct |
14 |
Correct |
599 ms |
28696 KB |
Output is correct |
15 |
Correct |
599 ms |
28588 KB |
Output is correct |
16 |
Correct |
600 ms |
28596 KB |
Output is correct |
17 |
Correct |
683 ms |
28672 KB |
Output is correct |
18 |
Correct |
605 ms |
27436 KB |
Output is correct |
19 |
Correct |
659 ms |
28616 KB |
Output is correct |
20 |
Correct |
703 ms |
27556 KB |
Output is correct |
21 |
Correct |
705 ms |
28576 KB |
Output is correct |
22 |
Correct |
679 ms |
28668 KB |
Output is correct |
23 |
Correct |
657 ms |
28600 KB |
Output is correct |
24 |
Correct |
698 ms |
28588 KB |
Output is correct |
25 |
Correct |
524 ms |
28516 KB |
Output is correct |
26 |
Correct |
550 ms |
28720 KB |
Output is correct |
27 |
Correct |
487 ms |
28564 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
460 KB |
Output is correct |
2 |
Correct |
3 ms |
568 KB |
Output is correct |
3 |
Correct |
3 ms |
588 KB |
Output is correct |
4 |
Correct |
3 ms |
568 KB |
Output is correct |
5 |
Correct |
2 ms |
460 KB |
Output is correct |
6 |
Correct |
2 ms |
460 KB |
Output is correct |
7 |
Correct |
3 ms |
588 KB |
Output is correct |
8 |
Correct |
3 ms |
588 KB |
Output is correct |
9 |
Correct |
3 ms |
588 KB |
Output is correct |
10 |
Correct |
4 ms |
588 KB |
Output is correct |
11 |
Correct |
4 ms |
588 KB |
Output is correct |
12 |
Correct |
3 ms |
588 KB |
Output is correct |
13 |
Correct |
2 ms |
588 KB |
Output is correct |
14 |
Correct |
2 ms |
588 KB |
Output is correct |
15 |
Correct |
3 ms |
588 KB |
Output is correct |
16 |
Correct |
3 ms |
588 KB |
Output is correct |
17 |
Correct |
3 ms |
588 KB |
Output is correct |
18 |
Correct |
3 ms |
588 KB |
Output is correct |
19 |
Correct |
3 ms |
588 KB |
Output is correct |
20 |
Correct |
3 ms |
588 KB |
Output is correct |
21 |
Correct |
126 ms |
7608 KB |
Output is correct |
22 |
Correct |
105 ms |
9084 KB |
Output is correct |
23 |
Correct |
103 ms |
8740 KB |
Output is correct |
24 |
Correct |
92 ms |
8752 KB |
Output is correct |
25 |
Correct |
101 ms |
8980 KB |
Output is correct |
26 |
Correct |
105 ms |
9044 KB |
Output is correct |
27 |
Correct |
39 ms |
5052 KB |
Output is correct |
28 |
Correct |
42 ms |
5208 KB |
Output is correct |
29 |
Correct |
103 ms |
8464 KB |
Output is correct |
30 |
Correct |
99 ms |
8872 KB |
Output is correct |
31 |
Correct |
94 ms |
8636 KB |
Output is correct |
32 |
Correct |
132 ms |
8864 KB |
Output is correct |
33 |
Correct |
82 ms |
8608 KB |
Output is correct |
34 |
Correct |
96 ms |
9012 KB |
Output is correct |
35 |
Correct |
102 ms |
9396 KB |
Output is correct |
36 |
Correct |
107 ms |
9652 KB |
Output is correct |
37 |
Correct |
121 ms |
8248 KB |
Output is correct |
38 |
Correct |
106 ms |
8104 KB |
Output is correct |
39 |
Correct |
35 ms |
4540 KB |
Output is correct |
40 |
Correct |
41 ms |
4960 KB |
Output is correct |
41 |
Correct |
126 ms |
8104 KB |
Output is correct |
42 |
Correct |
129 ms |
8752 KB |
Output is correct |
43 |
Correct |
117 ms |
8664 KB |
Output is correct |
44 |
Correct |
125 ms |
8488 KB |
Output is correct |
45 |
Correct |
129 ms |
8680 KB |
Output is correct |
46 |
Correct |
137 ms |
8768 KB |
Output is correct |
47 |
Correct |
64 ms |
8576 KB |
Output is correct |
48 |
Correct |
107 ms |
8632 KB |
Output is correct |
49 |
Correct |
89 ms |
7488 KB |
Output is correct |
50 |
Correct |
107 ms |
8052 KB |
Output is correct |
51 |
Correct |
136 ms |
8696 KB |
Output is correct |
52 |
Correct |
125 ms |
8776 KB |
Output is correct |
53 |
Correct |
85 ms |
8392 KB |
Output is correct |
54 |
Correct |
103 ms |
9644 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
120 ms |
7752 KB |
Output is correct |
2 |
Correct |
125 ms |
9636 KB |
Output is correct |
3 |
Correct |
127 ms |
9772 KB |
Output is correct |
4 |
Correct |
99 ms |
8148 KB |
Output is correct |
5 |
Correct |
110 ms |
8996 KB |
Output is correct |
6 |
Correct |
130 ms |
9780 KB |
Output is correct |
7 |
Correct |
50 ms |
5816 KB |
Output is correct |
8 |
Correct |
48 ms |
5560 KB |
Output is correct |
9 |
Correct |
85 ms |
9644 KB |
Output is correct |
10 |
Correct |
93 ms |
8164 KB |
Output is correct |
11 |
Correct |
118 ms |
9648 KB |
Output is correct |
12 |
Correct |
123 ms |
9740 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
460 KB |
Output is correct |
2 |
Correct |
3 ms |
568 KB |
Output is correct |
3 |
Correct |
3 ms |
588 KB |
Output is correct |
4 |
Correct |
3 ms |
568 KB |
Output is correct |
5 |
Correct |
2 ms |
460 KB |
Output is correct |
6 |
Correct |
2 ms |
460 KB |
Output is correct |
7 |
Correct |
3 ms |
588 KB |
Output is correct |
8 |
Correct |
3 ms |
588 KB |
Output is correct |
9 |
Correct |
3 ms |
588 KB |
Output is correct |
10 |
Correct |
4 ms |
588 KB |
Output is correct |
11 |
Correct |
4 ms |
588 KB |
Output is correct |
12 |
Correct |
3 ms |
588 KB |
Output is correct |
13 |
Correct |
2 ms |
588 KB |
Output is correct |
14 |
Correct |
2 ms |
588 KB |
Output is correct |
15 |
Correct |
3 ms |
588 KB |
Output is correct |
16 |
Correct |
3 ms |
588 KB |
Output is correct |
17 |
Correct |
3 ms |
588 KB |
Output is correct |
18 |
Correct |
3 ms |
588 KB |
Output is correct |
19 |
Correct |
3 ms |
588 KB |
Output is correct |
20 |
Correct |
3 ms |
588 KB |
Output is correct |
21 |
Correct |
3 ms |
588 KB |
Output is correct |
22 |
Correct |
3 ms |
564 KB |
Output is correct |
23 |
Correct |
3 ms |
588 KB |
Output is correct |
24 |
Correct |
3 ms |
588 KB |
Output is correct |
25 |
Correct |
2 ms |
444 KB |
Output is correct |
26 |
Correct |
2 ms |
460 KB |
Output is correct |
27 |
Correct |
3 ms |
588 KB |
Output is correct |
28 |
Correct |
3 ms |
588 KB |
Output is correct |
29 |
Correct |
3 ms |
588 KB |
Output is correct |
30 |
Correct |
4 ms |
588 KB |
Output is correct |
31 |
Correct |
3 ms |
588 KB |
Output is correct |
32 |
Correct |
3 ms |
588 KB |
Output is correct |
33 |
Correct |
3 ms |
588 KB |
Output is correct |
34 |
Correct |
2 ms |
588 KB |
Output is correct |
35 |
Correct |
3 ms |
568 KB |
Output is correct |
36 |
Correct |
3 ms |
588 KB |
Output is correct |
37 |
Correct |
3 ms |
588 KB |
Output is correct |
38 |
Correct |
3 ms |
588 KB |
Output is correct |
39 |
Correct |
126 ms |
7608 KB |
Output is correct |
40 |
Correct |
105 ms |
9084 KB |
Output is correct |
41 |
Correct |
103 ms |
8740 KB |
Output is correct |
42 |
Correct |
92 ms |
8752 KB |
Output is correct |
43 |
Correct |
101 ms |
8980 KB |
Output is correct |
44 |
Correct |
105 ms |
9044 KB |
Output is correct |
45 |
Correct |
39 ms |
5052 KB |
Output is correct |
46 |
Correct |
42 ms |
5208 KB |
Output is correct |
47 |
Correct |
103 ms |
8464 KB |
Output is correct |
48 |
Correct |
99 ms |
8872 KB |
Output is correct |
49 |
Correct |
94 ms |
8636 KB |
Output is correct |
50 |
Correct |
132 ms |
8864 KB |
Output is correct |
51 |
Correct |
82 ms |
8608 KB |
Output is correct |
52 |
Correct |
96 ms |
9012 KB |
Output is correct |
53 |
Correct |
102 ms |
9396 KB |
Output is correct |
54 |
Correct |
107 ms |
9652 KB |
Output is correct |
55 |
Correct |
121 ms |
8248 KB |
Output is correct |
56 |
Correct |
106 ms |
8104 KB |
Output is correct |
57 |
Correct |
35 ms |
4540 KB |
Output is correct |
58 |
Correct |
41 ms |
4960 KB |
Output is correct |
59 |
Correct |
126 ms |
8104 KB |
Output is correct |
60 |
Correct |
129 ms |
8752 KB |
Output is correct |
61 |
Correct |
117 ms |
8664 KB |
Output is correct |
62 |
Correct |
125 ms |
8488 KB |
Output is correct |
63 |
Correct |
129 ms |
8680 KB |
Output is correct |
64 |
Correct |
137 ms |
8768 KB |
Output is correct |
65 |
Correct |
64 ms |
8576 KB |
Output is correct |
66 |
Correct |
107 ms |
8632 KB |
Output is correct |
67 |
Correct |
89 ms |
7488 KB |
Output is correct |
68 |
Correct |
107 ms |
8052 KB |
Output is correct |
69 |
Correct |
136 ms |
8696 KB |
Output is correct |
70 |
Correct |
125 ms |
8776 KB |
Output is correct |
71 |
Correct |
85 ms |
8392 KB |
Output is correct |
72 |
Correct |
103 ms |
9644 KB |
Output is correct |
73 |
Correct |
120 ms |
7752 KB |
Output is correct |
74 |
Correct |
125 ms |
9636 KB |
Output is correct |
75 |
Correct |
127 ms |
9772 KB |
Output is correct |
76 |
Correct |
99 ms |
8148 KB |
Output is correct |
77 |
Correct |
110 ms |
8996 KB |
Output is correct |
78 |
Correct |
130 ms |
9780 KB |
Output is correct |
79 |
Correct |
50 ms |
5816 KB |
Output is correct |
80 |
Correct |
48 ms |
5560 KB |
Output is correct |
81 |
Correct |
85 ms |
9644 KB |
Output is correct |
82 |
Correct |
93 ms |
8164 KB |
Output is correct |
83 |
Correct |
118 ms |
9648 KB |
Output is correct |
84 |
Correct |
123 ms |
9740 KB |
Output is correct |
85 |
Correct |
105 ms |
8764 KB |
Output is correct |
86 |
Correct |
120 ms |
9184 KB |
Output is correct |
87 |
Correct |
112 ms |
8884 KB |
Output is correct |
88 |
Correct |
133 ms |
9720 KB |
Output is correct |
89 |
Correct |
78 ms |
7164 KB |
Output is correct |
90 |
Correct |
117 ms |
9292 KB |
Output is correct |
91 |
Correct |
96 ms |
8380 KB |
Output is correct |
92 |
Correct |
91 ms |
8156 KB |
Output is correct |
93 |
Correct |
125 ms |
9292 KB |
Output is correct |
94 |
Correct |
122 ms |
9020 KB |
Output is correct |
95 |
Correct |
114 ms |
9132 KB |
Output is correct |
96 |
Correct |
124 ms |
9280 KB |
Output is correct |
97 |
Correct |
118 ms |
9168 KB |
Output is correct |
98 |
Correct |
102 ms |
8644 KB |
Output is correct |
99 |
Correct |
68 ms |
9028 KB |
Output is correct |
100 |
Correct |
92 ms |
8500 KB |
Output is correct |
101 |
Correct |
113 ms |
9176 KB |
Output is correct |
102 |
Correct |
94 ms |
9180 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
460 KB |
Output is correct |
2 |
Correct |
3 ms |
568 KB |
Output is correct |
3 |
Correct |
3 ms |
588 KB |
Output is correct |
4 |
Correct |
3 ms |
568 KB |
Output is correct |
5 |
Correct |
2 ms |
460 KB |
Output is correct |
6 |
Correct |
2 ms |
460 KB |
Output is correct |
7 |
Correct |
3 ms |
588 KB |
Output is correct |
8 |
Correct |
3 ms |
588 KB |
Output is correct |
9 |
Correct |
3 ms |
588 KB |
Output is correct |
10 |
Correct |
4 ms |
588 KB |
Output is correct |
11 |
Correct |
4 ms |
588 KB |
Output is correct |
12 |
Correct |
3 ms |
588 KB |
Output is correct |
13 |
Correct |
2 ms |
588 KB |
Output is correct |
14 |
Correct |
2 ms |
588 KB |
Output is correct |
15 |
Correct |
3 ms |
588 KB |
Output is correct |
16 |
Correct |
3 ms |
588 KB |
Output is correct |
17 |
Correct |
3 ms |
588 KB |
Output is correct |
18 |
Correct |
3 ms |
588 KB |
Output is correct |
19 |
Correct |
3 ms |
588 KB |
Output is correct |
20 |
Correct |
3 ms |
588 KB |
Output is correct |
21 |
Correct |
3 ms |
588 KB |
Output is correct |
22 |
Correct |
3 ms |
564 KB |
Output is correct |
23 |
Correct |
3 ms |
588 KB |
Output is correct |
24 |
Correct |
3 ms |
588 KB |
Output is correct |
25 |
Correct |
2 ms |
444 KB |
Output is correct |
26 |
Correct |
2 ms |
460 KB |
Output is correct |
27 |
Correct |
3 ms |
588 KB |
Output is correct |
28 |
Correct |
3 ms |
588 KB |
Output is correct |
29 |
Correct |
3 ms |
588 KB |
Output is correct |
30 |
Correct |
4 ms |
588 KB |
Output is correct |
31 |
Correct |
3 ms |
588 KB |
Output is correct |
32 |
Correct |
3 ms |
588 KB |
Output is correct |
33 |
Correct |
3 ms |
588 KB |
Output is correct |
34 |
Correct |
2 ms |
588 KB |
Output is correct |
35 |
Correct |
3 ms |
568 KB |
Output is correct |
36 |
Correct |
3 ms |
588 KB |
Output is correct |
37 |
Correct |
3 ms |
588 KB |
Output is correct |
38 |
Correct |
3 ms |
588 KB |
Output is correct |
39 |
Correct |
126 ms |
7608 KB |
Output is correct |
40 |
Correct |
105 ms |
9084 KB |
Output is correct |
41 |
Correct |
103 ms |
8740 KB |
Output is correct |
42 |
Correct |
92 ms |
8752 KB |
Output is correct |
43 |
Correct |
101 ms |
8980 KB |
Output is correct |
44 |
Correct |
105 ms |
9044 KB |
Output is correct |
45 |
Correct |
39 ms |
5052 KB |
Output is correct |
46 |
Correct |
42 ms |
5208 KB |
Output is correct |
47 |
Correct |
103 ms |
8464 KB |
Output is correct |
48 |
Correct |
99 ms |
8872 KB |
Output is correct |
49 |
Correct |
94 ms |
8636 KB |
Output is correct |
50 |
Correct |
132 ms |
8864 KB |
Output is correct |
51 |
Correct |
82 ms |
8608 KB |
Output is correct |
52 |
Correct |
96 ms |
9012 KB |
Output is correct |
53 |
Correct |
102 ms |
9396 KB |
Output is correct |
54 |
Correct |
107 ms |
9652 KB |
Output is correct |
55 |
Correct |
563 ms |
27844 KB |
Output is correct |
56 |
Correct |
425 ms |
25516 KB |
Output is correct |
57 |
Correct |
726 ms |
28732 KB |
Output is correct |
58 |
Correct |
498 ms |
25852 KB |
Output is correct |
59 |
Correct |
497 ms |
26084 KB |
Output is correct |
60 |
Correct |
758 ms |
29332 KB |
Output is correct |
61 |
Correct |
180 ms |
16428 KB |
Output is correct |
62 |
Correct |
183 ms |
16384 KB |
Output is correct |
63 |
Correct |
674 ms |
30236 KB |
Output is correct |
64 |
Correct |
641 ms |
30116 KB |
Output is correct |
65 |
Correct |
641 ms |
26168 KB |
Output is correct |
66 |
Correct |
617 ms |
28592 KB |
Output is correct |
67 |
Correct |
602 ms |
26404 KB |
Output is correct |
68 |
Correct |
599 ms |
28696 KB |
Output is correct |
69 |
Correct |
599 ms |
28588 KB |
Output is correct |
70 |
Correct |
600 ms |
28596 KB |
Output is correct |
71 |
Correct |
683 ms |
28672 KB |
Output is correct |
72 |
Correct |
605 ms |
27436 KB |
Output is correct |
73 |
Correct |
659 ms |
28616 KB |
Output is correct |
74 |
Correct |
703 ms |
27556 KB |
Output is correct |
75 |
Correct |
705 ms |
28576 KB |
Output is correct |
76 |
Correct |
679 ms |
28668 KB |
Output is correct |
77 |
Correct |
657 ms |
28600 KB |
Output is correct |
78 |
Correct |
698 ms |
28588 KB |
Output is correct |
79 |
Correct |
524 ms |
28516 KB |
Output is correct |
80 |
Correct |
550 ms |
28720 KB |
Output is correct |
81 |
Correct |
487 ms |
28564 KB |
Output is correct |
82 |
Correct |
121 ms |
8248 KB |
Output is correct |
83 |
Correct |
106 ms |
8104 KB |
Output is correct |
84 |
Correct |
35 ms |
4540 KB |
Output is correct |
85 |
Correct |
41 ms |
4960 KB |
Output is correct |
86 |
Correct |
126 ms |
8104 KB |
Output is correct |
87 |
Correct |
129 ms |
8752 KB |
Output is correct |
88 |
Correct |
117 ms |
8664 KB |
Output is correct |
89 |
Correct |
125 ms |
8488 KB |
Output is correct |
90 |
Correct |
129 ms |
8680 KB |
Output is correct |
91 |
Correct |
137 ms |
8768 KB |
Output is correct |
92 |
Correct |
64 ms |
8576 KB |
Output is correct |
93 |
Correct |
107 ms |
8632 KB |
Output is correct |
94 |
Correct |
89 ms |
7488 KB |
Output is correct |
95 |
Correct |
107 ms |
8052 KB |
Output is correct |
96 |
Correct |
136 ms |
8696 KB |
Output is correct |
97 |
Correct |
125 ms |
8776 KB |
Output is correct |
98 |
Correct |
85 ms |
8392 KB |
Output is correct |
99 |
Correct |
103 ms |
9644 KB |
Output is correct |
100 |
Correct |
120 ms |
7752 KB |
Output is correct |
101 |
Correct |
125 ms |
9636 KB |
Output is correct |
102 |
Correct |
127 ms |
9772 KB |
Output is correct |
103 |
Correct |
99 ms |
8148 KB |
Output is correct |
104 |
Correct |
110 ms |
8996 KB |
Output is correct |
105 |
Correct |
130 ms |
9780 KB |
Output is correct |
106 |
Correct |
50 ms |
5816 KB |
Output is correct |
107 |
Correct |
48 ms |
5560 KB |
Output is correct |
108 |
Correct |
85 ms |
9644 KB |
Output is correct |
109 |
Correct |
93 ms |
8164 KB |
Output is correct |
110 |
Correct |
118 ms |
9648 KB |
Output is correct |
111 |
Correct |
123 ms |
9740 KB |
Output is correct |
112 |
Correct |
105 ms |
8764 KB |
Output is correct |
113 |
Correct |
120 ms |
9184 KB |
Output is correct |
114 |
Correct |
112 ms |
8884 KB |
Output is correct |
115 |
Correct |
133 ms |
9720 KB |
Output is correct |
116 |
Correct |
78 ms |
7164 KB |
Output is correct |
117 |
Correct |
117 ms |
9292 KB |
Output is correct |
118 |
Correct |
96 ms |
8380 KB |
Output is correct |
119 |
Correct |
91 ms |
8156 KB |
Output is correct |
120 |
Correct |
125 ms |
9292 KB |
Output is correct |
121 |
Correct |
122 ms |
9020 KB |
Output is correct |
122 |
Correct |
114 ms |
9132 KB |
Output is correct |
123 |
Correct |
124 ms |
9280 KB |
Output is correct |
124 |
Correct |
118 ms |
9168 KB |
Output is correct |
125 |
Correct |
102 ms |
8644 KB |
Output is correct |
126 |
Correct |
68 ms |
9028 KB |
Output is correct |
127 |
Correct |
92 ms |
8500 KB |
Output is correct |
128 |
Correct |
113 ms |
9176 KB |
Output is correct |
129 |
Correct |
94 ms |
9180 KB |
Output is correct |
130 |
Correct |
610 ms |
35216 KB |
Output is correct |
131 |
Correct |
426 ms |
30216 KB |
Output is correct |
132 |
Correct |
634 ms |
35120 KB |
Output is correct |
133 |
Correct |
623 ms |
35488 KB |
Output is correct |
134 |
Correct |
585 ms |
33580 KB |
Output is correct |
135 |
Correct |
620 ms |
36376 KB |
Output is correct |
136 |
Correct |
633 ms |
37188 KB |
Output is correct |
137 |
Correct |
619 ms |
37196 KB |
Output is correct |
138 |
Correct |
580 ms |
32924 KB |
Output is correct |
139 |
Correct |
584 ms |
35344 KB |
Output is correct |
140 |
Correct |
585 ms |
33580 KB |
Output is correct |
141 |
Correct |
621 ms |
35368 KB |
Output is correct |
142 |
Correct |
616 ms |
35472 KB |
Output is correct |
143 |
Correct |
593 ms |
35240 KB |
Output is correct |
144 |
Correct |
701 ms |
34048 KB |
Output is correct |
145 |
Correct |
669 ms |
35376 KB |
Output is correct |
146 |
Correct |
661 ms |
34616 KB |
Output is correct |
147 |
Correct |
658 ms |
35340 KB |
Output is correct |
148 |
Correct |
613 ms |
35288 KB |
Output is correct |
149 |
Correct |
597 ms |
35312 KB |
Output is correct |
150 |
Correct |
285 ms |
34496 KB |
Output is correct |
151 |
Correct |
489 ms |
34964 KB |
Output is correct |
152 |
Correct |
487 ms |
35032 KB |
Output is correct |
153 |
Correct |
465 ms |
35364 KB |
Output is correct |