# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
966426 | ttamx | Cake 3 (JOI19_cake3) | C++17 | 1708 ms | 25840 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;
using ll = long long;
using t4 = tuple<int,int,int,int>;
const int N=2e5+5;
const int K=1<<19;
const ll INF=LLONG_MAX/2;
int n,m;
ll v[N],c[N],pos[N];
ll ans=-INF;
pair<int,int> a[N];
vector<pair<int,int>> vec;
vector<t4> q;
struct Node{
ll sum;
int freq;
Node():sum(0),freq(0){}
Node(ll x):sum(x),freq(1){}
Node(ll x,int f):sum(x),freq(f){}
friend Node operator+(const Node &lhs,const Node &rhs){
return Node(lhs.sum+rhs.sum,lhs.freq+rhs.freq);
}
};
struct SegTree{
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... |