# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148014 | imsifile | Organizing the Best Squad (FXCUP4_squad) | C++17 | 1114 ms | 78588 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 "squad.h"
#include <algorithm>
#include <stdio.h>
using namespace std;
typedef long long lld;
struct coord {
lld x, y; int ix;
bool operator< (const coord& c) const {
if(x!=c.x) return x<c.x;
return y<c.y;
}
} AP[1001001], DP[1001001];
int N;
lld ccw(coord a, coord b, coord c){ // clockwise < 0
return (a.x*b.y+b.x*c.y+c.x*a.y) - (a.y*b.x+b.y*c.x+c.y*a.x);
}
void makehull(coord *ba, vector<int> &chk, int val, vector<coord> &cvx){
cvx.clear();
for(int i=0; i<N; i++){
int sz;
if(chk[ba[i].ix]==val) continue;
while(1){
sz=cvx.size();
if(sz<2) break;
if(ccw(cvx[sz-2], cvx[sz-1], ba[i]) < 0) break;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |