# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
500835 | kderylo | Distributing Candies (IOI21_candies) | C++17 | 1105 ms | 50412 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 <iostream>
#include <vector>
using namespace std;
const int stala=262144;
long long tree[5*stala];
long long tree2[5*stala];
long long Tree[5*stala];
long long Tree2[5*stala];
vector<pair<int,long long> >poczatek[stala]; //czas wartosc
vector<pair<int,long long> >koniec[stala]; //czas wartosc
vector<int>wyjscie;
int tab[stala];
void update_max(int index,int index2,long long war,long long w[],long long W[])
{
index=index+stala-1;
index2=index2+stala-1;
w[index]+=war;
if(index!=index2)
{
w[index2]+=war;
}
while(index>0)
{
if(index/2!=index2/2)
{
if(index%2==0)
{
w[index+1]+=war;
W[index+1]=w[index+1]+max(W[2*(index+1)],W[(2*(index+1))+1]);
# | 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... |