# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
912944 | 12345678 | Discharging (NOI20_discharging) | C++17 | 118 ms | 22612 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;
#define ll long long
const ll nx=1e6+5, inf=1e18;
ll n, t[nx], dp[nx];
struct line
{
ll m, c, p;
line(ll m, ll c, ll p): m(m), c(c), p(p){}
};
struct convexhull
{
deque<line> dq;
ll div(ll a, ll b)
{
if ((a%b)==0||(a^b)>=0) return a/b;
return a/b-1;
}
void add(ll m, ll c)
{
while (dq.size()>1)
{
line tmp=dq.back();
dq.pop_back();
if (div(c-tmp.c, tmp.m-m)>dq.back().p)
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... |