#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <deque>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define REP(i,a,b) for(ll i=a; i<b; i++)
#define pb push_back
#define mp make_pair
#define pl pair<ll,ll>
#define ff first
#define ss second
#define INF 100000000000000000LL
ll insig;
#define In(vecBRO, LENBRO) REP(IBRO,0,LENBRO) {cin>>insig; vecBRO.pb(insig);}
void Out(vector<ll> x) {REP(i,0,x.size()) {cout<<x[i]<<" ";} cout<<endl;}
class ST
{
public:
ll N;
class SV //seg value
{
public:
ll a;
SV() {a=-INF;}
SV(ll x) {a=x;}
};
class LV //lazy value
{
public:
ll a;
LV() {a=0LL;}
LV(ll x) {a=x;}
};
SV op(SV A, SV B) //how seg values interact
{
SV X(max(A.a,B.a));
return X;
}
SV upval(ll c, ll x, ll y) //how lazy values modify a seg value, c=current node ,[x,y]=interval acting
{
SV X(p[c].a+lazy[c].a);
return X;
}
LV inter(LV A,LV B) //how lazy values interact
{
LV X(A.a+B.a);
return X;
}
SV neuts; LV neutl;
vector<SV> ar; vector<SV> p;
vector<LV> lazy;
ST(vector<ll> arr)
{
N = (ll) 1<<(ll) ceil(log2(arr.size()));
REP(i,0,arr.size()) {SV X(arr[i]); ar.pb(X);}
REP(i,arr.size(),N) {ar.pb(neuts);}
REP(i,0,N) {p.pb(neuts);}
REP(i,0,N) {p.pb(ar[i]);}
ll cur = N-1;
while(cur>0)
{
p[cur]=op(p[2*cur],p[2*cur+1]);
cur--;
}
REP(i,0,2*N) {lazy.pb(neutl);}
}
void prop(ll c, ll x, ll y) //how lazy values propagate
{
p[c]=upval(c,x,y);
lazy[2*c]=inter(lazy[c],lazy[2*c]); lazy[2*c+1]=inter(lazy[c],lazy[2*c+1]);
lazy[c]=neutl;
if(2*c>=N)
{
p[2*c]=upval(2*c,2*c,2*c); p[2*c+1]=upval(2*c+1,2*c+1,2*c+1);
ar[2*c-N]=p[2*c];
ar[2*c+1-N]=p[2*c+1];
lazy[2*c]=neutl; lazy[2*c+1]=neutl;
}
}
SV query(ll a,ll b, ll c, ll x, ll y) //c=current node, starting in 1, a,b=range of query, x,y=range of node c in the array down, x,y from 0 to N-1. query(a,b)->query(a,b,1,0,N-1)
{
if(y<a || x>b) {return neuts;}
if(x>=a && y<=b) {return upval(c,x,y);}
prop(c,x,y);
ll mid=(x+y)/2;
SV ans = op(query(a,b,2*c,x,mid),query(a,b,2*c+1,mid+1,y));
return ans;
}
void update(LV s, ll a, ll b, ll c, ll x, ll y) //positions in [a,b] from 0 to N-1 gets +s
{
if(y<a || x>b) {return ;}
if(x>=a && y<=b)
{
lazy[c]=inter(s,lazy[c]);
if(c>=N) {p[c]=upval(c,c,c); lazy[c]=neutl; ar[c-N]=p[c];}
return;
}
ll mid=(x+y)/2;
update(s,a,b,2*c,x,mid); update(s,a,b,2*c+1,mid+1,y);
p[c]=op(upval(2*c,x,mid),upval(2*c+1,mid+1,y));
}
};
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
ll N,D; cin>>N>>D; vector<ll> xx; xx.pb(0LL); xx.pb(0LL); xx.pb(0LL); vector<vector<ll> > Sta;
REP(i,0,N) {cin>>xx[0]>>xx[1]>>xx[2]; Sta.pb(xx);}
sort(Sta.begin(),Sta.end());
vector<ll> X,A,B; REP(i,0,N) {X.pb(Sta[i][0]); A.pb(Sta[i][1]); B.pb(Sta[i][2]);}
map<ll,vector<ll> > m;
REP(i,0,N)
{
m[B[i]].pb(i);
}
set<ll> bvals; REP(i,0,N) {bvals.insert(B[i]);}
vector<ll> Sbeg; ll psA=0LL;
REP(i,0,N) {Sbeg.pb(X[i]-psA); psA+=A[i];}
Sbeg.pb(D-psA);
ST S(Sbeg);
set<ll>::iterator it=bvals.begin();
ll ans=D;
while(it!=bvals.end())
{
if(it!=bvals.begin())
{
it--;
REP(i,0,m[*it].size())
{
ll ind=m[*it][i];
ST::LV U(A[ind]);
S.update(U,ind+1LL,S.N-1,1LL,0LL,S.N-1LL);
}
it++;
}
ll curans=S.query(0LL,S.N-1,1,0,S.N-1).a;
if(curans<=*it) {ans=min(ans,curans);}
it++;
}
cout<<ans<<endl;
return 0;
}
Compilation message
FuelStation.cpp: In function 'void Out(std::vector<long long int>)':
FuelStation.cpp:14:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
14 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
23 | void Out(vector<ll> x) {REP(i,0,x.size()) {cout<<x[i]<<" ";} cout<<endl;}
| ~~~~~~~~~~~~
FuelStation.cpp:23:25: note: in expansion of macro 'REP'
23 | void Out(vector<ll> x) {REP(i,0,x.size()) {cout<<x[i]<<" ";} cout<<endl;}
| ^~~
FuelStation.cpp: In constructor 'ST::ST(std::vector<long long int>)':
FuelStation.cpp:14:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
14 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
72 | REP(i,0,arr.size()) {SV X(arr[i]); ar.pb(X);}
| ~~~~~~~~~~~~~~
FuelStation.cpp:72:9: note: in expansion of macro 'REP'
72 | REP(i,0,arr.size()) {SV X(arr[i]); ar.pb(X);}
| ^~~
FuelStation.cpp: In function 'int main()':
FuelStation.cpp:14:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
14 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
149 | REP(i,0,m[*it].size())
| ~~~~~~~~~~~~~~~~~
FuelStation.cpp:149:13: note: in expansion of macro 'REP'
149 | REP(i,0,m[*it].size())
| ^~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
3 |
Correct |
1 ms |
364 KB |
Output is correct |
4 |
Correct |
1 ms |
364 KB |
Output is correct |
5 |
Correct |
1 ms |
364 KB |
Output is correct |
6 |
Correct |
1 ms |
364 KB |
Output is correct |
7 |
Correct |
1 ms |
364 KB |
Output is correct |
8 |
Correct |
1 ms |
364 KB |
Output is correct |
9 |
Correct |
1 ms |
364 KB |
Output is correct |
10 |
Correct |
1 ms |
364 KB |
Output is correct |
11 |
Correct |
1 ms |
364 KB |
Output is correct |
12 |
Correct |
1 ms |
364 KB |
Output is correct |
13 |
Correct |
1 ms |
364 KB |
Output is correct |
14 |
Correct |
1 ms |
364 KB |
Output is correct |
15 |
Correct |
1 ms |
364 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
304 ms |
70784 KB |
Output is correct |
2 |
Correct |
297 ms |
70528 KB |
Output is correct |
3 |
Correct |
300 ms |
70528 KB |
Output is correct |
4 |
Correct |
302 ms |
70796 KB |
Output is correct |
5 |
Correct |
321 ms |
71168 KB |
Output is correct |
6 |
Correct |
299 ms |
69912 KB |
Output is correct |
7 |
Correct |
300 ms |
70016 KB |
Output is correct |
8 |
Correct |
303 ms |
70672 KB |
Output is correct |
9 |
Correct |
301 ms |
71296 KB |
Output is correct |
10 |
Correct |
296 ms |
70044 KB |
Output is correct |
11 |
Correct |
296 ms |
69888 KB |
Output is correct |
12 |
Correct |
303 ms |
70528 KB |
Output is correct |
13 |
Correct |
294 ms |
70016 KB |
Output is correct |
14 |
Correct |
295 ms |
70672 KB |
Output is correct |
15 |
Correct |
294 ms |
70528 KB |
Output is correct |
16 |
Correct |
304 ms |
71212 KB |
Output is correct |
17 |
Correct |
302 ms |
71176 KB |
Output is correct |
18 |
Correct |
296 ms |
70528 KB |
Output is correct |
19 |
Correct |
299 ms |
70656 KB |
Output is correct |
20 |
Correct |
298 ms |
70656 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
12 ms |
2600 KB |
Output is correct |
3 |
Correct |
12 ms |
2600 KB |
Output is correct |
4 |
Correct |
12 ms |
2600 KB |
Output is correct |
5 |
Correct |
12 ms |
2728 KB |
Output is correct |
6 |
Correct |
17 ms |
3752 KB |
Output is correct |
7 |
Correct |
18 ms |
3880 KB |
Output is correct |
8 |
Correct |
1 ms |
364 KB |
Output is correct |
9 |
Correct |
1 ms |
364 KB |
Output is correct |
10 |
Correct |
1 ms |
364 KB |
Output is correct |
11 |
Correct |
1 ms |
364 KB |
Output is correct |
12 |
Correct |
1 ms |
364 KB |
Output is correct |
13 |
Correct |
1 ms |
364 KB |
Output is correct |
14 |
Correct |
16 ms |
3368 KB |
Output is correct |
15 |
Correct |
17 ms |
3368 KB |
Output is correct |
16 |
Correct |
16 ms |
3240 KB |
Output is correct |
17 |
Correct |
15 ms |
3112 KB |
Output is correct |
18 |
Correct |
15 ms |
2984 KB |
Output is correct |
19 |
Correct |
12 ms |
2600 KB |
Output is correct |
20 |
Correct |
7 ms |
2472 KB |
Output is correct |
21 |
Correct |
7 ms |
2472 KB |
Output is correct |
22 |
Correct |
10 ms |
2600 KB |
Output is correct |
23 |
Correct |
10 ms |
2472 KB |
Output is correct |
24 |
Correct |
12 ms |
2728 KB |
Output is correct |
25 |
Correct |
10 ms |
2472 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
12 ms |
2600 KB |
Output is correct |
3 |
Correct |
12 ms |
2600 KB |
Output is correct |
4 |
Correct |
12 ms |
2600 KB |
Output is correct |
5 |
Correct |
12 ms |
2728 KB |
Output is correct |
6 |
Correct |
17 ms |
3752 KB |
Output is correct |
7 |
Correct |
18 ms |
3880 KB |
Output is correct |
8 |
Correct |
1 ms |
364 KB |
Output is correct |
9 |
Correct |
1 ms |
364 KB |
Output is correct |
10 |
Correct |
1 ms |
364 KB |
Output is correct |
11 |
Correct |
1 ms |
364 KB |
Output is correct |
12 |
Correct |
1 ms |
364 KB |
Output is correct |
13 |
Correct |
1 ms |
364 KB |
Output is correct |
14 |
Correct |
16 ms |
3368 KB |
Output is correct |
15 |
Correct |
17 ms |
3368 KB |
Output is correct |
16 |
Correct |
16 ms |
3240 KB |
Output is correct |
17 |
Correct |
15 ms |
3112 KB |
Output is correct |
18 |
Correct |
15 ms |
2984 KB |
Output is correct |
19 |
Correct |
12 ms |
2600 KB |
Output is correct |
20 |
Correct |
7 ms |
2472 KB |
Output is correct |
21 |
Correct |
7 ms |
2472 KB |
Output is correct |
22 |
Correct |
10 ms |
2600 KB |
Output is correct |
23 |
Correct |
10 ms |
2472 KB |
Output is correct |
24 |
Correct |
12 ms |
2728 KB |
Output is correct |
25 |
Correct |
10 ms |
2472 KB |
Output is correct |
26 |
Correct |
1 ms |
364 KB |
Output is correct |
27 |
Correct |
515 ms |
68992 KB |
Output is correct |
28 |
Correct |
501 ms |
68116 KB |
Output is correct |
29 |
Correct |
493 ms |
67712 KB |
Output is correct |
30 |
Correct |
495 ms |
67840 KB |
Output is correct |
31 |
Correct |
572 ms |
70656 KB |
Output is correct |
32 |
Correct |
569 ms |
70444 KB |
Output is correct |
33 |
Correct |
1 ms |
364 KB |
Output is correct |
34 |
Correct |
1 ms |
364 KB |
Output is correct |
35 |
Correct |
1 ms |
364 KB |
Output is correct |
36 |
Correct |
1 ms |
364 KB |
Output is correct |
37 |
Correct |
1 ms |
364 KB |
Output is correct |
38 |
Correct |
1 ms |
364 KB |
Output is correct |
39 |
Correct |
589 ms |
69632 KB |
Output is correct |
40 |
Correct |
579 ms |
69504 KB |
Output is correct |
41 |
Correct |
597 ms |
69632 KB |
Output is correct |
42 |
Correct |
588 ms |
69632 KB |
Output is correct |
43 |
Correct |
557 ms |
68740 KB |
Output is correct |
44 |
Correct |
458 ms |
69760 KB |
Output is correct |
45 |
Correct |
393 ms |
67544 KB |
Output is correct |
46 |
Correct |
580 ms |
68864 KB |
Output is correct |
47 |
Correct |
283 ms |
67968 KB |
Output is correct |
48 |
Correct |
283 ms |
67976 KB |
Output is correct |
49 |
Correct |
483 ms |
68332 KB |
Output is correct |
50 |
Correct |
488 ms |
68736 KB |
Output is correct |
51 |
Correct |
485 ms |
68736 KB |
Output is correct |
52 |
Correct |
497 ms |
68480 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
3 |
Correct |
1 ms |
364 KB |
Output is correct |
4 |
Correct |
1 ms |
364 KB |
Output is correct |
5 |
Correct |
1 ms |
364 KB |
Output is correct |
6 |
Correct |
1 ms |
364 KB |
Output is correct |
7 |
Correct |
1 ms |
364 KB |
Output is correct |
8 |
Correct |
1 ms |
364 KB |
Output is correct |
9 |
Correct |
1 ms |
364 KB |
Output is correct |
10 |
Correct |
1 ms |
364 KB |
Output is correct |
11 |
Correct |
1 ms |
364 KB |
Output is correct |
12 |
Correct |
1 ms |
364 KB |
Output is correct |
13 |
Correct |
1 ms |
364 KB |
Output is correct |
14 |
Correct |
1 ms |
364 KB |
Output is correct |
15 |
Correct |
1 ms |
364 KB |
Output is correct |
16 |
Correct |
1 ms |
364 KB |
Output is correct |
17 |
Correct |
1 ms |
364 KB |
Output is correct |
18 |
Correct |
1 ms |
364 KB |
Output is correct |
19 |
Correct |
1 ms |
364 KB |
Output is correct |
20 |
Correct |
1 ms |
364 KB |
Output is correct |
21 |
Correct |
1 ms |
364 KB |
Output is correct |
22 |
Correct |
1 ms |
364 KB |
Output is correct |
23 |
Correct |
1 ms |
364 KB |
Output is correct |
24 |
Correct |
1 ms |
364 KB |
Output is correct |
25 |
Correct |
1 ms |
364 KB |
Output is correct |
26 |
Correct |
1 ms |
364 KB |
Output is correct |
27 |
Correct |
1 ms |
364 KB |
Output is correct |
28 |
Correct |
1 ms |
364 KB |
Output is correct |
29 |
Correct |
1 ms |
364 KB |
Output is correct |
30 |
Correct |
1 ms |
364 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
3 |
Correct |
1 ms |
364 KB |
Output is correct |
4 |
Correct |
1 ms |
364 KB |
Output is correct |
5 |
Correct |
1 ms |
364 KB |
Output is correct |
6 |
Correct |
1 ms |
364 KB |
Output is correct |
7 |
Correct |
1 ms |
364 KB |
Output is correct |
8 |
Correct |
1 ms |
364 KB |
Output is correct |
9 |
Correct |
1 ms |
364 KB |
Output is correct |
10 |
Correct |
1 ms |
364 KB |
Output is correct |
11 |
Correct |
1 ms |
364 KB |
Output is correct |
12 |
Correct |
1 ms |
364 KB |
Output is correct |
13 |
Correct |
1 ms |
364 KB |
Output is correct |
14 |
Correct |
1 ms |
364 KB |
Output is correct |
15 |
Correct |
1 ms |
364 KB |
Output is correct |
16 |
Correct |
1 ms |
364 KB |
Output is correct |
17 |
Correct |
12 ms |
2600 KB |
Output is correct |
18 |
Correct |
12 ms |
2600 KB |
Output is correct |
19 |
Correct |
12 ms |
2600 KB |
Output is correct |
20 |
Correct |
12 ms |
2728 KB |
Output is correct |
21 |
Correct |
17 ms |
3752 KB |
Output is correct |
22 |
Correct |
18 ms |
3880 KB |
Output is correct |
23 |
Correct |
1 ms |
364 KB |
Output is correct |
24 |
Correct |
1 ms |
364 KB |
Output is correct |
25 |
Correct |
1 ms |
364 KB |
Output is correct |
26 |
Correct |
1 ms |
364 KB |
Output is correct |
27 |
Correct |
1 ms |
364 KB |
Output is correct |
28 |
Correct |
1 ms |
364 KB |
Output is correct |
29 |
Correct |
16 ms |
3368 KB |
Output is correct |
30 |
Correct |
17 ms |
3368 KB |
Output is correct |
31 |
Correct |
16 ms |
3240 KB |
Output is correct |
32 |
Correct |
15 ms |
3112 KB |
Output is correct |
33 |
Correct |
15 ms |
2984 KB |
Output is correct |
34 |
Correct |
12 ms |
2600 KB |
Output is correct |
35 |
Correct |
7 ms |
2472 KB |
Output is correct |
36 |
Correct |
7 ms |
2472 KB |
Output is correct |
37 |
Correct |
10 ms |
2600 KB |
Output is correct |
38 |
Correct |
10 ms |
2472 KB |
Output is correct |
39 |
Correct |
12 ms |
2728 KB |
Output is correct |
40 |
Correct |
10 ms |
2472 KB |
Output is correct |
41 |
Correct |
1 ms |
364 KB |
Output is correct |
42 |
Correct |
11 ms |
2600 KB |
Output is correct |
43 |
Correct |
19 ms |
4136 KB |
Output is correct |
44 |
Correct |
20 ms |
4136 KB |
Output is correct |
45 |
Correct |
19 ms |
4136 KB |
Output is correct |
46 |
Correct |
20 ms |
4136 KB |
Output is correct |
47 |
Correct |
19 ms |
4136 KB |
Output is correct |
48 |
Correct |
1 ms |
364 KB |
Output is correct |
49 |
Correct |
1 ms |
364 KB |
Output is correct |
50 |
Correct |
1 ms |
364 KB |
Output is correct |
51 |
Correct |
1 ms |
364 KB |
Output is correct |
52 |
Correct |
1 ms |
364 KB |
Output is correct |
53 |
Correct |
1 ms |
364 KB |
Output is correct |
54 |
Correct |
19 ms |
4136 KB |
Output is correct |
55 |
Correct |
19 ms |
4136 KB |
Output is correct |
56 |
Correct |
19 ms |
4136 KB |
Output is correct |
57 |
Correct |
20 ms |
4136 KB |
Output is correct |
58 |
Correct |
19 ms |
4136 KB |
Output is correct |
59 |
Correct |
11 ms |
2600 KB |
Output is correct |
60 |
Correct |
8 ms |
2600 KB |
Output is correct |
61 |
Correct |
8 ms |
2600 KB |
Output is correct |
62 |
Correct |
17 ms |
2856 KB |
Output is correct |
63 |
Correct |
12 ms |
2600 KB |
Output is correct |
64 |
Correct |
14 ms |
2856 KB |
Output is correct |
65 |
Correct |
11 ms |
2600 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
3 |
Correct |
1 ms |
364 KB |
Output is correct |
4 |
Correct |
1 ms |
364 KB |
Output is correct |
5 |
Correct |
1 ms |
364 KB |
Output is correct |
6 |
Correct |
1 ms |
364 KB |
Output is correct |
7 |
Correct |
1 ms |
364 KB |
Output is correct |
8 |
Correct |
1 ms |
364 KB |
Output is correct |
9 |
Correct |
1 ms |
364 KB |
Output is correct |
10 |
Correct |
1 ms |
364 KB |
Output is correct |
11 |
Correct |
1 ms |
364 KB |
Output is correct |
12 |
Correct |
1 ms |
364 KB |
Output is correct |
13 |
Correct |
1 ms |
364 KB |
Output is correct |
14 |
Correct |
1 ms |
364 KB |
Output is correct |
15 |
Correct |
1 ms |
364 KB |
Output is correct |
16 |
Correct |
304 ms |
70784 KB |
Output is correct |
17 |
Correct |
297 ms |
70528 KB |
Output is correct |
18 |
Correct |
300 ms |
70528 KB |
Output is correct |
19 |
Correct |
302 ms |
70796 KB |
Output is correct |
20 |
Correct |
321 ms |
71168 KB |
Output is correct |
21 |
Correct |
299 ms |
69912 KB |
Output is correct |
22 |
Correct |
300 ms |
70016 KB |
Output is correct |
23 |
Correct |
303 ms |
70672 KB |
Output is correct |
24 |
Correct |
301 ms |
71296 KB |
Output is correct |
25 |
Correct |
296 ms |
70044 KB |
Output is correct |
26 |
Correct |
296 ms |
69888 KB |
Output is correct |
27 |
Correct |
303 ms |
70528 KB |
Output is correct |
28 |
Correct |
294 ms |
70016 KB |
Output is correct |
29 |
Correct |
295 ms |
70672 KB |
Output is correct |
30 |
Correct |
294 ms |
70528 KB |
Output is correct |
31 |
Correct |
304 ms |
71212 KB |
Output is correct |
32 |
Correct |
302 ms |
71176 KB |
Output is correct |
33 |
Correct |
296 ms |
70528 KB |
Output is correct |
34 |
Correct |
299 ms |
70656 KB |
Output is correct |
35 |
Correct |
298 ms |
70656 KB |
Output is correct |
36 |
Correct |
1 ms |
364 KB |
Output is correct |
37 |
Correct |
12 ms |
2600 KB |
Output is correct |
38 |
Correct |
12 ms |
2600 KB |
Output is correct |
39 |
Correct |
12 ms |
2600 KB |
Output is correct |
40 |
Correct |
12 ms |
2728 KB |
Output is correct |
41 |
Correct |
17 ms |
3752 KB |
Output is correct |
42 |
Correct |
18 ms |
3880 KB |
Output is correct |
43 |
Correct |
1 ms |
364 KB |
Output is correct |
44 |
Correct |
1 ms |
364 KB |
Output is correct |
45 |
Correct |
1 ms |
364 KB |
Output is correct |
46 |
Correct |
1 ms |
364 KB |
Output is correct |
47 |
Correct |
1 ms |
364 KB |
Output is correct |
48 |
Correct |
1 ms |
364 KB |
Output is correct |
49 |
Correct |
16 ms |
3368 KB |
Output is correct |
50 |
Correct |
17 ms |
3368 KB |
Output is correct |
51 |
Correct |
16 ms |
3240 KB |
Output is correct |
52 |
Correct |
15 ms |
3112 KB |
Output is correct |
53 |
Correct |
15 ms |
2984 KB |
Output is correct |
54 |
Correct |
12 ms |
2600 KB |
Output is correct |
55 |
Correct |
7 ms |
2472 KB |
Output is correct |
56 |
Correct |
7 ms |
2472 KB |
Output is correct |
57 |
Correct |
10 ms |
2600 KB |
Output is correct |
58 |
Correct |
10 ms |
2472 KB |
Output is correct |
59 |
Correct |
12 ms |
2728 KB |
Output is correct |
60 |
Correct |
10 ms |
2472 KB |
Output is correct |
61 |
Correct |
1 ms |
364 KB |
Output is correct |
62 |
Correct |
515 ms |
68992 KB |
Output is correct |
63 |
Correct |
501 ms |
68116 KB |
Output is correct |
64 |
Correct |
493 ms |
67712 KB |
Output is correct |
65 |
Correct |
495 ms |
67840 KB |
Output is correct |
66 |
Correct |
572 ms |
70656 KB |
Output is correct |
67 |
Correct |
569 ms |
70444 KB |
Output is correct |
68 |
Correct |
1 ms |
364 KB |
Output is correct |
69 |
Correct |
1 ms |
364 KB |
Output is correct |
70 |
Correct |
1 ms |
364 KB |
Output is correct |
71 |
Correct |
1 ms |
364 KB |
Output is correct |
72 |
Correct |
1 ms |
364 KB |
Output is correct |
73 |
Correct |
1 ms |
364 KB |
Output is correct |
74 |
Correct |
589 ms |
69632 KB |
Output is correct |
75 |
Correct |
579 ms |
69504 KB |
Output is correct |
76 |
Correct |
597 ms |
69632 KB |
Output is correct |
77 |
Correct |
588 ms |
69632 KB |
Output is correct |
78 |
Correct |
557 ms |
68740 KB |
Output is correct |
79 |
Correct |
458 ms |
69760 KB |
Output is correct |
80 |
Correct |
393 ms |
67544 KB |
Output is correct |
81 |
Correct |
580 ms |
68864 KB |
Output is correct |
82 |
Correct |
283 ms |
67968 KB |
Output is correct |
83 |
Correct |
283 ms |
67976 KB |
Output is correct |
84 |
Correct |
483 ms |
68332 KB |
Output is correct |
85 |
Correct |
488 ms |
68736 KB |
Output is correct |
86 |
Correct |
485 ms |
68736 KB |
Output is correct |
87 |
Correct |
497 ms |
68480 KB |
Output is correct |
88 |
Correct |
1 ms |
364 KB |
Output is correct |
89 |
Correct |
1 ms |
364 KB |
Output is correct |
90 |
Correct |
1 ms |
364 KB |
Output is correct |
91 |
Correct |
1 ms |
364 KB |
Output is correct |
92 |
Correct |
1 ms |
364 KB |
Output is correct |
93 |
Correct |
1 ms |
364 KB |
Output is correct |
94 |
Correct |
1 ms |
364 KB |
Output is correct |
95 |
Correct |
1 ms |
364 KB |
Output is correct |
96 |
Correct |
1 ms |
364 KB |
Output is correct |
97 |
Correct |
1 ms |
364 KB |
Output is correct |
98 |
Correct |
1 ms |
364 KB |
Output is correct |
99 |
Correct |
1 ms |
364 KB |
Output is correct |
100 |
Correct |
1 ms |
364 KB |
Output is correct |
101 |
Correct |
1 ms |
364 KB |
Output is correct |
102 |
Correct |
1 ms |
364 KB |
Output is correct |
103 |
Correct |
1 ms |
364 KB |
Output is correct |
104 |
Correct |
11 ms |
2600 KB |
Output is correct |
105 |
Correct |
19 ms |
4136 KB |
Output is correct |
106 |
Correct |
20 ms |
4136 KB |
Output is correct |
107 |
Correct |
19 ms |
4136 KB |
Output is correct |
108 |
Correct |
20 ms |
4136 KB |
Output is correct |
109 |
Correct |
19 ms |
4136 KB |
Output is correct |
110 |
Correct |
1 ms |
364 KB |
Output is correct |
111 |
Correct |
1 ms |
364 KB |
Output is correct |
112 |
Correct |
1 ms |
364 KB |
Output is correct |
113 |
Correct |
1 ms |
364 KB |
Output is correct |
114 |
Correct |
1 ms |
364 KB |
Output is correct |
115 |
Correct |
1 ms |
364 KB |
Output is correct |
116 |
Correct |
19 ms |
4136 KB |
Output is correct |
117 |
Correct |
19 ms |
4136 KB |
Output is correct |
118 |
Correct |
19 ms |
4136 KB |
Output is correct |
119 |
Correct |
20 ms |
4136 KB |
Output is correct |
120 |
Correct |
19 ms |
4136 KB |
Output is correct |
121 |
Correct |
11 ms |
2600 KB |
Output is correct |
122 |
Correct |
8 ms |
2600 KB |
Output is correct |
123 |
Correct |
8 ms |
2600 KB |
Output is correct |
124 |
Correct |
17 ms |
2856 KB |
Output is correct |
125 |
Correct |
12 ms |
2600 KB |
Output is correct |
126 |
Correct |
14 ms |
2856 KB |
Output is correct |
127 |
Correct |
11 ms |
2600 KB |
Output is correct |
128 |
Correct |
1 ms |
364 KB |
Output is correct |
129 |
Correct |
631 ms |
72700 KB |
Output is correct |
130 |
Correct |
1244 ms |
114944 KB |
Output is correct |
131 |
Correct |
1252 ms |
115740 KB |
Output is correct |
132 |
Correct |
1245 ms |
114904 KB |
Output is correct |
133 |
Correct |
1276 ms |
115072 KB |
Output is correct |
134 |
Correct |
1293 ms |
115712 KB |
Output is correct |
135 |
Correct |
1 ms |
364 KB |
Output is correct |
136 |
Correct |
1 ms |
364 KB |
Output is correct |
137 |
Correct |
1 ms |
364 KB |
Output is correct |
138 |
Correct |
1 ms |
364 KB |
Output is correct |
139 |
Correct |
1 ms |
364 KB |
Output is correct |
140 |
Correct |
1 ms |
364 KB |
Output is correct |
141 |
Correct |
1263 ms |
115788 KB |
Output is correct |
142 |
Correct |
1269 ms |
115296 KB |
Output is correct |
143 |
Correct |
1246 ms |
115608 KB |
Output is correct |
144 |
Correct |
1234 ms |
115748 KB |
Output is correct |
145 |
Correct |
1244 ms |
115696 KB |
Output is correct |
146 |
Correct |
1022 ms |
113260 KB |
Output is correct |
147 |
Correct |
1031 ms |
113280 KB |
Output is correct |
148 |
Correct |
1022 ms |
113536 KB |
Output is correct |
149 |
Correct |
630 ms |
73536 KB |
Output is correct |
150 |
Correct |
307 ms |
70548 KB |
Output is correct |
151 |
Correct |
305 ms |
70528 KB |
Output is correct |
152 |
Correct |
527 ms |
72852 KB |
Output is correct |
153 |
Correct |
635 ms |
73264 KB |
Output is correct |
154 |
Correct |
534 ms |
72832 KB |
Output is correct |
155 |
Correct |
623 ms |
73352 KB |
Output is correct |