# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
995664 | biank | Aliens (IOI16_aliens) | C++14 | 1 ms | 348 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 all(x) begin(x),end(x)
#define sz(x) int(x.size())
#define forn(i,n) for(int i=0;i<int(n);i++)
using vi=vector<int>;
using ll=long long;
using ld=long double;
using ii=pair<ll,ll>;
#define fst first
#define snd second
struct Line {
ll m,b,k;
ll operator()(ll x) {
return m*x+b;
}
ld intersectX(Line &o) {
return ld(b-o.b)/(o.m-m);
}
};
struct LineContainer:deque<Line>{
void add(ll m, ll b, ll k){
Line l=Line{m,b,k};
while(size()>=2&&l.intersectX(begin()[0])<=l.intersectX(begin()[1])) pop_front();
# | 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... |