#pragma GCC optimize("O3")
#include<stdint.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/rope>
using namespace __gnu_pbds;
using namespace __gnu_cxx;
#define VIS(it,con) for(auto it=con.begin();it!=con.end();++it)
#define pob pop_back
#define pf push_front
#define pof pop_front
#define MIN(x,y) (x=min(x,(y)))
#define MAX(x,y) (x=max(x,(y)))
#define mid (l+r>>1)
#define lch (idx*2+1)
#define rch (idx*2+2)
/*****************************************************************************/
#include<bits/stdc++.h>
#define int int_fast64_t
using namespace std;
typedef pair<int,int> pii;
#define REP(i,j,k) for(int i=(j);i<(k);++i)
#define RREP(i,j,k) for(int i=int(j)-1;i>=(k);--i)
#define ALL(a) a.begin(),a.end()
#define pb push_back
#define f first
#define s second
#define endl '\n'
// #define __debug
#ifdef __debug
#define IOS (void)0
#define de(...) cerr<<__VA_ARGS__
#define ar(a,s,t) {REP(__i,s,t)de(a[__i]<<' ');de(endl);}
#else
#define IOS cin.tie(0),cout.tie(0),ios_base::sync_with_stdio(false)
#define de(...) (void)0
#define ar(...) (void)0
#endif
/***********************************default***********************************/
const int maxn=1<<20,inf=1ll<<60;
int n,m,res=0,a[maxn],b[maxn],s[maxn],t[maxn],p[maxn],q[maxn],dat[maxn<<1],t1[maxn<<1],t2[maxn<<1];
vector<pii>v[maxn];
void init(int l,int r,int idx){
dat[idx]=0,t1[idx]=0,t2[idx]=-inf;
if(l+1<r)init(l,mid,lch),init(mid,r,rch);
}
void upd1(int idx,int k){dat[idx]+=k,t1[idx]+=k,t2[idx]+=k;}
void upd2(int idx,int k){MAX(dat[idx],k),MAX(t2[idx],k);}
void psh(int idx){
upd1(lch,t1[idx]),upd2(lch,t2[idx]);
upd1(rch,t1[idx]),upd2(rch,t2[idx]);
t1[idx]=0,t2[idx]=-inf;
}
void mnt(int idx){dat[idx]=max(dat[lch],dat[rch]);}
void add(int l,int r,int idx,int a,int b,int k){
if(b<=l||r<=a)return;
else if(a<=l&&r<=b)upd1(idx,k);
else psh(idx),add(l,mid,lch,a,b,k),add(mid,r,rch,a,b,k),mnt(idx);
}
void enh(int l,int r,int idx,int a,int b,int k){
if(b<=l||r<=a)return;
else if(a<=l&&r<=b)upd2(idx,k);
else psh(idx),enh(l,mid,lch,a,b,k),enh(mid,r,rch,a,b,k),mnt(idx);
}
int qr(int l,int r,int idx,int p){
if(l+1==r)return dat[idx];
else{
psh(idx);
if(p<mid)return qr(l,mid,lch,p);
else return qr(mid,r,rch,p);
}
}
main(){
IOS;
cin>>n>>m;
REP(i,0,n)cin>>a[i+1]>>s[i]>>p[i],a[i+1]+=a[i];
REP(i,0,m)cin>>b[i+1]>>t[i]>>q[i],b[i+1]+=b[i];
REP(i,0,n){
int x=upper_bound(b,b+m+1,s[i]-a[i+1])-1-b;
if(x>=0)v[x].pb({i+1,p[i]});
}
REP(i,0,m){
res+=q[i];
int x=upper_bound(a,a+n+1,t[i]-b[i+1])-1-a;
if(x<n)v[i].pb({x+1,-q[i]});
}
init(0,n+1,0);
REP(i,0,m+1){
REP(j,0,v[i].size()){
pii&x=v[i][j];
add(0,n+1,0,x.f,n+1,x.s);
}
if(i==m)return cout<<res+qr(0,n+1,0,n)<<endl,0;
REP(j,0,v[i].size()){
pii&x=v[i][j];
if(x.f)enh(0,n+1,0,x.f,n+1,qr(0,n+1,0,x.f-1));
}
}
}
Compilation message
dishes.cpp: In function 'void init(int_fast64_t, int_fast64_t, int_fast64_t)':
dishes.cpp:14:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
#define mid (l+r>>1)
~^~
dishes.cpp:46:18: note: in expansion of macro 'mid'
if(l+1<r)init(l,mid,lch),init(mid,r,rch);
^~~
dishes.cpp:14:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
#define mid (l+r>>1)
~^~
dishes.cpp:46:32: note: in expansion of macro 'mid'
if(l+1<r)init(l,mid,lch),init(mid,r,rch);
^~~
dishes.cpp: In function 'void add(int_fast64_t, int_fast64_t, int_fast64_t, int_fast64_t, int_fast64_t, int_fast64_t)':
dishes.cpp:14:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
#define mid (l+r>>1)
~^~
dishes.cpp:64:22: note: in expansion of macro 'mid'
else psh(idx),add(l,mid,lch,a,b,k),add(mid,r,rch,a,b,k),mnt(idx);
^~~
dishes.cpp:14:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
#define mid (l+r>>1)
~^~
dishes.cpp:64:41: note: in expansion of macro 'mid'
else psh(idx),add(l,mid,lch,a,b,k),add(mid,r,rch,a,b,k),mnt(idx);
^~~
dishes.cpp: In function 'void enh(int_fast64_t, int_fast64_t, int_fast64_t, int_fast64_t, int_fast64_t, int_fast64_t)':
dishes.cpp:14:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
#define mid (l+r>>1)
~^~
dishes.cpp:70:22: note: in expansion of macro 'mid'
else psh(idx),enh(l,mid,lch,a,b,k),enh(mid,r,rch,a,b,k),mnt(idx);
^~~
dishes.cpp:14:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
#define mid (l+r>>1)
~^~
dishes.cpp:70:41: note: in expansion of macro 'mid'
else psh(idx),enh(l,mid,lch,a,b,k),enh(mid,r,rch,a,b,k),mnt(idx);
^~~
dishes.cpp: In function 'int_fast64_t qr(int_fast64_t, int_fast64_t, int_fast64_t, int_fast64_t)':
dishes.cpp:14:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
#define mid (l+r>>1)
~^~
dishes.cpp:77:8: note: in expansion of macro 'mid'
if(p<mid)return qr(l,mid,lch,p);
^~~
dishes.cpp:14:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
#define mid (l+r>>1)
~^~
dishes.cpp:77:24: note: in expansion of macro 'mid'
if(p<mid)return qr(l,mid,lch,p);
^~~
dishes.cpp:14:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
#define mid (l+r>>1)
~^~
dishes.cpp:78:18: note: in expansion of macro 'mid'
else return qr(mid,r,rch,p);
^~~
dishes.cpp: At global scope:
dishes.cpp:82:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main(){
^
dishes.cpp: In function 'int main()':
dishes.cpp:22:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
#define REP(i,j,k) for(int i=(j);i<(k);++i)
^
dishes.cpp:98:3: note: in expansion of macro 'REP'
REP(j,0,v[i].size()){
^~~
dishes.cpp:22:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
#define REP(i,j,k) for(int i=(j);i<(k);++i)
^
dishes.cpp:103:3: note: in expansion of macro 'REP'
REP(j,0,v[i].size()){
^~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
579 ms |
57352 KB |
Output is correct |
2 |
Correct |
571 ms |
56804 KB |
Output is correct |
3 |
Correct |
327 ms |
50912 KB |
Output is correct |
4 |
Correct |
493 ms |
55872 KB |
Output is correct |
5 |
Correct |
27 ms |
25080 KB |
Output is correct |
6 |
Correct |
524 ms |
55552 KB |
Output is correct |
7 |
Correct |
132 ms |
31608 KB |
Output is correct |
8 |
Correct |
213 ms |
46552 KB |
Output is correct |
9 |
Correct |
331 ms |
50988 KB |
Output is correct |
10 |
Correct |
548 ms |
57556 KB |
Output is correct |
11 |
Correct |
256 ms |
51296 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
26 ms |
25080 KB |
Output is correct |
2 |
Correct |
26 ms |
25080 KB |
Output is correct |
3 |
Correct |
26 ms |
24952 KB |
Output is correct |
4 |
Correct |
26 ms |
24952 KB |
Output is correct |
5 |
Correct |
26 ms |
24952 KB |
Output is correct |
6 |
Correct |
26 ms |
24956 KB |
Output is correct |
7 |
Correct |
27 ms |
24952 KB |
Output is correct |
8 |
Correct |
26 ms |
25084 KB |
Output is correct |
9 |
Correct |
26 ms |
25080 KB |
Output is correct |
10 |
Correct |
27 ms |
25080 KB |
Output is correct |
11 |
Correct |
26 ms |
25052 KB |
Output is correct |
12 |
Correct |
26 ms |
24952 KB |
Output is correct |
13 |
Correct |
27 ms |
25068 KB |
Output is correct |
14 |
Correct |
27 ms |
25080 KB |
Output is correct |
15 |
Correct |
26 ms |
25020 KB |
Output is correct |
16 |
Correct |
27 ms |
24952 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
26 ms |
25080 KB |
Output is correct |
2 |
Correct |
26 ms |
25080 KB |
Output is correct |
3 |
Correct |
26 ms |
24952 KB |
Output is correct |
4 |
Correct |
26 ms |
24952 KB |
Output is correct |
5 |
Correct |
26 ms |
24952 KB |
Output is correct |
6 |
Correct |
26 ms |
24956 KB |
Output is correct |
7 |
Correct |
27 ms |
24952 KB |
Output is correct |
8 |
Correct |
26 ms |
25084 KB |
Output is correct |
9 |
Correct |
26 ms |
25080 KB |
Output is correct |
10 |
Correct |
27 ms |
25080 KB |
Output is correct |
11 |
Correct |
26 ms |
25052 KB |
Output is correct |
12 |
Correct |
26 ms |
24952 KB |
Output is correct |
13 |
Correct |
27 ms |
25068 KB |
Output is correct |
14 |
Correct |
27 ms |
25080 KB |
Output is correct |
15 |
Correct |
26 ms |
25020 KB |
Output is correct |
16 |
Correct |
27 ms |
24952 KB |
Output is correct |
17 |
Correct |
30 ms |
25464 KB |
Output is correct |
18 |
Correct |
29 ms |
25336 KB |
Output is correct |
19 |
Correct |
31 ms |
25424 KB |
Output is correct |
20 |
Correct |
30 ms |
25464 KB |
Output is correct |
21 |
Correct |
31 ms |
25416 KB |
Output is correct |
22 |
Correct |
30 ms |
25336 KB |
Output is correct |
23 |
Correct |
30 ms |
25464 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
26 ms |
25080 KB |
Output is correct |
2 |
Correct |
26 ms |
25080 KB |
Output is correct |
3 |
Correct |
26 ms |
24952 KB |
Output is correct |
4 |
Correct |
26 ms |
24952 KB |
Output is correct |
5 |
Correct |
26 ms |
24952 KB |
Output is correct |
6 |
Correct |
26 ms |
24956 KB |
Output is correct |
7 |
Correct |
27 ms |
24952 KB |
Output is correct |
8 |
Correct |
26 ms |
25084 KB |
Output is correct |
9 |
Correct |
26 ms |
25080 KB |
Output is correct |
10 |
Correct |
27 ms |
25080 KB |
Output is correct |
11 |
Correct |
26 ms |
25052 KB |
Output is correct |
12 |
Correct |
26 ms |
24952 KB |
Output is correct |
13 |
Correct |
27 ms |
25068 KB |
Output is correct |
14 |
Correct |
27 ms |
25080 KB |
Output is correct |
15 |
Correct |
26 ms |
25020 KB |
Output is correct |
16 |
Correct |
27 ms |
24952 KB |
Output is correct |
17 |
Correct |
30 ms |
25464 KB |
Output is correct |
18 |
Correct |
29 ms |
25336 KB |
Output is correct |
19 |
Correct |
31 ms |
25424 KB |
Output is correct |
20 |
Correct |
30 ms |
25464 KB |
Output is correct |
21 |
Correct |
31 ms |
25416 KB |
Output is correct |
22 |
Correct |
30 ms |
25336 KB |
Output is correct |
23 |
Correct |
30 ms |
25464 KB |
Output is correct |
24 |
Correct |
407 ms |
63540 KB |
Output is correct |
25 |
Correct |
698 ms |
65128 KB |
Output is correct |
26 |
Correct |
431 ms |
66364 KB |
Output is correct |
27 |
Correct |
448 ms |
65204 KB |
Output is correct |
28 |
Correct |
447 ms |
63168 KB |
Output is correct |
29 |
Correct |
310 ms |
61412 KB |
Output is correct |
30 |
Correct |
841 ms |
67448 KB |
Output is correct |
31 |
Correct |
138 ms |
38052 KB |
Output is correct |
32 |
Correct |
247 ms |
50596 KB |
Output is correct |
33 |
Correct |
543 ms |
65016 KB |
Output is correct |
34 |
Correct |
715 ms |
66440 KB |
Output is correct |
35 |
Correct |
769 ms |
61208 KB |
Output is correct |
36 |
Correct |
763 ms |
61048 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
26 ms |
25080 KB |
Output is correct |
2 |
Correct |
26 ms |
25080 KB |
Output is correct |
3 |
Correct |
26 ms |
24952 KB |
Output is correct |
4 |
Correct |
26 ms |
24952 KB |
Output is correct |
5 |
Correct |
26 ms |
24952 KB |
Output is correct |
6 |
Correct |
26 ms |
24956 KB |
Output is correct |
7 |
Correct |
27 ms |
24952 KB |
Output is correct |
8 |
Correct |
26 ms |
25084 KB |
Output is correct |
9 |
Correct |
26 ms |
25080 KB |
Output is correct |
10 |
Correct |
27 ms |
25080 KB |
Output is correct |
11 |
Correct |
26 ms |
25052 KB |
Output is correct |
12 |
Correct |
26 ms |
24952 KB |
Output is correct |
13 |
Correct |
27 ms |
25068 KB |
Output is correct |
14 |
Correct |
27 ms |
25080 KB |
Output is correct |
15 |
Correct |
26 ms |
25020 KB |
Output is correct |
16 |
Correct |
27 ms |
24952 KB |
Output is correct |
17 |
Correct |
30 ms |
25464 KB |
Output is correct |
18 |
Correct |
29 ms |
25336 KB |
Output is correct |
19 |
Correct |
31 ms |
25424 KB |
Output is correct |
20 |
Correct |
30 ms |
25464 KB |
Output is correct |
21 |
Correct |
31 ms |
25416 KB |
Output is correct |
22 |
Correct |
30 ms |
25336 KB |
Output is correct |
23 |
Correct |
30 ms |
25464 KB |
Output is correct |
24 |
Correct |
407 ms |
63540 KB |
Output is correct |
25 |
Correct |
698 ms |
65128 KB |
Output is correct |
26 |
Correct |
431 ms |
66364 KB |
Output is correct |
27 |
Correct |
448 ms |
65204 KB |
Output is correct |
28 |
Correct |
447 ms |
63168 KB |
Output is correct |
29 |
Correct |
310 ms |
61412 KB |
Output is correct |
30 |
Correct |
841 ms |
67448 KB |
Output is correct |
31 |
Correct |
138 ms |
38052 KB |
Output is correct |
32 |
Correct |
247 ms |
50596 KB |
Output is correct |
33 |
Correct |
543 ms |
65016 KB |
Output is correct |
34 |
Correct |
715 ms |
66440 KB |
Output is correct |
35 |
Correct |
769 ms |
61208 KB |
Output is correct |
36 |
Correct |
763 ms |
61048 KB |
Output is correct |
37 |
Correct |
452 ms |
69340 KB |
Output is correct |
38 |
Correct |
475 ms |
68328 KB |
Output is correct |
39 |
Correct |
609 ms |
67304 KB |
Output is correct |
40 |
Correct |
598 ms |
67400 KB |
Output is correct |
41 |
Correct |
27 ms |
25084 KB |
Output is correct |
42 |
Correct |
906 ms |
70640 KB |
Output is correct |
43 |
Correct |
696 ms |
67944 KB |
Output is correct |
44 |
Correct |
757 ms |
69228 KB |
Output is correct |
45 |
Correct |
847 ms |
64376 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
26 ms |
25080 KB |
Output is correct |
2 |
Correct |
26 ms |
25080 KB |
Output is correct |
3 |
Correct |
26 ms |
24952 KB |
Output is correct |
4 |
Correct |
26 ms |
24952 KB |
Output is correct |
5 |
Correct |
26 ms |
24952 KB |
Output is correct |
6 |
Correct |
26 ms |
24956 KB |
Output is correct |
7 |
Correct |
27 ms |
24952 KB |
Output is correct |
8 |
Correct |
26 ms |
25084 KB |
Output is correct |
9 |
Correct |
26 ms |
25080 KB |
Output is correct |
10 |
Correct |
27 ms |
25080 KB |
Output is correct |
11 |
Correct |
26 ms |
25052 KB |
Output is correct |
12 |
Correct |
26 ms |
24952 KB |
Output is correct |
13 |
Correct |
27 ms |
25068 KB |
Output is correct |
14 |
Correct |
27 ms |
25080 KB |
Output is correct |
15 |
Correct |
26 ms |
25020 KB |
Output is correct |
16 |
Correct |
27 ms |
24952 KB |
Output is correct |
17 |
Correct |
30 ms |
25464 KB |
Output is correct |
18 |
Correct |
29 ms |
25336 KB |
Output is correct |
19 |
Correct |
31 ms |
25424 KB |
Output is correct |
20 |
Correct |
30 ms |
25464 KB |
Output is correct |
21 |
Correct |
31 ms |
25416 KB |
Output is correct |
22 |
Correct |
30 ms |
25336 KB |
Output is correct |
23 |
Correct |
30 ms |
25464 KB |
Output is correct |
24 |
Correct |
407 ms |
63540 KB |
Output is correct |
25 |
Correct |
698 ms |
65128 KB |
Output is correct |
26 |
Correct |
431 ms |
66364 KB |
Output is correct |
27 |
Correct |
448 ms |
65204 KB |
Output is correct |
28 |
Correct |
447 ms |
63168 KB |
Output is correct |
29 |
Correct |
310 ms |
61412 KB |
Output is correct |
30 |
Correct |
841 ms |
67448 KB |
Output is correct |
31 |
Correct |
138 ms |
38052 KB |
Output is correct |
32 |
Correct |
247 ms |
50596 KB |
Output is correct |
33 |
Correct |
543 ms |
65016 KB |
Output is correct |
34 |
Correct |
715 ms |
66440 KB |
Output is correct |
35 |
Correct |
769 ms |
61208 KB |
Output is correct |
36 |
Correct |
763 ms |
61048 KB |
Output is correct |
37 |
Correct |
452 ms |
69340 KB |
Output is correct |
38 |
Correct |
475 ms |
68328 KB |
Output is correct |
39 |
Correct |
609 ms |
67304 KB |
Output is correct |
40 |
Correct |
598 ms |
67400 KB |
Output is correct |
41 |
Correct |
27 ms |
25084 KB |
Output is correct |
42 |
Correct |
906 ms |
70640 KB |
Output is correct |
43 |
Correct |
696 ms |
67944 KB |
Output is correct |
44 |
Correct |
757 ms |
69228 KB |
Output is correct |
45 |
Correct |
847 ms |
64376 KB |
Output is correct |
46 |
Correct |
2360 ms |
235824 KB |
Output is correct |
47 |
Correct |
2462 ms |
230212 KB |
Output is correct |
48 |
Correct |
3160 ms |
224564 KB |
Output is correct |
49 |
Correct |
3173 ms |
224640 KB |
Output is correct |
50 |
Correct |
5802 ms |
241292 KB |
Output is correct |
51 |
Correct |
3323 ms |
225604 KB |
Output is correct |
52 |
Correct |
4347 ms |
227648 KB |
Output is correct |
53 |
Correct |
5096 ms |
209176 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
579 ms |
57352 KB |
Output is correct |
2 |
Correct |
571 ms |
56804 KB |
Output is correct |
3 |
Correct |
327 ms |
50912 KB |
Output is correct |
4 |
Correct |
493 ms |
55872 KB |
Output is correct |
5 |
Correct |
27 ms |
25080 KB |
Output is correct |
6 |
Correct |
524 ms |
55552 KB |
Output is correct |
7 |
Correct |
132 ms |
31608 KB |
Output is correct |
8 |
Correct |
213 ms |
46552 KB |
Output is correct |
9 |
Correct |
331 ms |
50988 KB |
Output is correct |
10 |
Correct |
548 ms |
57556 KB |
Output is correct |
11 |
Correct |
256 ms |
51296 KB |
Output is correct |
12 |
Correct |
26 ms |
25080 KB |
Output is correct |
13 |
Correct |
26 ms |
25080 KB |
Output is correct |
14 |
Correct |
26 ms |
24952 KB |
Output is correct |
15 |
Correct |
26 ms |
24952 KB |
Output is correct |
16 |
Correct |
26 ms |
24952 KB |
Output is correct |
17 |
Correct |
26 ms |
24956 KB |
Output is correct |
18 |
Correct |
27 ms |
24952 KB |
Output is correct |
19 |
Correct |
26 ms |
25084 KB |
Output is correct |
20 |
Correct |
26 ms |
25080 KB |
Output is correct |
21 |
Correct |
27 ms |
25080 KB |
Output is correct |
22 |
Correct |
26 ms |
25052 KB |
Output is correct |
23 |
Correct |
26 ms |
24952 KB |
Output is correct |
24 |
Correct |
27 ms |
25068 KB |
Output is correct |
25 |
Correct |
27 ms |
25080 KB |
Output is correct |
26 |
Correct |
26 ms |
25020 KB |
Output is correct |
27 |
Correct |
27 ms |
24952 KB |
Output is correct |
28 |
Correct |
30 ms |
25464 KB |
Output is correct |
29 |
Correct |
29 ms |
25336 KB |
Output is correct |
30 |
Correct |
31 ms |
25424 KB |
Output is correct |
31 |
Correct |
30 ms |
25464 KB |
Output is correct |
32 |
Correct |
31 ms |
25416 KB |
Output is correct |
33 |
Correct |
30 ms |
25336 KB |
Output is correct |
34 |
Correct |
30 ms |
25464 KB |
Output is correct |
35 |
Correct |
407 ms |
63540 KB |
Output is correct |
36 |
Correct |
698 ms |
65128 KB |
Output is correct |
37 |
Correct |
431 ms |
66364 KB |
Output is correct |
38 |
Correct |
448 ms |
65204 KB |
Output is correct |
39 |
Correct |
447 ms |
63168 KB |
Output is correct |
40 |
Correct |
310 ms |
61412 KB |
Output is correct |
41 |
Correct |
841 ms |
67448 KB |
Output is correct |
42 |
Correct |
138 ms |
38052 KB |
Output is correct |
43 |
Correct |
247 ms |
50596 KB |
Output is correct |
44 |
Correct |
543 ms |
65016 KB |
Output is correct |
45 |
Correct |
715 ms |
66440 KB |
Output is correct |
46 |
Correct |
769 ms |
61208 KB |
Output is correct |
47 |
Correct |
763 ms |
61048 KB |
Output is correct |
48 |
Correct |
452 ms |
69340 KB |
Output is correct |
49 |
Correct |
475 ms |
68328 KB |
Output is correct |
50 |
Correct |
609 ms |
67304 KB |
Output is correct |
51 |
Correct |
598 ms |
67400 KB |
Output is correct |
52 |
Correct |
27 ms |
25084 KB |
Output is correct |
53 |
Correct |
906 ms |
70640 KB |
Output is correct |
54 |
Correct |
696 ms |
67944 KB |
Output is correct |
55 |
Correct |
757 ms |
69228 KB |
Output is correct |
56 |
Correct |
847 ms |
64376 KB |
Output is correct |
57 |
Correct |
470 ms |
69892 KB |
Output is correct |
58 |
Correct |
480 ms |
68720 KB |
Output is correct |
59 |
Correct |
619 ms |
68284 KB |
Output is correct |
60 |
Correct |
605 ms |
68324 KB |
Output is correct |
61 |
Correct |
916 ms |
67712 KB |
Output is correct |
62 |
Correct |
27 ms |
24952 KB |
Output is correct |
63 |
Correct |
898 ms |
70648 KB |
Output is correct |
64 |
Correct |
584 ms |
67836 KB |
Output is correct |
65 |
Correct |
753 ms |
69052 KB |
Output is correct |
66 |
Correct |
803 ms |
64248 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
579 ms |
57352 KB |
Output is correct |
2 |
Correct |
571 ms |
56804 KB |
Output is correct |
3 |
Correct |
327 ms |
50912 KB |
Output is correct |
4 |
Correct |
493 ms |
55872 KB |
Output is correct |
5 |
Correct |
27 ms |
25080 KB |
Output is correct |
6 |
Correct |
524 ms |
55552 KB |
Output is correct |
7 |
Correct |
132 ms |
31608 KB |
Output is correct |
8 |
Correct |
213 ms |
46552 KB |
Output is correct |
9 |
Correct |
331 ms |
50988 KB |
Output is correct |
10 |
Correct |
548 ms |
57556 KB |
Output is correct |
11 |
Correct |
256 ms |
51296 KB |
Output is correct |
12 |
Correct |
26 ms |
25080 KB |
Output is correct |
13 |
Correct |
26 ms |
25080 KB |
Output is correct |
14 |
Correct |
26 ms |
24952 KB |
Output is correct |
15 |
Correct |
26 ms |
24952 KB |
Output is correct |
16 |
Correct |
26 ms |
24952 KB |
Output is correct |
17 |
Correct |
26 ms |
24956 KB |
Output is correct |
18 |
Correct |
27 ms |
24952 KB |
Output is correct |
19 |
Correct |
26 ms |
25084 KB |
Output is correct |
20 |
Correct |
26 ms |
25080 KB |
Output is correct |
21 |
Correct |
27 ms |
25080 KB |
Output is correct |
22 |
Correct |
26 ms |
25052 KB |
Output is correct |
23 |
Correct |
26 ms |
24952 KB |
Output is correct |
24 |
Correct |
27 ms |
25068 KB |
Output is correct |
25 |
Correct |
27 ms |
25080 KB |
Output is correct |
26 |
Correct |
26 ms |
25020 KB |
Output is correct |
27 |
Correct |
27 ms |
24952 KB |
Output is correct |
28 |
Correct |
30 ms |
25464 KB |
Output is correct |
29 |
Correct |
29 ms |
25336 KB |
Output is correct |
30 |
Correct |
31 ms |
25424 KB |
Output is correct |
31 |
Correct |
30 ms |
25464 KB |
Output is correct |
32 |
Correct |
31 ms |
25416 KB |
Output is correct |
33 |
Correct |
30 ms |
25336 KB |
Output is correct |
34 |
Correct |
30 ms |
25464 KB |
Output is correct |
35 |
Correct |
407 ms |
63540 KB |
Output is correct |
36 |
Correct |
698 ms |
65128 KB |
Output is correct |
37 |
Correct |
431 ms |
66364 KB |
Output is correct |
38 |
Correct |
448 ms |
65204 KB |
Output is correct |
39 |
Correct |
447 ms |
63168 KB |
Output is correct |
40 |
Correct |
310 ms |
61412 KB |
Output is correct |
41 |
Correct |
841 ms |
67448 KB |
Output is correct |
42 |
Correct |
138 ms |
38052 KB |
Output is correct |
43 |
Correct |
247 ms |
50596 KB |
Output is correct |
44 |
Correct |
543 ms |
65016 KB |
Output is correct |
45 |
Correct |
715 ms |
66440 KB |
Output is correct |
46 |
Correct |
769 ms |
61208 KB |
Output is correct |
47 |
Correct |
763 ms |
61048 KB |
Output is correct |
48 |
Correct |
452 ms |
69340 KB |
Output is correct |
49 |
Correct |
475 ms |
68328 KB |
Output is correct |
50 |
Correct |
609 ms |
67304 KB |
Output is correct |
51 |
Correct |
598 ms |
67400 KB |
Output is correct |
52 |
Correct |
27 ms |
25084 KB |
Output is correct |
53 |
Correct |
906 ms |
70640 KB |
Output is correct |
54 |
Correct |
696 ms |
67944 KB |
Output is correct |
55 |
Correct |
757 ms |
69228 KB |
Output is correct |
56 |
Correct |
847 ms |
64376 KB |
Output is correct |
57 |
Correct |
2360 ms |
235824 KB |
Output is correct |
58 |
Correct |
2462 ms |
230212 KB |
Output is correct |
59 |
Correct |
3160 ms |
224564 KB |
Output is correct |
60 |
Correct |
3173 ms |
224640 KB |
Output is correct |
61 |
Correct |
5802 ms |
241292 KB |
Output is correct |
62 |
Correct |
3323 ms |
225604 KB |
Output is correct |
63 |
Correct |
4347 ms |
227648 KB |
Output is correct |
64 |
Correct |
5096 ms |
209176 KB |
Output is correct |
65 |
Correct |
470 ms |
69892 KB |
Output is correct |
66 |
Correct |
480 ms |
68720 KB |
Output is correct |
67 |
Correct |
619 ms |
68284 KB |
Output is correct |
68 |
Correct |
605 ms |
68324 KB |
Output is correct |
69 |
Correct |
916 ms |
67712 KB |
Output is correct |
70 |
Correct |
27 ms |
24952 KB |
Output is correct |
71 |
Correct |
898 ms |
70648 KB |
Output is correct |
72 |
Correct |
584 ms |
67836 KB |
Output is correct |
73 |
Correct |
753 ms |
69052 KB |
Output is correct |
74 |
Correct |
803 ms |
64248 KB |
Output is correct |
75 |
Correct |
2368 ms |
237792 KB |
Output is correct |
76 |
Correct |
2474 ms |
231924 KB |
Output is correct |
77 |
Correct |
3168 ms |
226976 KB |
Output is correct |
78 |
Correct |
3197 ms |
226872 KB |
Output is correct |
79 |
Correct |
5654 ms |
241340 KB |
Output is correct |
80 |
Correct |
3372 ms |
225204 KB |
Output is correct |
81 |
Correct |
4090 ms |
225496 KB |
Output is correct |
82 |
Correct |
5157 ms |
209564 KB |
Output is correct |
83 |
Correct |
5312 ms |
228308 KB |
Output is correct |