# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1108868 | 0pt1mus23 | Election (BOI18_election) | C++14 | 454 ms | 44512 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// fast.cpp
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define ins insert
#define pb push_back
#define endl '\n'
#define putr(x) cout<<x<<endl;return;
#define all(x) x.begin(),x.end()
int nxt(){ int x;cin>>x; return x; }
const int mod = 1e9 +7, sze = 5e5 +10, inf = LLONG_MAX, LG = 20;
string s;
int n;
struct st{
int sum=0;
int pf=0;
int sf=0;
int res=0;
} T[sze*4];
st combine(st a,st b){
st c;
c.sum = a.sum + b.sum;
c.pf = max(a.pf, a.sum + b.pf);
c.sf = max(b.sf, b.sum + a.sf);
c.res=max( { a.pf + b.sf , a.res + b.sum, a.sum + b.res });
return c;
}
void build(int node,int l,int r){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |