# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
270444 | doowey | Discharging (NOI20_discharging) | C++14 | 203 ms | 14840 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 pair<int, int> pii;
typedef long double ld;
#define fi first
#define se second
#define mp make_pair
#define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
struct Line{
ld ai;
ld bi;
ld ti;
};
ld intersect(Line t1, Line t2){
return (t2.bi-t1.bi)/(t1.ai-t2.ai);
}
vector<Line> hull;
void add_line(Line nw){
while(hull.size() >= 2 && intersect(hull[hull.size() - 2], nw) <= intersect(hull[hull.size() - 2],hull[hull.size() - 1])){
hull.pop_back();
}
if(!hull.empty())
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |