# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1024174 | lucri | Sails (IOI07_sails) | C++17 | 118 ms | 8016 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;
long long n;
long long ans;
pair<long long,long long>v[100010];
struct intervale{long long vmin,vmax,lazy;}aint[400010];
void propaga(long long poz,long long b,long long e)
{
if(b!=e)
{
aint[poz*2].lazy+=aint[poz].lazy;
aint[poz*2+1].lazy+=aint[poz].lazy;
}
aint[poz].vmax+=aint[poz].lazy;
aint[poz].vmin+=aint[poz].lazy;
aint[poz].lazy=0;
}
long long valoare(long long poz,long long b,long long e,long long pozc)
{
propaga(poz,b,e);
if(b==e)
return aint[poz].vmin;
if((b+e)/2>=pozc)
return valoare(poz*2,b,(b+e)/2,pozc);
else
return valoare(poz*2+1,(b+e)/2+1,e,pozc);
}
void adauga(long long poz,long long b,long long e,long long bi,long long ei)
{
if(b>ei||bi>e)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |