#define LOCAL
#include "bits/stdc++.h"
using namespace std;
#define FAST ios_base::sync_with_stdio(false); cin.tie(0);
#define LLINF ((long long) 1e18)//1234567890987654321
#define INF 1234567890ll
#define pb push_back
#define eb emplace_back
#define ins insert
#define f first
#define s second
#define db 0
#define EPS (1e-7) //0.0000001 the value
#define PI (acos((ld)-1.0))
#define MAXN (1000006)
#define ll long long int
#define ld long double
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); //can be used by calling rng() or shuffle(A, A+n, rng)
#define FOR(ii, ss, ee) for(int ii = (ss); ii <= (ll)(ee); ++ii)
#define DEC(ii, ss, ee) for(ll ii = (ss); ii >= (ll)(ee); --ii)
#define space " "
#define cbr cerr << "hi\n"
#define mmst(x, v) memset((x), v, sizeof ((x)))
#define siz(x) ((ll)x.size())
#define ph push
#define btinpct(x) __builtin_popcountll((x))
#define MSB(bm) ((bm==0)?-1:(63-__builtin_clzll((bm))))
#define all(x) (x).begin(), (x).end()
#define lbd(x, y) lower_bound(all(x), y)
#define ubd(x, y) upper_bound(all(x), y)
typedef pair <ll, ll> pi;
typedef pair <ll, pi> spi;
typedef pair <pi, pi> dpi;
inline ll rand(ll x, ll y) { ++y; return (rng() % (y-x)) + x; } //inclusivesss
string to_string(char c) {string s(1,c);return s;}string to_string(bool b){return (b ? "true" : "false");}template <typename A, typename B>string to_string(pair<A, B> p) {return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";}template <typename A>string to_string(A v) {bool first = true;string res = "{";for (const auto &x : v) {if (!first) {res += ", ";}first = false;res += to_string(x);}res += "}";return res;}void degug_out() { cerr << endl; }template <typename Head, typename... Tail>void degug_out(Head H, Tail... T) {cerr << " " << to_string(H);degug_out(T...);}inline ll gcd(ll a,ll b){if(a>b)swap(a,b);if(a==0)return b;return gcd(b%a,a);}
#ifdef LOCAL
// #define degug(...) cerr << "[" << #__VA_ARGS__ << "]:", degug_out(__VA_ARGS__)
#else
// #define degug(...) 663
#define cerr if(0)cout
#endif
#warning "// FOR has been inclusive now!!!! && arr size"
#define sdb __attribute((optimize("-O3"), target("arch=sandybridge")))
ll n, m;
struct dish {
// ll ct, bf, add, i;
int ct; ll bf; int add;
} A[MAXN], B[MAXN];
ll Bsum[MAXN], Asum[MAXN];
vector<pi> points[MAXN];
ll addback;
struct node {
int s,e,m;
ll v, add, mxv;
node *l,*r;
node(int _S,int _E){
s=_S,e=_E,m=(s+e)>>1;
v=add=0; mxv=-LLINF;
if(s^e){
l=new node(s,m);
r=new node(m+1,e);
}
}
void sdb update(ll x,ll y,ll nval) { value();
if(s==x&&e==y) {
add+=nval;
return;
}
if(x>m)r->update(x,y,nval);
else if(y<=m) l->update(x,y,nval);
else l->update(x,m,nval), r->update(m+1,y,nval);
v=max(l->value(),r->value());
}
ll sdb rmq(ll x,ll y) { value();
if(s==x&&e==y) {
return v;
}
if(x>m) return r->rmq(x,y);
else if(y<=m) return l->rmq(x,y);
else return max(l->rmq(x,m),r->rmq(m+1,y));
}
void sdb mx(ll x,ll y,ll nval) { //value();
if(s==x&&e==y) {
mxv=nval-add;
return;
}
if(x>m) r->mx(x,y,nval);
else if(y<=m) l->mx(x,y,nval);
else l->mx(x,m,nval),r->mx(m+1,y,nval);
v=max(l->value(),r->value());
}
ll sdb value() {
if(mxv!=-LLINF&&add){
v=max(v,mxv);
v+=add;
if(s^e){
// if(l->add) { l->value(); }
// if(r->add) { r->value(); }
l->mxv=max(l->mxv, mxv-l->add);
r->mxv=max(r->mxv, mxv-r->add);
l->add+=add;
r->add+=add;
}
add=0;
mxv=-LLINF;
} else if(mxv==-LLINF) {
v+=add;
if(s^e){
l->add+=add;
r->add+=add;
}
add=0;
} else {
v=max(v,mxv);
if(s^e){
l->mxv=max(l->mxv, mxv-l->add);
r->mxv=max(r->mxv, mxv-r->add);
}
mxv=-LLINF;
}
return v;
}
} *seg;
#define gc getchar_unlocked
void sdb in(ll &x) {
x=0; bool neg=0;
char ch=gc(); if(ch=='-') neg=1;
while(ch<'0'||ch>'9') { ch=gc();if(ch=='-') neg=1; }
while(ch>='0'&&ch<='9'){
x=(x<<3ll)+(x<<1ll)+ch-'0';
ch=gc();
}
if(neg) x=-x;
}
void sdb in(int &x) {
x=0; bool neg=0;
char ch=gc(); if(ch=='-') neg=1;
while(ch<'0'||ch>'9') { ch=gc();if(ch=='-') neg=1; }
while(ch>='0'&&ch<='9'){
x=(x<<3ll)+(x<<1ll)+ch-'0';
ch=gc();
}
if(neg) x=-x;
}
int sdb main()
{
FAST
in(n), in(m);
FOR(i,1,n) in(A[i].ct), in(A[i].bf), in(A[i].add);
FOR(i,1,m) in(B[i].ct), in(B[i].bf), in(B[i].add);
FOR(i,1,n) Asum[i]=Asum[i-1]+A[i].ct;
FOR(i,1,m) Bsum[i]=Bsum[i-1]+B[i].ct;
FOR(i,1,n) {
if(A[i].bf>=Asum[i]) {
points[upper_bound(Bsum+1, Bsum+m+1,A[i].bf-Asum[i])-(Bsum+1)+1-1].eb(i, A[i].add);
// cerr<<i<<": "<<upper_bound(Bsum+1, Bsum+m+1,A[i].bf-Asum[i])-(Bsum+1)+1-1<<' '<<i<<'\n';
}
}
FOR(i,1,m) { if(B[i].bf-Bsum[i]<0) continue; addback+=B[i].add;
ll y=i;
ll x=upper_bound(Asum+1, Asum+n+1, B[i].bf-Bsum[i])-(Asum+1)+1-1;
// assert(x>=0);
if(x+1<=n) {
points[y-1].eb(x+1, -B[i].add);
// cerr<<i<<": "<<y-1<<' '<<x+1<<'\n';
}
}
seg=new node(0,n);
FOR(col, 0, m) {
/* updates */
for(auto i:points[col]) {
seg->update(i.f, n, i.s);
}
/* */
if(col==m) continue;
// sort(all(points[col]));
for(auto i:points[col]) if(i.f) {
seg->mx(i.f, n, seg->rmq(i.f-1,i.f-1));
}
}
cout<<seg->rmq(n, n)+addback<<'\n';
}
Compilation message
dishes.cpp:42:2: warning: #warning "// FOR has been inclusive now!!!! && arr size" [-Wcpp]
#warning "// FOR has been inclusive now!!!! && arr size"
^~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
607 ms |
84324 KB |
Output is correct |
2 |
Correct |
568 ms |
83444 KB |
Output is correct |
3 |
Correct |
250 ms |
77924 KB |
Output is correct |
4 |
Correct |
429 ms |
80120 KB |
Output is correct |
5 |
Correct |
24 ms |
23800 KB |
Output is correct |
6 |
Correct |
507 ms |
81648 KB |
Output is correct |
7 |
Correct |
56 ms |
36984 KB |
Output is correct |
8 |
Correct |
207 ms |
65224 KB |
Output is correct |
9 |
Correct |
254 ms |
78944 KB |
Output is correct |
10 |
Correct |
601 ms |
78352 KB |
Output is correct |
11 |
Correct |
225 ms |
72288 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
23800 KB |
Output is correct |
2 |
Correct |
26 ms |
23928 KB |
Output is correct |
3 |
Correct |
23 ms |
23940 KB |
Output is correct |
4 |
Correct |
23 ms |
23928 KB |
Output is correct |
5 |
Correct |
23 ms |
23804 KB |
Output is correct |
6 |
Correct |
23 ms |
23800 KB |
Output is correct |
7 |
Correct |
27 ms |
23800 KB |
Output is correct |
8 |
Correct |
23 ms |
23800 KB |
Output is correct |
9 |
Correct |
28 ms |
23804 KB |
Output is correct |
10 |
Correct |
24 ms |
23860 KB |
Output is correct |
11 |
Correct |
28 ms |
23796 KB |
Output is correct |
12 |
Correct |
25 ms |
23928 KB |
Output is correct |
13 |
Correct |
23 ms |
23800 KB |
Output is correct |
14 |
Correct |
28 ms |
23856 KB |
Output is correct |
15 |
Correct |
26 ms |
23800 KB |
Output is correct |
16 |
Correct |
23 ms |
23928 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
23800 KB |
Output is correct |
2 |
Correct |
26 ms |
23928 KB |
Output is correct |
3 |
Correct |
23 ms |
23940 KB |
Output is correct |
4 |
Correct |
23 ms |
23928 KB |
Output is correct |
5 |
Correct |
23 ms |
23804 KB |
Output is correct |
6 |
Correct |
23 ms |
23800 KB |
Output is correct |
7 |
Correct |
27 ms |
23800 KB |
Output is correct |
8 |
Correct |
23 ms |
23800 KB |
Output is correct |
9 |
Correct |
28 ms |
23804 KB |
Output is correct |
10 |
Correct |
24 ms |
23860 KB |
Output is correct |
11 |
Correct |
28 ms |
23796 KB |
Output is correct |
12 |
Correct |
25 ms |
23928 KB |
Output is correct |
13 |
Correct |
23 ms |
23800 KB |
Output is correct |
14 |
Correct |
28 ms |
23856 KB |
Output is correct |
15 |
Correct |
26 ms |
23800 KB |
Output is correct |
16 |
Correct |
23 ms |
23928 KB |
Output is correct |
17 |
Correct |
30 ms |
24448 KB |
Output is correct |
18 |
Correct |
26 ms |
24440 KB |
Output is correct |
19 |
Correct |
30 ms |
24400 KB |
Output is correct |
20 |
Correct |
32 ms |
24444 KB |
Output is correct |
21 |
Correct |
27 ms |
24444 KB |
Output is correct |
22 |
Correct |
28 ms |
24440 KB |
Output is correct |
23 |
Correct |
28 ms |
24380 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
23800 KB |
Output is correct |
2 |
Correct |
26 ms |
23928 KB |
Output is correct |
3 |
Correct |
23 ms |
23940 KB |
Output is correct |
4 |
Correct |
23 ms |
23928 KB |
Output is correct |
5 |
Correct |
23 ms |
23804 KB |
Output is correct |
6 |
Correct |
23 ms |
23800 KB |
Output is correct |
7 |
Correct |
27 ms |
23800 KB |
Output is correct |
8 |
Correct |
23 ms |
23800 KB |
Output is correct |
9 |
Correct |
28 ms |
23804 KB |
Output is correct |
10 |
Correct |
24 ms |
23860 KB |
Output is correct |
11 |
Correct |
28 ms |
23796 KB |
Output is correct |
12 |
Correct |
25 ms |
23928 KB |
Output is correct |
13 |
Correct |
23 ms |
23800 KB |
Output is correct |
14 |
Correct |
28 ms |
23856 KB |
Output is correct |
15 |
Correct |
26 ms |
23800 KB |
Output is correct |
16 |
Correct |
23 ms |
23928 KB |
Output is correct |
17 |
Correct |
30 ms |
24448 KB |
Output is correct |
18 |
Correct |
26 ms |
24440 KB |
Output is correct |
19 |
Correct |
30 ms |
24400 KB |
Output is correct |
20 |
Correct |
32 ms |
24444 KB |
Output is correct |
21 |
Correct |
27 ms |
24444 KB |
Output is correct |
22 |
Correct |
28 ms |
24440 KB |
Output is correct |
23 |
Correct |
28 ms |
24380 KB |
Output is correct |
24 |
Correct |
368 ms |
75236 KB |
Output is correct |
25 |
Correct |
453 ms |
79952 KB |
Output is correct |
26 |
Correct |
376 ms |
78328 KB |
Output is correct |
27 |
Correct |
437 ms |
80016 KB |
Output is correct |
28 |
Correct |
403 ms |
76992 KB |
Output is correct |
29 |
Correct |
237 ms |
75872 KB |
Output is correct |
30 |
Correct |
978 ms |
82064 KB |
Output is correct |
31 |
Correct |
73 ms |
38520 KB |
Output is correct |
32 |
Correct |
282 ms |
63616 KB |
Output is correct |
33 |
Correct |
554 ms |
76408 KB |
Output is correct |
34 |
Correct |
790 ms |
81200 KB |
Output is correct |
35 |
Correct |
952 ms |
75868 KB |
Output is correct |
36 |
Correct |
975 ms |
75488 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
23800 KB |
Output is correct |
2 |
Correct |
26 ms |
23928 KB |
Output is correct |
3 |
Correct |
23 ms |
23940 KB |
Output is correct |
4 |
Correct |
23 ms |
23928 KB |
Output is correct |
5 |
Correct |
23 ms |
23804 KB |
Output is correct |
6 |
Correct |
23 ms |
23800 KB |
Output is correct |
7 |
Correct |
27 ms |
23800 KB |
Output is correct |
8 |
Correct |
23 ms |
23800 KB |
Output is correct |
9 |
Correct |
28 ms |
23804 KB |
Output is correct |
10 |
Correct |
24 ms |
23860 KB |
Output is correct |
11 |
Correct |
28 ms |
23796 KB |
Output is correct |
12 |
Correct |
25 ms |
23928 KB |
Output is correct |
13 |
Correct |
23 ms |
23800 KB |
Output is correct |
14 |
Correct |
28 ms |
23856 KB |
Output is correct |
15 |
Correct |
26 ms |
23800 KB |
Output is correct |
16 |
Correct |
23 ms |
23928 KB |
Output is correct |
17 |
Correct |
30 ms |
24448 KB |
Output is correct |
18 |
Correct |
26 ms |
24440 KB |
Output is correct |
19 |
Correct |
30 ms |
24400 KB |
Output is correct |
20 |
Correct |
32 ms |
24444 KB |
Output is correct |
21 |
Correct |
27 ms |
24444 KB |
Output is correct |
22 |
Correct |
28 ms |
24440 KB |
Output is correct |
23 |
Correct |
28 ms |
24380 KB |
Output is correct |
24 |
Correct |
368 ms |
75236 KB |
Output is correct |
25 |
Correct |
453 ms |
79952 KB |
Output is correct |
26 |
Correct |
376 ms |
78328 KB |
Output is correct |
27 |
Correct |
437 ms |
80016 KB |
Output is correct |
28 |
Correct |
403 ms |
76992 KB |
Output is correct |
29 |
Correct |
237 ms |
75872 KB |
Output is correct |
30 |
Correct |
978 ms |
82064 KB |
Output is correct |
31 |
Correct |
73 ms |
38520 KB |
Output is correct |
32 |
Correct |
282 ms |
63616 KB |
Output is correct |
33 |
Correct |
554 ms |
76408 KB |
Output is correct |
34 |
Correct |
790 ms |
81200 KB |
Output is correct |
35 |
Correct |
952 ms |
75868 KB |
Output is correct |
36 |
Correct |
975 ms |
75488 KB |
Output is correct |
37 |
Correct |
383 ms |
81404 KB |
Output is correct |
38 |
Correct |
438 ms |
82920 KB |
Output is correct |
39 |
Correct |
611 ms |
81968 KB |
Output is correct |
40 |
Correct |
611 ms |
81860 KB |
Output is correct |
41 |
Correct |
23 ms |
23800 KB |
Output is correct |
42 |
Correct |
987 ms |
85100 KB |
Output is correct |
43 |
Correct |
542 ms |
79244 KB |
Output is correct |
44 |
Correct |
785 ms |
83688 KB |
Output is correct |
45 |
Correct |
972 ms |
78788 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
23800 KB |
Output is correct |
2 |
Correct |
26 ms |
23928 KB |
Output is correct |
3 |
Correct |
23 ms |
23940 KB |
Output is correct |
4 |
Correct |
23 ms |
23928 KB |
Output is correct |
5 |
Correct |
23 ms |
23804 KB |
Output is correct |
6 |
Correct |
23 ms |
23800 KB |
Output is correct |
7 |
Correct |
27 ms |
23800 KB |
Output is correct |
8 |
Correct |
23 ms |
23800 KB |
Output is correct |
9 |
Correct |
28 ms |
23804 KB |
Output is correct |
10 |
Correct |
24 ms |
23860 KB |
Output is correct |
11 |
Correct |
28 ms |
23796 KB |
Output is correct |
12 |
Correct |
25 ms |
23928 KB |
Output is correct |
13 |
Correct |
23 ms |
23800 KB |
Output is correct |
14 |
Correct |
28 ms |
23856 KB |
Output is correct |
15 |
Correct |
26 ms |
23800 KB |
Output is correct |
16 |
Correct |
23 ms |
23928 KB |
Output is correct |
17 |
Correct |
30 ms |
24448 KB |
Output is correct |
18 |
Correct |
26 ms |
24440 KB |
Output is correct |
19 |
Correct |
30 ms |
24400 KB |
Output is correct |
20 |
Correct |
32 ms |
24444 KB |
Output is correct |
21 |
Correct |
27 ms |
24444 KB |
Output is correct |
22 |
Correct |
28 ms |
24440 KB |
Output is correct |
23 |
Correct |
28 ms |
24380 KB |
Output is correct |
24 |
Correct |
368 ms |
75236 KB |
Output is correct |
25 |
Correct |
453 ms |
79952 KB |
Output is correct |
26 |
Correct |
376 ms |
78328 KB |
Output is correct |
27 |
Correct |
437 ms |
80016 KB |
Output is correct |
28 |
Correct |
403 ms |
76992 KB |
Output is correct |
29 |
Correct |
237 ms |
75872 KB |
Output is correct |
30 |
Correct |
978 ms |
82064 KB |
Output is correct |
31 |
Correct |
73 ms |
38520 KB |
Output is correct |
32 |
Correct |
282 ms |
63616 KB |
Output is correct |
33 |
Correct |
554 ms |
76408 KB |
Output is correct |
34 |
Correct |
790 ms |
81200 KB |
Output is correct |
35 |
Correct |
952 ms |
75868 KB |
Output is correct |
36 |
Correct |
975 ms |
75488 KB |
Output is correct |
37 |
Correct |
383 ms |
81404 KB |
Output is correct |
38 |
Correct |
438 ms |
82920 KB |
Output is correct |
39 |
Correct |
611 ms |
81968 KB |
Output is correct |
40 |
Correct |
611 ms |
81860 KB |
Output is correct |
41 |
Correct |
23 ms |
23800 KB |
Output is correct |
42 |
Correct |
987 ms |
85100 KB |
Output is correct |
43 |
Correct |
542 ms |
79244 KB |
Output is correct |
44 |
Correct |
785 ms |
83688 KB |
Output is correct |
45 |
Correct |
972 ms |
78788 KB |
Output is correct |
46 |
Correct |
1950 ms |
312952 KB |
Output is correct |
47 |
Correct |
2285 ms |
320880 KB |
Output is correct |
48 |
Correct |
3232 ms |
314980 KB |
Output is correct |
49 |
Correct |
3256 ms |
315000 KB |
Output is correct |
50 |
Correct |
6312 ms |
331512 KB |
Output is correct |
51 |
Correct |
3360 ms |
294116 KB |
Output is correct |
52 |
Correct |
4618 ms |
317112 KB |
Output is correct |
53 |
Correct |
6154 ms |
299096 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
607 ms |
84324 KB |
Output is correct |
2 |
Correct |
568 ms |
83444 KB |
Output is correct |
3 |
Correct |
250 ms |
77924 KB |
Output is correct |
4 |
Correct |
429 ms |
80120 KB |
Output is correct |
5 |
Correct |
24 ms |
23800 KB |
Output is correct |
6 |
Correct |
507 ms |
81648 KB |
Output is correct |
7 |
Correct |
56 ms |
36984 KB |
Output is correct |
8 |
Correct |
207 ms |
65224 KB |
Output is correct |
9 |
Correct |
254 ms |
78944 KB |
Output is correct |
10 |
Correct |
601 ms |
78352 KB |
Output is correct |
11 |
Correct |
225 ms |
72288 KB |
Output is correct |
12 |
Correct |
27 ms |
23800 KB |
Output is correct |
13 |
Correct |
26 ms |
23928 KB |
Output is correct |
14 |
Correct |
23 ms |
23940 KB |
Output is correct |
15 |
Correct |
23 ms |
23928 KB |
Output is correct |
16 |
Correct |
23 ms |
23804 KB |
Output is correct |
17 |
Correct |
23 ms |
23800 KB |
Output is correct |
18 |
Correct |
27 ms |
23800 KB |
Output is correct |
19 |
Correct |
23 ms |
23800 KB |
Output is correct |
20 |
Correct |
28 ms |
23804 KB |
Output is correct |
21 |
Correct |
24 ms |
23860 KB |
Output is correct |
22 |
Correct |
28 ms |
23796 KB |
Output is correct |
23 |
Correct |
25 ms |
23928 KB |
Output is correct |
24 |
Correct |
23 ms |
23800 KB |
Output is correct |
25 |
Correct |
28 ms |
23856 KB |
Output is correct |
26 |
Correct |
26 ms |
23800 KB |
Output is correct |
27 |
Correct |
23 ms |
23928 KB |
Output is correct |
28 |
Correct |
30 ms |
24448 KB |
Output is correct |
29 |
Correct |
26 ms |
24440 KB |
Output is correct |
30 |
Correct |
30 ms |
24400 KB |
Output is correct |
31 |
Correct |
32 ms |
24444 KB |
Output is correct |
32 |
Correct |
27 ms |
24444 KB |
Output is correct |
33 |
Correct |
28 ms |
24440 KB |
Output is correct |
34 |
Correct |
28 ms |
24380 KB |
Output is correct |
35 |
Correct |
368 ms |
75236 KB |
Output is correct |
36 |
Correct |
453 ms |
79952 KB |
Output is correct |
37 |
Correct |
376 ms |
78328 KB |
Output is correct |
38 |
Correct |
437 ms |
80016 KB |
Output is correct |
39 |
Correct |
403 ms |
76992 KB |
Output is correct |
40 |
Correct |
237 ms |
75872 KB |
Output is correct |
41 |
Correct |
978 ms |
82064 KB |
Output is correct |
42 |
Correct |
73 ms |
38520 KB |
Output is correct |
43 |
Correct |
282 ms |
63616 KB |
Output is correct |
44 |
Correct |
554 ms |
76408 KB |
Output is correct |
45 |
Correct |
790 ms |
81200 KB |
Output is correct |
46 |
Correct |
952 ms |
75868 KB |
Output is correct |
47 |
Correct |
975 ms |
75488 KB |
Output is correct |
48 |
Correct |
383 ms |
81404 KB |
Output is correct |
49 |
Correct |
438 ms |
82920 KB |
Output is correct |
50 |
Correct |
611 ms |
81968 KB |
Output is correct |
51 |
Correct |
611 ms |
81860 KB |
Output is correct |
52 |
Correct |
23 ms |
23800 KB |
Output is correct |
53 |
Correct |
987 ms |
85100 KB |
Output is correct |
54 |
Correct |
542 ms |
79244 KB |
Output is correct |
55 |
Correct |
785 ms |
83688 KB |
Output is correct |
56 |
Correct |
972 ms |
78788 KB |
Output is correct |
57 |
Correct |
378 ms |
81872 KB |
Output is correct |
58 |
Correct |
441 ms |
83352 KB |
Output is correct |
59 |
Correct |
621 ms |
82936 KB |
Output is correct |
60 |
Correct |
616 ms |
82856 KB |
Output is correct |
61 |
Correct |
988 ms |
82424 KB |
Output is correct |
62 |
Correct |
25 ms |
23928 KB |
Output is correct |
63 |
Correct |
1002 ms |
85232 KB |
Output is correct |
64 |
Correct |
585 ms |
80032 KB |
Output is correct |
65 |
Correct |
768 ms |
82156 KB |
Output is correct |
66 |
Correct |
936 ms |
78636 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
607 ms |
84324 KB |
Output is correct |
2 |
Correct |
568 ms |
83444 KB |
Output is correct |
3 |
Correct |
250 ms |
77924 KB |
Output is correct |
4 |
Correct |
429 ms |
80120 KB |
Output is correct |
5 |
Correct |
24 ms |
23800 KB |
Output is correct |
6 |
Correct |
507 ms |
81648 KB |
Output is correct |
7 |
Correct |
56 ms |
36984 KB |
Output is correct |
8 |
Correct |
207 ms |
65224 KB |
Output is correct |
9 |
Correct |
254 ms |
78944 KB |
Output is correct |
10 |
Correct |
601 ms |
78352 KB |
Output is correct |
11 |
Correct |
225 ms |
72288 KB |
Output is correct |
12 |
Correct |
27 ms |
23800 KB |
Output is correct |
13 |
Correct |
26 ms |
23928 KB |
Output is correct |
14 |
Correct |
23 ms |
23940 KB |
Output is correct |
15 |
Correct |
23 ms |
23928 KB |
Output is correct |
16 |
Correct |
23 ms |
23804 KB |
Output is correct |
17 |
Correct |
23 ms |
23800 KB |
Output is correct |
18 |
Correct |
27 ms |
23800 KB |
Output is correct |
19 |
Correct |
23 ms |
23800 KB |
Output is correct |
20 |
Correct |
28 ms |
23804 KB |
Output is correct |
21 |
Correct |
24 ms |
23860 KB |
Output is correct |
22 |
Correct |
28 ms |
23796 KB |
Output is correct |
23 |
Correct |
25 ms |
23928 KB |
Output is correct |
24 |
Correct |
23 ms |
23800 KB |
Output is correct |
25 |
Correct |
28 ms |
23856 KB |
Output is correct |
26 |
Correct |
26 ms |
23800 KB |
Output is correct |
27 |
Correct |
23 ms |
23928 KB |
Output is correct |
28 |
Correct |
30 ms |
24448 KB |
Output is correct |
29 |
Correct |
26 ms |
24440 KB |
Output is correct |
30 |
Correct |
30 ms |
24400 KB |
Output is correct |
31 |
Correct |
32 ms |
24444 KB |
Output is correct |
32 |
Correct |
27 ms |
24444 KB |
Output is correct |
33 |
Correct |
28 ms |
24440 KB |
Output is correct |
34 |
Correct |
28 ms |
24380 KB |
Output is correct |
35 |
Correct |
368 ms |
75236 KB |
Output is correct |
36 |
Correct |
453 ms |
79952 KB |
Output is correct |
37 |
Correct |
376 ms |
78328 KB |
Output is correct |
38 |
Correct |
437 ms |
80016 KB |
Output is correct |
39 |
Correct |
403 ms |
76992 KB |
Output is correct |
40 |
Correct |
237 ms |
75872 KB |
Output is correct |
41 |
Correct |
978 ms |
82064 KB |
Output is correct |
42 |
Correct |
73 ms |
38520 KB |
Output is correct |
43 |
Correct |
282 ms |
63616 KB |
Output is correct |
44 |
Correct |
554 ms |
76408 KB |
Output is correct |
45 |
Correct |
790 ms |
81200 KB |
Output is correct |
46 |
Correct |
952 ms |
75868 KB |
Output is correct |
47 |
Correct |
975 ms |
75488 KB |
Output is correct |
48 |
Correct |
383 ms |
81404 KB |
Output is correct |
49 |
Correct |
438 ms |
82920 KB |
Output is correct |
50 |
Correct |
611 ms |
81968 KB |
Output is correct |
51 |
Correct |
611 ms |
81860 KB |
Output is correct |
52 |
Correct |
23 ms |
23800 KB |
Output is correct |
53 |
Correct |
987 ms |
85100 KB |
Output is correct |
54 |
Correct |
542 ms |
79244 KB |
Output is correct |
55 |
Correct |
785 ms |
83688 KB |
Output is correct |
56 |
Correct |
972 ms |
78788 KB |
Output is correct |
57 |
Correct |
1950 ms |
312952 KB |
Output is correct |
58 |
Correct |
2285 ms |
320880 KB |
Output is correct |
59 |
Correct |
3232 ms |
314980 KB |
Output is correct |
60 |
Correct |
3256 ms |
315000 KB |
Output is correct |
61 |
Correct |
6312 ms |
331512 KB |
Output is correct |
62 |
Correct |
3360 ms |
294116 KB |
Output is correct |
63 |
Correct |
4618 ms |
317112 KB |
Output is correct |
64 |
Correct |
6154 ms |
299096 KB |
Output is correct |
65 |
Correct |
378 ms |
81872 KB |
Output is correct |
66 |
Correct |
441 ms |
83352 KB |
Output is correct |
67 |
Correct |
621 ms |
82936 KB |
Output is correct |
68 |
Correct |
616 ms |
82856 KB |
Output is correct |
69 |
Correct |
988 ms |
82424 KB |
Output is correct |
70 |
Correct |
25 ms |
23928 KB |
Output is correct |
71 |
Correct |
1002 ms |
85232 KB |
Output is correct |
72 |
Correct |
585 ms |
80032 KB |
Output is correct |
73 |
Correct |
768 ms |
82156 KB |
Output is correct |
74 |
Correct |
936 ms |
78636 KB |
Output is correct |
75 |
Correct |
1968 ms |
312672 KB |
Output is correct |
76 |
Correct |
2314 ms |
322460 KB |
Output is correct |
77 |
Correct |
3299 ms |
316268 KB |
Output is correct |
78 |
Correct |
3257 ms |
317516 KB |
Output is correct |
79 |
Correct |
6442 ms |
332128 KB |
Output is correct |
80 |
Correct |
3268 ms |
301840 KB |
Output is correct |
81 |
Correct |
4420 ms |
302048 KB |
Output is correct |
82 |
Correct |
6011 ms |
299824 KB |
Output is correct |
83 |
Correct |
5940 ms |
317672 KB |
Output is correct |