# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
290430 | Saboon | Aliens (IOI16_aliens) | C++17 | 180 ms | 8428 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 "aliens.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e5 + 5, maxm = 1e6 + 5;
int n, m, k;
const ll inf = 1e18;
ll dp[maxm], pd[maxm];
vector<pair<int,int>> A;
ll SQ(ll x){return x*x;}
pair<ll,ll> Q[maxm];
int tail, head, P[maxm];
ll intersect(pair<ll,ll> fi, pair<ll,ll> se){
return 1. * (se.second - fi.second) / (fi.first - se.first);
}
ll gety(pair<ll,ll> L, ll x){
return L.first*x + L.second;
}
void addLine(ll a, ll b, int p){
pair<ll,ll> L = {a,b};
while (tail+2 <= head and intersect(Q[head-2],Q[head-1]) > intersect(Q[head-1],L))
head --;
# | 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... |