# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
130508 | fefe | Aliens (IOI16_aliens) | C++17 | 3 ms | 376 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>
#include "aliens.h"
#define MAX_N 100005
#define fi first
#define se second
#define sq(x) ((x)*(x))
using namespace std;
typedef long long LL;
typedef pair<LL,LL> pil;
struct node{
LL s,e;
}V[MAX_N];
LL s,e;
LL dp[MAX_N];
pil L[MAX_N];
bool is_ok(pil a,pil b,pil c){
return (b.se-a.se)*(b.fi-c.fi)<(a.fi-b.fi)*(c.se-b.se);
}
long long take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c) {
LL i;
for(i=1;i<=n;i++){
V[i].s=min(r[i-1],c[i-1]);
V[i].e=max(r[i-1],c[i-1]);
}
sort(V+1,V+n+1,[&](const node x,const node y){return (x.s==y.s)?(x.e>y.e):(x.s<y.s);});
m=0;
LL x=-1;
for(i=1;i<=n;i++){
if(x<V[i].e) V[++m]=V[i];
# | 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... |