# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
641496 | sumit_kk10 | Harbingers (CEOI09_harbingers) | C++17 | 127 ms | 23524 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>
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define pb push_back
#define F first
#define S second
#define int long long
using namespace std;
const int N = 1e5 + 5, MOD = 1e9 + 7;
vector<pair<int, int> > g[N];
int n, par[N], dis[N], dp[N], s[N], d[N];
struct Line{
int m, c;
int val(int x){
return m*x + c;
}
};
vector<Line> hulls(N);
int cur_hullsize = 1;
bool check(Line a, Line b, Line cc){
int x = (b.c - a.c);
x = x * (a.m - cc.m);
int y = (cc.c - a.c);
y = y * (a.m - b.m);
if(x > y)
return true;
return false;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |