# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
712889 | minhnhatnoe | Aliens (IOI16_aliens) | C++14 | 1116 ms | 11364 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;
ll sq(ll a) {return a * a;}
struct lichao_tree{
struct node{
pair<ll, ll> line;
int cnt = 0;
int l = -1, r = -1;
node(ll a, ll b, int cnt): line(a, b), cnt(cnt) {}
ll eval(ll x){
return line.first * x + line.second;
}
};
int L, R;
lichao_tree(int lrange, int rrange): L(lrange), R(rrange) {}
vector<node> g;
void insert(ll a, ll b, int cnt){
if (g.size() == 0){
g.emplace_back(a, b, cnt);
return;
}
int tidx = 0;
int tl = L, tr = R;
node tmp(a, b, cnt);
while (true){
int tm = (tl + tr)>>1;
bool left = g[tidx].eval(tl) > tmp.eval(tl);
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... |