# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1089816 | lucri | Election (BOI18_election) | C++17 | 345 ms | 45908 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.
#include <bits/stdc++.h>
using namespace std;
char a[500010];
bool e[500010];
int n,q,x,y,ans[500010];
vector<pair<int,int>>qu[500010];
struct arboreintervale{int sum,minp;}aint[2000010],zero;
arboreintervale join(arboreintervale a,arboreintervale b)
{
arboreintervale c;
c.sum=a.sum+b.sum;
c.minp=min(a.minp,a.sum+b.minp);
return c;
}
stack<int>s;
void update(int poz,int b,int e,int pozu,int val)
{
if(b>pozu||e<pozu)
return;
if(b==e)
{
aint[poz].sum=val;
aint[poz].minp=min(0,val);
return;
}
update(poz*2,b,(b+e)/2,pozu,val);
update(poz*2+1,(b+e)/2+1,e,pozu,val);
aint[poz]=join(aint[poz*2],aint[poz*2+1]);
}
arboreintervale interval(int poz,int b,int e,int lim)
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |