# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
487988 | David_M | Distributing Candies (IOI21_candies) | C++17 | 1840 ms | 60348 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 "candies.h"
#include <bits/stdc++.h>
#define ll long long
#define vi vector<ll>
#define sz(x) (x).size()
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define pii pair<ll, ll>
#define vpii vector<pii>
#define pb push_back
using namespace std;
const ll N=1000006, INF=1e18 + 7;
ll n, m, lazy[8*N];
pair<pii,pii> T[8*N], o={{-INF, -1}, {INF, -1}};
void push(ll x){
lazy[x<<1 ]+=lazy[x];
lazy[x<<1|1]+=lazy[x];
T[x].F.F+=lazy[x];
T[x].S.F+=lazy[x];
lazy[x]=0;
}
void build(ll L=0, ll R=n, ll x=1){
if(L==R){
T[x]={{0, L}, {0, L}};
return;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |