#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#define pb push_back
#define F first
#define S second
#define all(a) a.begin(),a.end()
#define pii pair <int,int>
#define PII pair<pii , pii>
#define ld long double
#define int long long
#define sz(v) (int)v.size()
#define rep(i , a , b) for(int i=a;i <= b;i++)
#define per(i , a , b) for(int i=a;i >= b;i--)
using namespace std ;
const int maxn = 3e5 + 10 , N = 1e5 +1 , lg = 20 , maxq = 202 , inf = 1e9 , maxk = 2022 , mod =998244353;
int n , q , m , ds[maxn] , ans[maxn ] , ty[maxn];
struct n1{
int mn , lz ,id = 0;
n1(){
mn =0 , lz =0 ;
}
};
n1 s1[4*maxn] ;
n1 operator+(n1 a , n1 b){
n1 r ;
r.mn = min(a.mn , b.mn);
r.lz =0 ;
if(a.mn == r.mn)r.id = a.id ;
if(b.mn == r.mn)r.id = b.id;
return r ;
}
void sh1(int p){
int pl = p<<1,pr=p<<1|1;
s1[pl].lz += s1[p].lz ;
s1[pr].lz += s1[p].lz ;
s1[pl].mn += s1[p].lz ;
s1[pr].mn += s1[p].lz ;
s1[p].lz =0 ;
}
void bui(int p = 1 , int l = 0 , int r = q){
int pl = p<<1 ,pr=p<<1|1 ,mid=(l+r)/2 ;
if(l == r){
s1[p].id = l ;
s1[p].mn = 0;
return ;
}
bui(pl,l,mid);bui(pr,mid+1,r);
s1[p] = s1[pl] + s1[pr];
}
void upd(int le, int ri ,int x , int p =1 , int l = 0 , int r =q){
int pl = p<<1 ,pr=p<<1|1 ,mid=(l+r)/2 ;
if(le > r|| l > ri)return ;
if(l!=r)sh1(p);
if(le <= l && r <= ri){
s1[p].lz += x;
s1[p].mn += x;
return ;
}
upd(le,ri,x,pl,l,mid);
upd(le,ri,x,pr,mid+1,r);
s1[p]= s1[pl] + s1[pr];
}
n1 que(int le, int ri , int p= 1 ,int l =0 , int r = q){
int mid = (l+r)/2 , pl=p<<1,pr=p<<1|1;
if(le <= l && r <= ri)return s1[p];
sh1(p);
if(mid >= ri)return que(le,ri,pl,l,mid);
if(mid < le)return que(le,ri,pr,mid+1,r);
return que(le,ri,pl,l,mid) + que(le,ri,pr,mid+1,r) ;
}
struct n2{
int a , b ;
n2(){
a = b =0 ;
}
};
n2 s2[4*maxn] ;
n2 operator+(n2 a, n2 b){
n2 r ;
r.a = a.a + b.a ;
r.b = a.b + b.b;
return r;
}
void upd2(int x , int w, int p = 1, int l = 0 , int r = q){
int mid = (l+r)/2 ,pl=p<<1,pr=p<<1|1;
if(l == r){
if(ty[l] == 1){
s2[p].a += w;
}else{
s2[p].b +=w ;
}
return ;
}
if(mid < x)upd2(x,w,pr,mid+1,r);
else upd2(x,w,pl,l,mid);
s2[p] = s2[pl] + s2[pr] ;
}
n2 que2(int le ,int ri , int p= 1 ,int l =0 , int r = q){
int mid = (l+r)/2 ,pl=p<<1,pr=p<<1|1;
if(le <= l && r <= ri)return s2[p];
if(ri <= mid)return que2(le,ri,pl,l,mid);
if(le > mid)return que2(le,ri,pr,mid+1,r);
return que2(le,ri,pl,l,mid) + que2(le,ri,pr,mid+1,r);
}
int w =0 , as =0;
void find(int x ,int p = 1 ,int l =0 , int r = q){
if(r < x)return ;
int pl =p <<1, pr=p<<1|1, mid=(l+r)/2 ;
if(l < x){
find(x,pl,l,mid);
if(as == -1)find(x,pr,mid+1,r) ;
return ;
}
if(l >= x){
if(w >= s2[p].a){
w-=s2[p].a;
return ;
}
if(l == r){
as = l;
return ;
}
find(x,pl,l,mid);
if(as!=-1)return ;
find(x,pr,mid+1,r);
}
}
vector <pii> q1[maxn] ;
vector <pii> v1[maxn] , v2[maxn] ;
signed main(){
ios_base::sync_with_stdio(false); cin.tie(0);
cin >> n >> m >> q ;
rep(i , 1 , q){
int t ;
cin >> t ;
ty[i] = t ;
if(t == 3){
int a, b ;
cin >> a >> b;
q1[a].pb({i , b}) ;
}
if(t==2){
int l ,r , k ;
cin >> l >> r >> k ;
v2[l].pb({i , k});
v1[r+1].pb({i , k}) ;
}
if(t==1){
int l ,r , k , c;
cin >> l >> r >> c >> k ;
ds[i] = c;
v1[l].pb({i , k});
v2[r+1].pb({i , k}) ;
}
ans[i] = -1 ;
}
bui() ;
rep(t ,1 ,n){
for(auto [i , k] : v2[t]){
upd(i, q , -k) ;upd2(i , -k);
}
for(auto [i , k] : v1[t]){
upd(i , q , k) ;upd2(i , k);
}
for(auto [i , k] : q1[t]){
upd(i , i , -(k-1));upd2(i , -(k-1)) ;
int l = que(0 , i).id ;
if(l == i){
ans[i] =0 ;
}else{
w = -que2(l+1 , i).b;as =-1 ;
find(l+1);
ans[i] = ds[as] ;
}
upd(i , i , +(k-1)) ;upd2(i , k-1);
}
}
rep(i ,1 ,q){
if(ans[i] == -1)continue ;
cout << ans[i] << "\n" ;
}
cout << "\n";
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
34 ms |
68692 KB |
Output is correct |
2 |
Correct |
34 ms |
68700 KB |
Output is correct |
3 |
Correct |
33 ms |
68696 KB |
Output is correct |
4 |
Correct |
34 ms |
68644 KB |
Output is correct |
5 |
Correct |
35 ms |
68540 KB |
Output is correct |
6 |
Correct |
33 ms |
68560 KB |
Output is correct |
7 |
Correct |
34 ms |
68492 KB |
Output is correct |
8 |
Correct |
33 ms |
68688 KB |
Output is correct |
9 |
Correct |
34 ms |
68636 KB |
Output is correct |
10 |
Correct |
33 ms |
68728 KB |
Output is correct |
11 |
Correct |
33 ms |
68700 KB |
Output is correct |
12 |
Correct |
33 ms |
68700 KB |
Output is correct |
13 |
Correct |
33 ms |
68716 KB |
Output is correct |
14 |
Correct |
33 ms |
68692 KB |
Output is correct |
15 |
Correct |
32 ms |
68444 KB |
Output is correct |
16 |
Correct |
33 ms |
68500 KB |
Output is correct |
17 |
Correct |
34 ms |
68692 KB |
Output is correct |
18 |
Correct |
34 ms |
68692 KB |
Output is correct |
19 |
Correct |
32 ms |
68704 KB |
Output is correct |
20 |
Correct |
33 ms |
68696 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
34 ms |
68692 KB |
Output is correct |
2 |
Correct |
34 ms |
68700 KB |
Output is correct |
3 |
Correct |
33 ms |
68696 KB |
Output is correct |
4 |
Correct |
34 ms |
68644 KB |
Output is correct |
5 |
Correct |
35 ms |
68540 KB |
Output is correct |
6 |
Correct |
33 ms |
68560 KB |
Output is correct |
7 |
Correct |
34 ms |
68492 KB |
Output is correct |
8 |
Correct |
33 ms |
68688 KB |
Output is correct |
9 |
Correct |
34 ms |
68636 KB |
Output is correct |
10 |
Correct |
33 ms |
68728 KB |
Output is correct |
11 |
Correct |
33 ms |
68700 KB |
Output is correct |
12 |
Correct |
33 ms |
68700 KB |
Output is correct |
13 |
Correct |
33 ms |
68716 KB |
Output is correct |
14 |
Correct |
33 ms |
68692 KB |
Output is correct |
15 |
Correct |
32 ms |
68444 KB |
Output is correct |
16 |
Correct |
33 ms |
68500 KB |
Output is correct |
17 |
Correct |
34 ms |
68692 KB |
Output is correct |
18 |
Correct |
34 ms |
68692 KB |
Output is correct |
19 |
Correct |
32 ms |
68704 KB |
Output is correct |
20 |
Correct |
33 ms |
68696 KB |
Output is correct |
21 |
Correct |
33 ms |
68688 KB |
Output is correct |
22 |
Correct |
33 ms |
68692 KB |
Output is correct |
23 |
Correct |
33 ms |
68688 KB |
Output is correct |
24 |
Correct |
34 ms |
68700 KB |
Output is correct |
25 |
Correct |
35 ms |
68800 KB |
Output is correct |
26 |
Correct |
33 ms |
68688 KB |
Output is correct |
27 |
Correct |
33 ms |
68688 KB |
Output is correct |
28 |
Correct |
33 ms |
68692 KB |
Output is correct |
29 |
Correct |
33 ms |
68992 KB |
Output is correct |
30 |
Correct |
34 ms |
68696 KB |
Output is correct |
31 |
Correct |
33 ms |
68700 KB |
Output is correct |
32 |
Correct |
37 ms |
68692 KB |
Output is correct |
33 |
Correct |
33 ms |
68768 KB |
Output is correct |
34 |
Correct |
34 ms |
68692 KB |
Output is correct |
35 |
Correct |
34 ms |
68692 KB |
Output is correct |
36 |
Correct |
41 ms |
68692 KB |
Output is correct |
37 |
Correct |
32 ms |
68700 KB |
Output is correct |
38 |
Correct |
39 ms |
68700 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
112 ms |
74328 KB |
Output is correct |
2 |
Correct |
111 ms |
74516 KB |
Output is correct |
3 |
Correct |
119 ms |
74284 KB |
Output is correct |
4 |
Correct |
115 ms |
74268 KB |
Output is correct |
5 |
Correct |
114 ms |
74324 KB |
Output is correct |
6 |
Correct |
111 ms |
74328 KB |
Output is correct |
7 |
Correct |
71 ms |
72452 KB |
Output is correct |
8 |
Correct |
93 ms |
72764 KB |
Output is correct |
9 |
Correct |
111 ms |
74236 KB |
Output is correct |
10 |
Correct |
112 ms |
74324 KB |
Output is correct |
11 |
Correct |
113 ms |
74376 KB |
Output is correct |
12 |
Correct |
134 ms |
74836 KB |
Output is correct |
13 |
Correct |
100 ms |
73564 KB |
Output is correct |
14 |
Correct |
109 ms |
74064 KB |
Output is correct |
15 |
Correct |
106 ms |
74320 KB |
Output is correct |
16 |
Correct |
108 ms |
74620 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
536 ms |
89940 KB |
Output is correct |
2 |
Correct |
469 ms |
85704 KB |
Output is correct |
3 |
Correct |
619 ms |
92004 KB |
Output is correct |
4 |
Correct |
414 ms |
86100 KB |
Output is correct |
5 |
Correct |
411 ms |
86308 KB |
Output is correct |
6 |
Correct |
590 ms |
92640 KB |
Output is correct |
7 |
Correct |
237 ms |
85280 KB |
Output is correct |
8 |
Correct |
254 ms |
85356 KB |
Output is correct |
9 |
Correct |
576 ms |
90960 KB |
Output is correct |
10 |
Correct |
581 ms |
91056 KB |
Output is correct |
11 |
Correct |
562 ms |
91860 KB |
Output is correct |
12 |
Correct |
561 ms |
92560 KB |
Output is correct |
13 |
Correct |
577 ms |
91528 KB |
Output is correct |
14 |
Correct |
598 ms |
92536 KB |
Output is correct |
15 |
Correct |
583 ms |
92464 KB |
Output is correct |
16 |
Correct |
570 ms |
92484 KB |
Output is correct |
17 |
Correct |
596 ms |
92408 KB |
Output is correct |
18 |
Correct |
587 ms |
91988 KB |
Output is correct |
19 |
Correct |
572 ms |
92756 KB |
Output is correct |
20 |
Correct |
554 ms |
92064 KB |
Output is correct |
21 |
Correct |
582 ms |
92376 KB |
Output is correct |
22 |
Correct |
584 ms |
92472 KB |
Output is correct |
23 |
Correct |
621 ms |
92488 KB |
Output is correct |
24 |
Correct |
623 ms |
92496 KB |
Output is correct |
25 |
Correct |
501 ms |
90980 KB |
Output is correct |
26 |
Correct |
507 ms |
91504 KB |
Output is correct |
27 |
Correct |
413 ms |
93180 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
34 ms |
68692 KB |
Output is correct |
2 |
Correct |
34 ms |
68700 KB |
Output is correct |
3 |
Correct |
33 ms |
68696 KB |
Output is correct |
4 |
Correct |
34 ms |
68644 KB |
Output is correct |
5 |
Correct |
35 ms |
68540 KB |
Output is correct |
6 |
Correct |
33 ms |
68560 KB |
Output is correct |
7 |
Correct |
34 ms |
68492 KB |
Output is correct |
8 |
Correct |
33 ms |
68688 KB |
Output is correct |
9 |
Correct |
34 ms |
68636 KB |
Output is correct |
10 |
Correct |
33 ms |
68728 KB |
Output is correct |
11 |
Correct |
33 ms |
68700 KB |
Output is correct |
12 |
Correct |
33 ms |
68700 KB |
Output is correct |
13 |
Correct |
33 ms |
68716 KB |
Output is correct |
14 |
Correct |
33 ms |
68692 KB |
Output is correct |
15 |
Correct |
32 ms |
68444 KB |
Output is correct |
16 |
Correct |
33 ms |
68500 KB |
Output is correct |
17 |
Correct |
34 ms |
68692 KB |
Output is correct |
18 |
Correct |
34 ms |
68692 KB |
Output is correct |
19 |
Correct |
32 ms |
68704 KB |
Output is correct |
20 |
Correct |
33 ms |
68696 KB |
Output is correct |
21 |
Correct |
112 ms |
74328 KB |
Output is correct |
22 |
Correct |
111 ms |
74516 KB |
Output is correct |
23 |
Correct |
119 ms |
74284 KB |
Output is correct |
24 |
Correct |
115 ms |
74268 KB |
Output is correct |
25 |
Correct |
114 ms |
74324 KB |
Output is correct |
26 |
Correct |
111 ms |
74328 KB |
Output is correct |
27 |
Correct |
71 ms |
72452 KB |
Output is correct |
28 |
Correct |
93 ms |
72764 KB |
Output is correct |
29 |
Correct |
111 ms |
74236 KB |
Output is correct |
30 |
Correct |
112 ms |
74324 KB |
Output is correct |
31 |
Correct |
113 ms |
74376 KB |
Output is correct |
32 |
Correct |
134 ms |
74836 KB |
Output is correct |
33 |
Correct |
100 ms |
73564 KB |
Output is correct |
34 |
Correct |
109 ms |
74064 KB |
Output is correct |
35 |
Correct |
106 ms |
74320 KB |
Output is correct |
36 |
Correct |
108 ms |
74620 KB |
Output is correct |
37 |
Correct |
115 ms |
73564 KB |
Output is correct |
38 |
Correct |
103 ms |
73180 KB |
Output is correct |
39 |
Correct |
67 ms |
72208 KB |
Output is correct |
40 |
Correct |
76 ms |
72764 KB |
Output is correct |
41 |
Correct |
118 ms |
74060 KB |
Output is correct |
42 |
Correct |
129 ms |
74460 KB |
Output is correct |
43 |
Correct |
124 ms |
74328 KB |
Output is correct |
44 |
Correct |
119 ms |
74068 KB |
Output is correct |
45 |
Correct |
119 ms |
74340 KB |
Output is correct |
46 |
Correct |
126 ms |
74288 KB |
Output is correct |
47 |
Correct |
90 ms |
72996 KB |
Output is correct |
48 |
Correct |
122 ms |
74008 KB |
Output is correct |
49 |
Correct |
96 ms |
72648 KB |
Output is correct |
50 |
Correct |
106 ms |
73556 KB |
Output is correct |
51 |
Correct |
141 ms |
74376 KB |
Output is correct |
52 |
Correct |
146 ms |
74196 KB |
Output is correct |
53 |
Correct |
108 ms |
73328 KB |
Output is correct |
54 |
Correct |
110 ms |
74644 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
120 ms |
73824 KB |
Output is correct |
2 |
Correct |
135 ms |
74332 KB |
Output is correct |
3 |
Correct |
155 ms |
74448 KB |
Output is correct |
4 |
Correct |
98 ms |
72784 KB |
Output is correct |
5 |
Correct |
123 ms |
73552 KB |
Output is correct |
6 |
Correct |
128 ms |
74524 KB |
Output is correct |
7 |
Correct |
86 ms |
72636 KB |
Output is correct |
8 |
Correct |
84 ms |
72384 KB |
Output is correct |
9 |
Correct |
130 ms |
73536 KB |
Output is correct |
10 |
Correct |
98 ms |
72568 KB |
Output is correct |
11 |
Correct |
133 ms |
74032 KB |
Output is correct |
12 |
Correct |
123 ms |
74080 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
34 ms |
68692 KB |
Output is correct |
2 |
Correct |
34 ms |
68700 KB |
Output is correct |
3 |
Correct |
33 ms |
68696 KB |
Output is correct |
4 |
Correct |
34 ms |
68644 KB |
Output is correct |
5 |
Correct |
35 ms |
68540 KB |
Output is correct |
6 |
Correct |
33 ms |
68560 KB |
Output is correct |
7 |
Correct |
34 ms |
68492 KB |
Output is correct |
8 |
Correct |
33 ms |
68688 KB |
Output is correct |
9 |
Correct |
34 ms |
68636 KB |
Output is correct |
10 |
Correct |
33 ms |
68728 KB |
Output is correct |
11 |
Correct |
33 ms |
68700 KB |
Output is correct |
12 |
Correct |
33 ms |
68700 KB |
Output is correct |
13 |
Correct |
33 ms |
68716 KB |
Output is correct |
14 |
Correct |
33 ms |
68692 KB |
Output is correct |
15 |
Correct |
32 ms |
68444 KB |
Output is correct |
16 |
Correct |
33 ms |
68500 KB |
Output is correct |
17 |
Correct |
34 ms |
68692 KB |
Output is correct |
18 |
Correct |
34 ms |
68692 KB |
Output is correct |
19 |
Correct |
32 ms |
68704 KB |
Output is correct |
20 |
Correct |
33 ms |
68696 KB |
Output is correct |
21 |
Correct |
33 ms |
68688 KB |
Output is correct |
22 |
Correct |
33 ms |
68692 KB |
Output is correct |
23 |
Correct |
33 ms |
68688 KB |
Output is correct |
24 |
Correct |
34 ms |
68700 KB |
Output is correct |
25 |
Correct |
35 ms |
68800 KB |
Output is correct |
26 |
Correct |
33 ms |
68688 KB |
Output is correct |
27 |
Correct |
33 ms |
68688 KB |
Output is correct |
28 |
Correct |
33 ms |
68692 KB |
Output is correct |
29 |
Correct |
33 ms |
68992 KB |
Output is correct |
30 |
Correct |
34 ms |
68696 KB |
Output is correct |
31 |
Correct |
33 ms |
68700 KB |
Output is correct |
32 |
Correct |
37 ms |
68692 KB |
Output is correct |
33 |
Correct |
33 ms |
68768 KB |
Output is correct |
34 |
Correct |
34 ms |
68692 KB |
Output is correct |
35 |
Correct |
34 ms |
68692 KB |
Output is correct |
36 |
Correct |
41 ms |
68692 KB |
Output is correct |
37 |
Correct |
32 ms |
68700 KB |
Output is correct |
38 |
Correct |
39 ms |
68700 KB |
Output is correct |
39 |
Correct |
112 ms |
74328 KB |
Output is correct |
40 |
Correct |
111 ms |
74516 KB |
Output is correct |
41 |
Correct |
119 ms |
74284 KB |
Output is correct |
42 |
Correct |
115 ms |
74268 KB |
Output is correct |
43 |
Correct |
114 ms |
74324 KB |
Output is correct |
44 |
Correct |
111 ms |
74328 KB |
Output is correct |
45 |
Correct |
71 ms |
72452 KB |
Output is correct |
46 |
Correct |
93 ms |
72764 KB |
Output is correct |
47 |
Correct |
111 ms |
74236 KB |
Output is correct |
48 |
Correct |
112 ms |
74324 KB |
Output is correct |
49 |
Correct |
113 ms |
74376 KB |
Output is correct |
50 |
Correct |
134 ms |
74836 KB |
Output is correct |
51 |
Correct |
100 ms |
73564 KB |
Output is correct |
52 |
Correct |
109 ms |
74064 KB |
Output is correct |
53 |
Correct |
106 ms |
74320 KB |
Output is correct |
54 |
Correct |
108 ms |
74620 KB |
Output is correct |
55 |
Correct |
115 ms |
73564 KB |
Output is correct |
56 |
Correct |
103 ms |
73180 KB |
Output is correct |
57 |
Correct |
67 ms |
72208 KB |
Output is correct |
58 |
Correct |
76 ms |
72764 KB |
Output is correct |
59 |
Correct |
118 ms |
74060 KB |
Output is correct |
60 |
Correct |
129 ms |
74460 KB |
Output is correct |
61 |
Correct |
124 ms |
74328 KB |
Output is correct |
62 |
Correct |
119 ms |
74068 KB |
Output is correct |
63 |
Correct |
119 ms |
74340 KB |
Output is correct |
64 |
Correct |
126 ms |
74288 KB |
Output is correct |
65 |
Correct |
90 ms |
72996 KB |
Output is correct |
66 |
Correct |
122 ms |
74008 KB |
Output is correct |
67 |
Correct |
96 ms |
72648 KB |
Output is correct |
68 |
Correct |
106 ms |
73556 KB |
Output is correct |
69 |
Correct |
141 ms |
74376 KB |
Output is correct |
70 |
Correct |
146 ms |
74196 KB |
Output is correct |
71 |
Correct |
108 ms |
73328 KB |
Output is correct |
72 |
Correct |
110 ms |
74644 KB |
Output is correct |
73 |
Correct |
120 ms |
73824 KB |
Output is correct |
74 |
Correct |
135 ms |
74332 KB |
Output is correct |
75 |
Correct |
155 ms |
74448 KB |
Output is correct |
76 |
Correct |
98 ms |
72784 KB |
Output is correct |
77 |
Correct |
123 ms |
73552 KB |
Output is correct |
78 |
Correct |
128 ms |
74524 KB |
Output is correct |
79 |
Correct |
86 ms |
72636 KB |
Output is correct |
80 |
Correct |
84 ms |
72384 KB |
Output is correct |
81 |
Correct |
130 ms |
73536 KB |
Output is correct |
82 |
Correct |
98 ms |
72568 KB |
Output is correct |
83 |
Correct |
133 ms |
74032 KB |
Output is correct |
84 |
Correct |
123 ms |
74080 KB |
Output is correct |
85 |
Correct |
116 ms |
74136 KB |
Output is correct |
86 |
Correct |
125 ms |
74684 KB |
Output is correct |
87 |
Correct |
115 ms |
74096 KB |
Output is correct |
88 |
Correct |
122 ms |
74832 KB |
Output is correct |
89 |
Correct |
105 ms |
72652 KB |
Output is correct |
90 |
Correct |
122 ms |
74884 KB |
Output is correct |
91 |
Correct |
115 ms |
73660 KB |
Output is correct |
92 |
Correct |
100 ms |
73400 KB |
Output is correct |
93 |
Correct |
133 ms |
74652 KB |
Output is correct |
94 |
Correct |
122 ms |
74576 KB |
Output is correct |
95 |
Correct |
122 ms |
74688 KB |
Output is correct |
96 |
Correct |
133 ms |
74860 KB |
Output is correct |
97 |
Correct |
144 ms |
74808 KB |
Output is correct |
98 |
Correct |
111 ms |
73856 KB |
Output is correct |
99 |
Correct |
105 ms |
73576 KB |
Output is correct |
100 |
Correct |
105 ms |
73448 KB |
Output is correct |
101 |
Correct |
141 ms |
74576 KB |
Output is correct |
102 |
Correct |
108 ms |
75088 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
34 ms |
68692 KB |
Output is correct |
2 |
Correct |
34 ms |
68700 KB |
Output is correct |
3 |
Correct |
33 ms |
68696 KB |
Output is correct |
4 |
Correct |
34 ms |
68644 KB |
Output is correct |
5 |
Correct |
35 ms |
68540 KB |
Output is correct |
6 |
Correct |
33 ms |
68560 KB |
Output is correct |
7 |
Correct |
34 ms |
68492 KB |
Output is correct |
8 |
Correct |
33 ms |
68688 KB |
Output is correct |
9 |
Correct |
34 ms |
68636 KB |
Output is correct |
10 |
Correct |
33 ms |
68728 KB |
Output is correct |
11 |
Correct |
33 ms |
68700 KB |
Output is correct |
12 |
Correct |
33 ms |
68700 KB |
Output is correct |
13 |
Correct |
33 ms |
68716 KB |
Output is correct |
14 |
Correct |
33 ms |
68692 KB |
Output is correct |
15 |
Correct |
32 ms |
68444 KB |
Output is correct |
16 |
Correct |
33 ms |
68500 KB |
Output is correct |
17 |
Correct |
34 ms |
68692 KB |
Output is correct |
18 |
Correct |
34 ms |
68692 KB |
Output is correct |
19 |
Correct |
32 ms |
68704 KB |
Output is correct |
20 |
Correct |
33 ms |
68696 KB |
Output is correct |
21 |
Correct |
33 ms |
68688 KB |
Output is correct |
22 |
Correct |
33 ms |
68692 KB |
Output is correct |
23 |
Correct |
33 ms |
68688 KB |
Output is correct |
24 |
Correct |
34 ms |
68700 KB |
Output is correct |
25 |
Correct |
35 ms |
68800 KB |
Output is correct |
26 |
Correct |
33 ms |
68688 KB |
Output is correct |
27 |
Correct |
33 ms |
68688 KB |
Output is correct |
28 |
Correct |
33 ms |
68692 KB |
Output is correct |
29 |
Correct |
33 ms |
68992 KB |
Output is correct |
30 |
Correct |
34 ms |
68696 KB |
Output is correct |
31 |
Correct |
33 ms |
68700 KB |
Output is correct |
32 |
Correct |
37 ms |
68692 KB |
Output is correct |
33 |
Correct |
33 ms |
68768 KB |
Output is correct |
34 |
Correct |
34 ms |
68692 KB |
Output is correct |
35 |
Correct |
34 ms |
68692 KB |
Output is correct |
36 |
Correct |
41 ms |
68692 KB |
Output is correct |
37 |
Correct |
32 ms |
68700 KB |
Output is correct |
38 |
Correct |
39 ms |
68700 KB |
Output is correct |
39 |
Correct |
112 ms |
74328 KB |
Output is correct |
40 |
Correct |
111 ms |
74516 KB |
Output is correct |
41 |
Correct |
119 ms |
74284 KB |
Output is correct |
42 |
Correct |
115 ms |
74268 KB |
Output is correct |
43 |
Correct |
114 ms |
74324 KB |
Output is correct |
44 |
Correct |
111 ms |
74328 KB |
Output is correct |
45 |
Correct |
71 ms |
72452 KB |
Output is correct |
46 |
Correct |
93 ms |
72764 KB |
Output is correct |
47 |
Correct |
111 ms |
74236 KB |
Output is correct |
48 |
Correct |
112 ms |
74324 KB |
Output is correct |
49 |
Correct |
113 ms |
74376 KB |
Output is correct |
50 |
Correct |
134 ms |
74836 KB |
Output is correct |
51 |
Correct |
100 ms |
73564 KB |
Output is correct |
52 |
Correct |
109 ms |
74064 KB |
Output is correct |
53 |
Correct |
106 ms |
74320 KB |
Output is correct |
54 |
Correct |
108 ms |
74620 KB |
Output is correct |
55 |
Correct |
536 ms |
89940 KB |
Output is correct |
56 |
Correct |
469 ms |
85704 KB |
Output is correct |
57 |
Correct |
619 ms |
92004 KB |
Output is correct |
58 |
Correct |
414 ms |
86100 KB |
Output is correct |
59 |
Correct |
411 ms |
86308 KB |
Output is correct |
60 |
Correct |
590 ms |
92640 KB |
Output is correct |
61 |
Correct |
237 ms |
85280 KB |
Output is correct |
62 |
Correct |
254 ms |
85356 KB |
Output is correct |
63 |
Correct |
576 ms |
90960 KB |
Output is correct |
64 |
Correct |
581 ms |
91056 KB |
Output is correct |
65 |
Correct |
562 ms |
91860 KB |
Output is correct |
66 |
Correct |
561 ms |
92560 KB |
Output is correct |
67 |
Correct |
577 ms |
91528 KB |
Output is correct |
68 |
Correct |
598 ms |
92536 KB |
Output is correct |
69 |
Correct |
583 ms |
92464 KB |
Output is correct |
70 |
Correct |
570 ms |
92484 KB |
Output is correct |
71 |
Correct |
596 ms |
92408 KB |
Output is correct |
72 |
Correct |
587 ms |
91988 KB |
Output is correct |
73 |
Correct |
572 ms |
92756 KB |
Output is correct |
74 |
Correct |
554 ms |
92064 KB |
Output is correct |
75 |
Correct |
582 ms |
92376 KB |
Output is correct |
76 |
Correct |
584 ms |
92472 KB |
Output is correct |
77 |
Correct |
621 ms |
92488 KB |
Output is correct |
78 |
Correct |
623 ms |
92496 KB |
Output is correct |
79 |
Correct |
501 ms |
90980 KB |
Output is correct |
80 |
Correct |
507 ms |
91504 KB |
Output is correct |
81 |
Correct |
413 ms |
93180 KB |
Output is correct |
82 |
Correct |
115 ms |
73564 KB |
Output is correct |
83 |
Correct |
103 ms |
73180 KB |
Output is correct |
84 |
Correct |
67 ms |
72208 KB |
Output is correct |
85 |
Correct |
76 ms |
72764 KB |
Output is correct |
86 |
Correct |
118 ms |
74060 KB |
Output is correct |
87 |
Correct |
129 ms |
74460 KB |
Output is correct |
88 |
Correct |
124 ms |
74328 KB |
Output is correct |
89 |
Correct |
119 ms |
74068 KB |
Output is correct |
90 |
Correct |
119 ms |
74340 KB |
Output is correct |
91 |
Correct |
126 ms |
74288 KB |
Output is correct |
92 |
Correct |
90 ms |
72996 KB |
Output is correct |
93 |
Correct |
122 ms |
74008 KB |
Output is correct |
94 |
Correct |
96 ms |
72648 KB |
Output is correct |
95 |
Correct |
106 ms |
73556 KB |
Output is correct |
96 |
Correct |
141 ms |
74376 KB |
Output is correct |
97 |
Correct |
146 ms |
74196 KB |
Output is correct |
98 |
Correct |
108 ms |
73328 KB |
Output is correct |
99 |
Correct |
110 ms |
74644 KB |
Output is correct |
100 |
Correct |
120 ms |
73824 KB |
Output is correct |
101 |
Correct |
135 ms |
74332 KB |
Output is correct |
102 |
Correct |
155 ms |
74448 KB |
Output is correct |
103 |
Correct |
98 ms |
72784 KB |
Output is correct |
104 |
Correct |
123 ms |
73552 KB |
Output is correct |
105 |
Correct |
128 ms |
74524 KB |
Output is correct |
106 |
Correct |
86 ms |
72636 KB |
Output is correct |
107 |
Correct |
84 ms |
72384 KB |
Output is correct |
108 |
Correct |
130 ms |
73536 KB |
Output is correct |
109 |
Correct |
98 ms |
72568 KB |
Output is correct |
110 |
Correct |
133 ms |
74032 KB |
Output is correct |
111 |
Correct |
123 ms |
74080 KB |
Output is correct |
112 |
Correct |
116 ms |
74136 KB |
Output is correct |
113 |
Correct |
125 ms |
74684 KB |
Output is correct |
114 |
Correct |
115 ms |
74096 KB |
Output is correct |
115 |
Correct |
122 ms |
74832 KB |
Output is correct |
116 |
Correct |
105 ms |
72652 KB |
Output is correct |
117 |
Correct |
122 ms |
74884 KB |
Output is correct |
118 |
Correct |
115 ms |
73660 KB |
Output is correct |
119 |
Correct |
100 ms |
73400 KB |
Output is correct |
120 |
Correct |
133 ms |
74652 KB |
Output is correct |
121 |
Correct |
122 ms |
74576 KB |
Output is correct |
122 |
Correct |
122 ms |
74688 KB |
Output is correct |
123 |
Correct |
133 ms |
74860 KB |
Output is correct |
124 |
Correct |
144 ms |
74808 KB |
Output is correct |
125 |
Correct |
111 ms |
73856 KB |
Output is correct |
126 |
Correct |
105 ms |
73576 KB |
Output is correct |
127 |
Correct |
105 ms |
73448 KB |
Output is correct |
128 |
Correct |
141 ms |
74576 KB |
Output is correct |
129 |
Correct |
108 ms |
75088 KB |
Output is correct |
130 |
Correct |
631 ms |
92752 KB |
Output is correct |
131 |
Correct |
427 ms |
86120 KB |
Output is correct |
132 |
Correct |
612 ms |
92608 KB |
Output is correct |
133 |
Correct |
569 ms |
92552 KB |
Output is correct |
134 |
Correct |
490 ms |
89812 KB |
Output is correct |
135 |
Correct |
578 ms |
93324 KB |
Output is correct |
136 |
Correct |
626 ms |
92048 KB |
Output is correct |
137 |
Correct |
604 ms |
92152 KB |
Output is correct |
138 |
Correct |
608 ms |
92504 KB |
Output is correct |
139 |
Correct |
613 ms |
93268 KB |
Output is correct |
140 |
Correct |
645 ms |
92356 KB |
Output is correct |
141 |
Correct |
584 ms |
93364 KB |
Output is correct |
142 |
Correct |
580 ms |
93244 KB |
Output is correct |
143 |
Correct |
564 ms |
93156 KB |
Output is correct |
144 |
Correct |
576 ms |
92744 KB |
Output is correct |
145 |
Correct |
566 ms |
93224 KB |
Output is correct |
146 |
Correct |
566 ms |
92848 KB |
Output is correct |
147 |
Correct |
595 ms |
92984 KB |
Output is correct |
148 |
Correct |
642 ms |
93148 KB |
Output is correct |
149 |
Correct |
672 ms |
93244 KB |
Output is correct |
150 |
Correct |
364 ms |
87944 KB |
Output is correct |
151 |
Correct |
528 ms |
92156 KB |
Output is correct |
152 |
Correct |
508 ms |
92168 KB |
Output is correct |
153 |
Correct |
444 ms |
93940 KB |
Output is correct |