# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
679613 | alirezasamimi100 | Aliens (IOI16_aliens) | C++17 | 242 ms | 14528 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;
using ll = long long int;
using pll = pair<ll, ll>;
using ld = long double;
using pld = pair<ld, int>;
using pdd = pair<ld, ld>;
#define pb push_back
#define F first
#define S second
const ld eps = 1e-19;
const int N = 1e5 + 10;
vector<pll> vec;
pld dp[N];
int n;
struct CHT{
const ld INF=1e18;
pair<ld, pair<pdd,int>> A[N];
int L, R;
CHT(){
L=R=0;
}
inline ld Intersect(pdd a, pdd b){
if (a.first==b.first) return (a.second>=b.second?-INF:INF);
return (a.second-b.second)/(b.first-a.first);
}
inline void Add(pair<pdd,int> X){
while (L<R && Intersect(A[R-1].second.first, X.first)<=A[R-1].first) R--;
# | 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... |