# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1131566 | Aviansh | Building Bridges (CEOI17_building) | C++17 | 104 ms | 50512 KiB |
#include <bits/stdc++.h>
using namespace std;
long long inf = 2e18;
struct line{
long long m;
long long c;
double val(double x){
return m*x+c;
}
int left=-1;
int right=-1;
};
struct liChaoTree{
line *st;
line def;
int cr = 0;
liChaoTree(int nodes){
def.m=0;
def.c=LLONG_MAX;
st=new line[nodes];
fill(st,st+nodes,def);
}
void addLine(line lin, long long l=0, long long r=1e9+5, int ind=0){
long long mid = (l+r)/2;
if(st[ind].val(l)<=lin.val(l)&&st[ind].val(r)<=lin.val(r)){
return;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |