# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
267135 | eohomegrownapps | Discharging (NOI20_discharging) | C++14 | 891 ms | 6904 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;
typedef long long ll;
typedef long double ld;
struct Line{
ll m, c;
Line(ll _m, ll _c){
m=_m;c=_c;
}
ll f(ll x){
return m*x+c;
}
ld intersectX(Line l){
return (1.0*l.c-c)/(m-l.m);
}
};
deque<Line> hull;
bool isBetter(Line l){
return (l.intersectX(hull[hull.size()-1])<l.intersectX(hull[hull.size()-2]));
}
void add(Line l){
if (hull.size()>0&&hull.back().m==l.m){
if (l.c<hull.back().c){
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |