# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
821878 | I_Love_EliskaM_ | Distributing Candies (IOI21_candies) | C++17 | 3395 ms | 47828 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>
using namespace std;
#define forn(i,n) for(int i=0;i<n;++i)
#define pb push_back
#define all(x) x.begin(), x.end()
using ll = long long;
#define pi pair<ll,ll>
#define f first
#define s second
#define int long long
const int inf=1e18;
struct sgt {
vector<int> lazy;
vector<pi> t;
int sz=1;
sgt(int n) {
while (sz<n) sz<<=1;
lazy.assign(4*sz,0);
t.assign(2*sz,{0,0});
}
pi merge(pi a, pi b) {
return {min(a.f,b.f), max(a.s,b.s)};
}
void push(int v) {
t[v].f+=lazy[v];
t[v].s+=lazy[v];
lazy[2*v+1]+=lazy[v];
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... |