#include<bits/stdc++.h>
#define x first
#define y second
#define pb push_back
#define eb emplace_back
#define all(a) (a).begin(),(a).end()
#define SZ(a) (int)(a).size()
#define FOR(i, a, b) for(int i=(a); i<=(b); ++i)
#define iFOR(i, a, b) for(int i=(a); i>=(b); --i)
#define make_unique(a) sort(all((a))), (a).resize(unique(all((a)))-(a).begin())
using namespace std;
typedef pair<int,int> PII;
typedef long long LL;
typedef double DD;
typedef long double LD;
typedef pair<LL,LL> PLL;
typedef pair<DD,DD> PDD;
typedef vector<int> VI;
typedef vector<LL> VL;
const LL inf = 1e18;
const int N = 1000005;
int n, m;
struct segtree{
LL seg[N<<2], lazy[N<<2], label[N<<2], Min[N<<2];
void push_add(int l, int r, int nw){
if(lazy[nw] == 0) return ;
seg[nw] += lazy[nw];
Min[nw] += lazy[nw];
if(l != r){
lazy[nw<<1] += lazy[nw], lazy[nw<<1|1] += lazy[nw];
}
lazy[nw] = 0;
}
void push_label(int l, int r, int nw){
if(label[nw] == inf) return ;
seg[nw] = Min[nw] = label[nw];
if(l != r){
lazy[nw<<1] = lazy[nw<<1|1] = 0;
label[nw<<1] = label[nw<<1|1] = label[nw];
}
label[nw] = inf;
}
void push(int l, int r, int nw){
push_label(l, r, nw);
push_add(l, r, nw);
}
void paste(int ll, int rr, LL v, int l = 0, int r = n, int nw = 1){
push(l, r, nw);
if(ll > rr || l > rr || r < ll) return ;
if(l >= ll && r <= rr){
label[nw] = v;
push(l, r, nw); return ;
}
int m = (l+r)>>1;
paste(ll, rr, v, l, m, nw<<1);
paste(ll, rr, v, m+1, r, nw<<1|1);
seg[nw] = max(seg[nw<<1], seg[nw<<1|1]);
Min[nw] = min(Min[nw<<1], Min[nw<<1|1]);
}
void add(int ll, int rr, LL v, int l = 0, int r = n, int nw = 1){
push(l, r, nw);
if(l > r || ll > rr || l > rr || r < ll) return ;
if(l >= ll && r <= rr){
lazy[nw] = v;
push(l, r, nw); return ;
}
int m = (l+r)>>1;
add(ll, rr, v, l, m, nw<<1);
add(ll, rr, v, m+1, r, nw<<1|1);
seg[nw] = max(seg[nw<<1], seg[nw<<1|1]);
Min[nw] = min(Min[nw<<1], Min[nw<<1|1]);
}
int search(int ll, int rr, LL v, int l = 0, int r = n, int nw = 1){
push(l, r, nw);
if(l > r || ll > rr || l > rr || r < ll) return 1<<30;
if(seg[nw] < v) return 1<<30;
if(l == r){
if(seg[nw] >= v) return l;
return 1<<30;
}
int m = (l+r)>>1;
if(l >= ll && r <= rr){
if(Min[nw] >= v) return l;
push(l, m, nw<<1); push(m+1, r, nw<<1|1);
if(seg[nw<<1] >= v) return search(ll, rr, v, l, m, nw<<1);
return search(ll, rr, v, m+1, r, nw<<1|1);
}
return min( search(ll, rr, v, l, m, nw<<1), search(ll, rr, v, m+1, r, nw<<1|1));
}
LL get(int idx, int l = 0, int r = n, int nw = 1){
assert(l <= idx && idx <= r);
push(l, r, nw);
if(l == r) return seg[nw];
int m = (l+r)>>1;
if(idx <= m) return get(idx, l, m, nw<<1);
return get(idx, m+1, r, nw<<1|1);
}
void print(int l = 0, int r = n, int nw = 1){
push(l, r, nw);
if(l == r){
printf("%lld ",seg[nw]); return ;
}
int m = (l+r)>>1;
print(l, m, nw<<1); print(m+1, r, nw<<1|1);
}
}seg;
LL A[N], B[N];
LL S[N], T[N];
LL P[N], Q[N];
vector< PLL > sweep[N];
int main(){
scanf("%d %d",&n,&m);
FOR(i, 1, n) scanf("%lld %lld %lld",&A[i],&S[i],&P[i]), A[i] += A[i-1];
FOR(i, 1, m) scanf("%lld %lld %lld",&B[i],&T[i],&Q[i]), B[i] += B[i-1];
FOR(i, 1, (n+1)<<2) seg.label[i] = inf;
FOR(i, 1, n){
int pA = upper_bound(B, B+1+m, S[i]-A[i]) - B - 1;
if(pA == -1) continue;
sweep[pA+1].pb(PLL(i-1, P[i]));
}
//seg.print(); puts("");
FOR(i, 1, m){
int pB = upper_bound(A, A+1+n, T[i]-B[i]) - A - 1;
if(pB != -1) seg.add(0, pB, Q[i]), sweep[i].pb( PLL(pB, 0) );
//printf("#"); seg.print(); puts("");
sweep[i].pb( PLL(n, 0) );
sort( all( sweep[i] ) );
//printf("sweep: "); for(PLL e : sweep[i]) printf("(%lld, %lld) ",e.x,e.y);
//puts("");
FOR(j, 0, SZ(sweep[i])-2){
int now = sweep[i][j].x;
LL upd = sweep[i][j].y;
int nxt = sweep[i][j+1].x;
seg.add(now+1, n, upd);
// printf("##"); seg.print(); puts("");
if(now == nxt) continue;
LL value = seg.get(now);
int stop_point = seg.search(now+1, nxt, value);
//printf("j %d (%d, %d) %lld stop = %d\n",j,now,nxt,value,stop_point);
seg.paste(now+1, min(stop_point-1, nxt), value);
}
//seg.print(); puts("");
}
//puts("");
for(PLL e : sweep[m+1]) seg.add(e.x+1, n, e.y);
printf("%lld",seg.get(n));
return 0;
}
/*
*
*
*
*
*
*
*
*
*
*
*/
Compilation message
dishes.cpp: In function 'int main()':
dishes.cpp:117:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&n,&m);
~~~~~^~~~~~~~~~~~~~~
dishes.cpp:118:59: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
FOR(i, 1, n) scanf("%lld %lld %lld",&A[i],&S[i],&P[i]), A[i] += A[i-1];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
dishes.cpp:119:59: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
FOR(i, 1, m) scanf("%lld %lld %lld",&B[i],&T[i],&Q[i]), B[i] += B[i-1];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
663 ms |
78100 KB |
Output is correct |
2 |
Correct |
554 ms |
79952 KB |
Output is correct |
3 |
Correct |
330 ms |
77916 KB |
Output is correct |
4 |
Correct |
474 ms |
72824 KB |
Output is correct |
5 |
Correct |
18 ms |
23936 KB |
Output is correct |
6 |
Correct |
542 ms |
78440 KB |
Output is correct |
7 |
Correct |
140 ms |
44408 KB |
Output is correct |
8 |
Correct |
185 ms |
57416 KB |
Output is correct |
9 |
Correct |
330 ms |
78812 KB |
Output is correct |
10 |
Correct |
525 ms |
75000 KB |
Output is correct |
11 |
Correct |
276 ms |
72156 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
19 ms |
23936 KB |
Output is correct |
2 |
Correct |
18 ms |
23808 KB |
Output is correct |
3 |
Correct |
18 ms |
23936 KB |
Output is correct |
4 |
Correct |
18 ms |
23936 KB |
Output is correct |
5 |
Correct |
18 ms |
23936 KB |
Output is correct |
6 |
Correct |
18 ms |
23936 KB |
Output is correct |
7 |
Correct |
18 ms |
23936 KB |
Output is correct |
8 |
Correct |
19 ms |
23936 KB |
Output is correct |
9 |
Correct |
19 ms |
23936 KB |
Output is correct |
10 |
Correct |
19 ms |
23936 KB |
Output is correct |
11 |
Correct |
19 ms |
23936 KB |
Output is correct |
12 |
Correct |
20 ms |
23928 KB |
Output is correct |
13 |
Correct |
20 ms |
23936 KB |
Output is correct |
14 |
Correct |
18 ms |
23936 KB |
Output is correct |
15 |
Correct |
19 ms |
23936 KB |
Output is correct |
16 |
Correct |
18 ms |
23936 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
19 ms |
23936 KB |
Output is correct |
2 |
Correct |
18 ms |
23808 KB |
Output is correct |
3 |
Correct |
18 ms |
23936 KB |
Output is correct |
4 |
Correct |
18 ms |
23936 KB |
Output is correct |
5 |
Correct |
18 ms |
23936 KB |
Output is correct |
6 |
Correct |
18 ms |
23936 KB |
Output is correct |
7 |
Correct |
18 ms |
23936 KB |
Output is correct |
8 |
Correct |
19 ms |
23936 KB |
Output is correct |
9 |
Correct |
19 ms |
23936 KB |
Output is correct |
10 |
Correct |
19 ms |
23936 KB |
Output is correct |
11 |
Correct |
19 ms |
23936 KB |
Output is correct |
12 |
Correct |
20 ms |
23928 KB |
Output is correct |
13 |
Correct |
20 ms |
23936 KB |
Output is correct |
14 |
Correct |
18 ms |
23936 KB |
Output is correct |
15 |
Correct |
19 ms |
23936 KB |
Output is correct |
16 |
Correct |
18 ms |
23936 KB |
Output is correct |
17 |
Correct |
23 ms |
24320 KB |
Output is correct |
18 |
Correct |
22 ms |
24320 KB |
Output is correct |
19 |
Correct |
27 ms |
24448 KB |
Output is correct |
20 |
Correct |
23 ms |
24320 KB |
Output is correct |
21 |
Correct |
24 ms |
24320 KB |
Output is correct |
22 |
Correct |
24 ms |
24320 KB |
Output is correct |
23 |
Correct |
25 ms |
24320 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
19 ms |
23936 KB |
Output is correct |
2 |
Correct |
18 ms |
23808 KB |
Output is correct |
3 |
Correct |
18 ms |
23936 KB |
Output is correct |
4 |
Correct |
18 ms |
23936 KB |
Output is correct |
5 |
Correct |
18 ms |
23936 KB |
Output is correct |
6 |
Correct |
18 ms |
23936 KB |
Output is correct |
7 |
Correct |
18 ms |
23936 KB |
Output is correct |
8 |
Correct |
19 ms |
23936 KB |
Output is correct |
9 |
Correct |
19 ms |
23936 KB |
Output is correct |
10 |
Correct |
19 ms |
23936 KB |
Output is correct |
11 |
Correct |
19 ms |
23936 KB |
Output is correct |
12 |
Correct |
20 ms |
23928 KB |
Output is correct |
13 |
Correct |
20 ms |
23936 KB |
Output is correct |
14 |
Correct |
18 ms |
23936 KB |
Output is correct |
15 |
Correct |
19 ms |
23936 KB |
Output is correct |
16 |
Correct |
18 ms |
23936 KB |
Output is correct |
17 |
Correct |
23 ms |
24320 KB |
Output is correct |
18 |
Correct |
22 ms |
24320 KB |
Output is correct |
19 |
Correct |
27 ms |
24448 KB |
Output is correct |
20 |
Correct |
23 ms |
24320 KB |
Output is correct |
21 |
Correct |
24 ms |
24320 KB |
Output is correct |
22 |
Correct |
24 ms |
24320 KB |
Output is correct |
23 |
Correct |
25 ms |
24320 KB |
Output is correct |
24 |
Correct |
396 ms |
73308 KB |
Output is correct |
25 |
Correct |
525 ms |
73424 KB |
Output is correct |
26 |
Correct |
408 ms |
75140 KB |
Output is correct |
27 |
Correct |
537 ms |
73540 KB |
Output is correct |
28 |
Correct |
544 ms |
75236 KB |
Output is correct |
29 |
Correct |
299 ms |
75740 KB |
Output is correct |
30 |
Correct |
1182 ms |
77632 KB |
Output is correct |
31 |
Correct |
155 ms |
43256 KB |
Output is correct |
32 |
Correct |
221 ms |
55668 KB |
Output is correct |
33 |
Correct |
722 ms |
72024 KB |
Output is correct |
34 |
Correct |
925 ms |
76204 KB |
Output is correct |
35 |
Correct |
1241 ms |
71160 KB |
Output is correct |
36 |
Correct |
1280 ms |
71112 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
19 ms |
23936 KB |
Output is correct |
2 |
Correct |
18 ms |
23808 KB |
Output is correct |
3 |
Correct |
18 ms |
23936 KB |
Output is correct |
4 |
Correct |
18 ms |
23936 KB |
Output is correct |
5 |
Correct |
18 ms |
23936 KB |
Output is correct |
6 |
Correct |
18 ms |
23936 KB |
Output is correct |
7 |
Correct |
18 ms |
23936 KB |
Output is correct |
8 |
Correct |
19 ms |
23936 KB |
Output is correct |
9 |
Correct |
19 ms |
23936 KB |
Output is correct |
10 |
Correct |
19 ms |
23936 KB |
Output is correct |
11 |
Correct |
19 ms |
23936 KB |
Output is correct |
12 |
Correct |
20 ms |
23928 KB |
Output is correct |
13 |
Correct |
20 ms |
23936 KB |
Output is correct |
14 |
Correct |
18 ms |
23936 KB |
Output is correct |
15 |
Correct |
19 ms |
23936 KB |
Output is correct |
16 |
Correct |
18 ms |
23936 KB |
Output is correct |
17 |
Correct |
23 ms |
24320 KB |
Output is correct |
18 |
Correct |
22 ms |
24320 KB |
Output is correct |
19 |
Correct |
27 ms |
24448 KB |
Output is correct |
20 |
Correct |
23 ms |
24320 KB |
Output is correct |
21 |
Correct |
24 ms |
24320 KB |
Output is correct |
22 |
Correct |
24 ms |
24320 KB |
Output is correct |
23 |
Correct |
25 ms |
24320 KB |
Output is correct |
24 |
Correct |
396 ms |
73308 KB |
Output is correct |
25 |
Correct |
525 ms |
73424 KB |
Output is correct |
26 |
Correct |
408 ms |
75140 KB |
Output is correct |
27 |
Correct |
537 ms |
73540 KB |
Output is correct |
28 |
Correct |
544 ms |
75236 KB |
Output is correct |
29 |
Correct |
299 ms |
75740 KB |
Output is correct |
30 |
Correct |
1182 ms |
77632 KB |
Output is correct |
31 |
Correct |
155 ms |
43256 KB |
Output is correct |
32 |
Correct |
221 ms |
55668 KB |
Output is correct |
33 |
Correct |
722 ms |
72024 KB |
Output is correct |
34 |
Correct |
925 ms |
76204 KB |
Output is correct |
35 |
Correct |
1241 ms |
71160 KB |
Output is correct |
36 |
Correct |
1280 ms |
71112 KB |
Output is correct |
37 |
Correct |
447 ms |
78072 KB |
Output is correct |
38 |
Correct |
562 ms |
76644 KB |
Output is correct |
39 |
Correct |
653 ms |
78584 KB |
Output is correct |
40 |
Correct |
532 ms |
78584 KB |
Output is correct |
41 |
Correct |
18 ms |
23936 KB |
Output is correct |
42 |
Correct |
1208 ms |
80888 KB |
Output is correct |
43 |
Correct |
743 ms |
74936 KB |
Output is correct |
44 |
Correct |
1000 ms |
78976 KB |
Output is correct |
45 |
Correct |
1173 ms |
74232 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
19 ms |
23936 KB |
Output is correct |
2 |
Correct |
18 ms |
23808 KB |
Output is correct |
3 |
Correct |
18 ms |
23936 KB |
Output is correct |
4 |
Correct |
18 ms |
23936 KB |
Output is correct |
5 |
Correct |
18 ms |
23936 KB |
Output is correct |
6 |
Correct |
18 ms |
23936 KB |
Output is correct |
7 |
Correct |
18 ms |
23936 KB |
Output is correct |
8 |
Correct |
19 ms |
23936 KB |
Output is correct |
9 |
Correct |
19 ms |
23936 KB |
Output is correct |
10 |
Correct |
19 ms |
23936 KB |
Output is correct |
11 |
Correct |
19 ms |
23936 KB |
Output is correct |
12 |
Correct |
20 ms |
23928 KB |
Output is correct |
13 |
Correct |
20 ms |
23936 KB |
Output is correct |
14 |
Correct |
18 ms |
23936 KB |
Output is correct |
15 |
Correct |
19 ms |
23936 KB |
Output is correct |
16 |
Correct |
18 ms |
23936 KB |
Output is correct |
17 |
Correct |
23 ms |
24320 KB |
Output is correct |
18 |
Correct |
22 ms |
24320 KB |
Output is correct |
19 |
Correct |
27 ms |
24448 KB |
Output is correct |
20 |
Correct |
23 ms |
24320 KB |
Output is correct |
21 |
Correct |
24 ms |
24320 KB |
Output is correct |
22 |
Correct |
24 ms |
24320 KB |
Output is correct |
23 |
Correct |
25 ms |
24320 KB |
Output is correct |
24 |
Correct |
396 ms |
73308 KB |
Output is correct |
25 |
Correct |
525 ms |
73424 KB |
Output is correct |
26 |
Correct |
408 ms |
75140 KB |
Output is correct |
27 |
Correct |
537 ms |
73540 KB |
Output is correct |
28 |
Correct |
544 ms |
75236 KB |
Output is correct |
29 |
Correct |
299 ms |
75740 KB |
Output is correct |
30 |
Correct |
1182 ms |
77632 KB |
Output is correct |
31 |
Correct |
155 ms |
43256 KB |
Output is correct |
32 |
Correct |
221 ms |
55668 KB |
Output is correct |
33 |
Correct |
722 ms |
72024 KB |
Output is correct |
34 |
Correct |
925 ms |
76204 KB |
Output is correct |
35 |
Correct |
1241 ms |
71160 KB |
Output is correct |
36 |
Correct |
1280 ms |
71112 KB |
Output is correct |
37 |
Correct |
447 ms |
78072 KB |
Output is correct |
38 |
Correct |
562 ms |
76644 KB |
Output is correct |
39 |
Correct |
653 ms |
78584 KB |
Output is correct |
40 |
Correct |
532 ms |
78584 KB |
Output is correct |
41 |
Correct |
18 ms |
23936 KB |
Output is correct |
42 |
Correct |
1208 ms |
80888 KB |
Output is correct |
43 |
Correct |
743 ms |
74936 KB |
Output is correct |
44 |
Correct |
1000 ms |
78976 KB |
Output is correct |
45 |
Correct |
1173 ms |
74232 KB |
Output is correct |
46 |
Correct |
2159 ms |
216872 KB |
Output is correct |
47 |
Correct |
2863 ms |
209248 KB |
Output is correct |
48 |
Correct |
3589 ms |
246424 KB |
Output is correct |
49 |
Correct |
2743 ms |
246388 KB |
Output is correct |
50 |
Correct |
8038 ms |
230044 KB |
Output is correct |
51 |
Correct |
4408 ms |
199152 KB |
Output is correct |
52 |
Correct |
5223 ms |
215104 KB |
Output is correct |
53 |
Correct |
7574 ms |
227148 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
663 ms |
78100 KB |
Output is correct |
2 |
Correct |
554 ms |
79952 KB |
Output is correct |
3 |
Correct |
330 ms |
77916 KB |
Output is correct |
4 |
Correct |
474 ms |
72824 KB |
Output is correct |
5 |
Correct |
18 ms |
23936 KB |
Output is correct |
6 |
Correct |
542 ms |
78440 KB |
Output is correct |
7 |
Correct |
140 ms |
44408 KB |
Output is correct |
8 |
Correct |
185 ms |
57416 KB |
Output is correct |
9 |
Correct |
330 ms |
78812 KB |
Output is correct |
10 |
Correct |
525 ms |
75000 KB |
Output is correct |
11 |
Correct |
276 ms |
72156 KB |
Output is correct |
12 |
Correct |
19 ms |
23936 KB |
Output is correct |
13 |
Correct |
18 ms |
23808 KB |
Output is correct |
14 |
Correct |
18 ms |
23936 KB |
Output is correct |
15 |
Correct |
18 ms |
23936 KB |
Output is correct |
16 |
Correct |
18 ms |
23936 KB |
Output is correct |
17 |
Correct |
18 ms |
23936 KB |
Output is correct |
18 |
Correct |
18 ms |
23936 KB |
Output is correct |
19 |
Correct |
19 ms |
23936 KB |
Output is correct |
20 |
Correct |
19 ms |
23936 KB |
Output is correct |
21 |
Correct |
19 ms |
23936 KB |
Output is correct |
22 |
Correct |
19 ms |
23936 KB |
Output is correct |
23 |
Correct |
20 ms |
23928 KB |
Output is correct |
24 |
Correct |
20 ms |
23936 KB |
Output is correct |
25 |
Correct |
18 ms |
23936 KB |
Output is correct |
26 |
Correct |
19 ms |
23936 KB |
Output is correct |
27 |
Correct |
18 ms |
23936 KB |
Output is correct |
28 |
Correct |
23 ms |
24320 KB |
Output is correct |
29 |
Correct |
22 ms |
24320 KB |
Output is correct |
30 |
Correct |
27 ms |
24448 KB |
Output is correct |
31 |
Correct |
23 ms |
24320 KB |
Output is correct |
32 |
Correct |
24 ms |
24320 KB |
Output is correct |
33 |
Correct |
24 ms |
24320 KB |
Output is correct |
34 |
Correct |
25 ms |
24320 KB |
Output is correct |
35 |
Correct |
396 ms |
73308 KB |
Output is correct |
36 |
Correct |
525 ms |
73424 KB |
Output is correct |
37 |
Correct |
408 ms |
75140 KB |
Output is correct |
38 |
Correct |
537 ms |
73540 KB |
Output is correct |
39 |
Correct |
544 ms |
75236 KB |
Output is correct |
40 |
Correct |
299 ms |
75740 KB |
Output is correct |
41 |
Correct |
1182 ms |
77632 KB |
Output is correct |
42 |
Correct |
155 ms |
43256 KB |
Output is correct |
43 |
Correct |
221 ms |
55668 KB |
Output is correct |
44 |
Correct |
722 ms |
72024 KB |
Output is correct |
45 |
Correct |
925 ms |
76204 KB |
Output is correct |
46 |
Correct |
1241 ms |
71160 KB |
Output is correct |
47 |
Correct |
1280 ms |
71112 KB |
Output is correct |
48 |
Correct |
447 ms |
78072 KB |
Output is correct |
49 |
Correct |
562 ms |
76644 KB |
Output is correct |
50 |
Correct |
653 ms |
78584 KB |
Output is correct |
51 |
Correct |
532 ms |
78584 KB |
Output is correct |
52 |
Correct |
18 ms |
23936 KB |
Output is correct |
53 |
Correct |
1208 ms |
80888 KB |
Output is correct |
54 |
Correct |
743 ms |
74936 KB |
Output is correct |
55 |
Correct |
1000 ms |
78976 KB |
Output is correct |
56 |
Correct |
1173 ms |
74232 KB |
Output is correct |
57 |
Correct |
513 ms |
78752 KB |
Output is correct |
58 |
Correct |
503 ms |
76944 KB |
Output is correct |
59 |
Correct |
535 ms |
79480 KB |
Output is correct |
60 |
Correct |
652 ms |
79400 KB |
Output is correct |
61 |
Correct |
934 ms |
73720 KB |
Output is correct |
62 |
Correct |
18 ms |
23936 KB |
Output is correct |
63 |
Correct |
1255 ms |
80920 KB |
Output is correct |
64 |
Correct |
798 ms |
74856 KB |
Output is correct |
65 |
Correct |
951 ms |
79248 KB |
Output is correct |
66 |
Correct |
1135 ms |
74488 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
663 ms |
78100 KB |
Output is correct |
2 |
Correct |
554 ms |
79952 KB |
Output is correct |
3 |
Correct |
330 ms |
77916 KB |
Output is correct |
4 |
Correct |
474 ms |
72824 KB |
Output is correct |
5 |
Correct |
18 ms |
23936 KB |
Output is correct |
6 |
Correct |
542 ms |
78440 KB |
Output is correct |
7 |
Correct |
140 ms |
44408 KB |
Output is correct |
8 |
Correct |
185 ms |
57416 KB |
Output is correct |
9 |
Correct |
330 ms |
78812 KB |
Output is correct |
10 |
Correct |
525 ms |
75000 KB |
Output is correct |
11 |
Correct |
276 ms |
72156 KB |
Output is correct |
12 |
Correct |
19 ms |
23936 KB |
Output is correct |
13 |
Correct |
18 ms |
23808 KB |
Output is correct |
14 |
Correct |
18 ms |
23936 KB |
Output is correct |
15 |
Correct |
18 ms |
23936 KB |
Output is correct |
16 |
Correct |
18 ms |
23936 KB |
Output is correct |
17 |
Correct |
18 ms |
23936 KB |
Output is correct |
18 |
Correct |
18 ms |
23936 KB |
Output is correct |
19 |
Correct |
19 ms |
23936 KB |
Output is correct |
20 |
Correct |
19 ms |
23936 KB |
Output is correct |
21 |
Correct |
19 ms |
23936 KB |
Output is correct |
22 |
Correct |
19 ms |
23936 KB |
Output is correct |
23 |
Correct |
20 ms |
23928 KB |
Output is correct |
24 |
Correct |
20 ms |
23936 KB |
Output is correct |
25 |
Correct |
18 ms |
23936 KB |
Output is correct |
26 |
Correct |
19 ms |
23936 KB |
Output is correct |
27 |
Correct |
18 ms |
23936 KB |
Output is correct |
28 |
Correct |
23 ms |
24320 KB |
Output is correct |
29 |
Correct |
22 ms |
24320 KB |
Output is correct |
30 |
Correct |
27 ms |
24448 KB |
Output is correct |
31 |
Correct |
23 ms |
24320 KB |
Output is correct |
32 |
Correct |
24 ms |
24320 KB |
Output is correct |
33 |
Correct |
24 ms |
24320 KB |
Output is correct |
34 |
Correct |
25 ms |
24320 KB |
Output is correct |
35 |
Correct |
396 ms |
73308 KB |
Output is correct |
36 |
Correct |
525 ms |
73424 KB |
Output is correct |
37 |
Correct |
408 ms |
75140 KB |
Output is correct |
38 |
Correct |
537 ms |
73540 KB |
Output is correct |
39 |
Correct |
544 ms |
75236 KB |
Output is correct |
40 |
Correct |
299 ms |
75740 KB |
Output is correct |
41 |
Correct |
1182 ms |
77632 KB |
Output is correct |
42 |
Correct |
155 ms |
43256 KB |
Output is correct |
43 |
Correct |
221 ms |
55668 KB |
Output is correct |
44 |
Correct |
722 ms |
72024 KB |
Output is correct |
45 |
Correct |
925 ms |
76204 KB |
Output is correct |
46 |
Correct |
1241 ms |
71160 KB |
Output is correct |
47 |
Correct |
1280 ms |
71112 KB |
Output is correct |
48 |
Correct |
447 ms |
78072 KB |
Output is correct |
49 |
Correct |
562 ms |
76644 KB |
Output is correct |
50 |
Correct |
653 ms |
78584 KB |
Output is correct |
51 |
Correct |
532 ms |
78584 KB |
Output is correct |
52 |
Correct |
18 ms |
23936 KB |
Output is correct |
53 |
Correct |
1208 ms |
80888 KB |
Output is correct |
54 |
Correct |
743 ms |
74936 KB |
Output is correct |
55 |
Correct |
1000 ms |
78976 KB |
Output is correct |
56 |
Correct |
1173 ms |
74232 KB |
Output is correct |
57 |
Correct |
2159 ms |
216872 KB |
Output is correct |
58 |
Correct |
2863 ms |
209248 KB |
Output is correct |
59 |
Correct |
3589 ms |
246424 KB |
Output is correct |
60 |
Correct |
2743 ms |
246388 KB |
Output is correct |
61 |
Correct |
8038 ms |
230044 KB |
Output is correct |
62 |
Correct |
4408 ms |
199152 KB |
Output is correct |
63 |
Correct |
5223 ms |
215104 KB |
Output is correct |
64 |
Correct |
7574 ms |
227148 KB |
Output is correct |
65 |
Correct |
513 ms |
78752 KB |
Output is correct |
66 |
Correct |
503 ms |
76944 KB |
Output is correct |
67 |
Correct |
535 ms |
79480 KB |
Output is correct |
68 |
Correct |
652 ms |
79400 KB |
Output is correct |
69 |
Correct |
934 ms |
73720 KB |
Output is correct |
70 |
Correct |
18 ms |
23936 KB |
Output is correct |
71 |
Correct |
1255 ms |
80920 KB |
Output is correct |
72 |
Correct |
798 ms |
74856 KB |
Output is correct |
73 |
Correct |
951 ms |
79248 KB |
Output is correct |
74 |
Correct |
1135 ms |
74488 KB |
Output is correct |
75 |
Correct |
2552 ms |
216120 KB |
Output is correct |
76 |
Correct |
2714 ms |
208548 KB |
Output is correct |
77 |
Correct |
2806 ms |
242296 KB |
Output is correct |
78 |
Correct |
3431 ms |
241464 KB |
Output is correct |
79 |
Correct |
8087 ms |
228840 KB |
Output is correct |
80 |
Correct |
4464 ms |
199144 KB |
Output is correct |
81 |
Correct |
5571 ms |
216796 KB |
Output is correct |
82 |
Correct |
7754 ms |
227656 KB |
Output is correct |
83 |
Correct |
7444 ms |
226668 KB |
Output is correct |