# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
691713 | NemanjaSo2005 | Aliens (IOI16_aliens) | C++14 | 0 ms | 0 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>
#define ll long long
int N,M,K;
struct tacka{
int x,y;/// X i Y su kao u matematici
} tniz[100005],niz[100005],tpp;
stack<tacka> S;
bool pox(tacka a,tacka b){
if(a.x<b.x)
return true;
if(a.x>b.x)
return false;
return a.y>b.y;
}
long long take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c) {
N=n;
M=m;
K=k;
for(int i=1;i<=N;i++){
tniz[i].x=c[i-1];
tniz[i].y=r[i-1];
}
for(int i=1;i<=N;i++)
if(tniz[i].x<tniz[i].y)
swap(tniz[i].x,tniz[i].y);
sort(tniz+1,tniz+1+N,pox);
tpp.x=-1;
tpp.y=1e9;
for(int i=1;i<=N;i++){
if(S.top().x)
}
return 0;
}
#include "aliens.h"
#include <cstdio>
#include <cassert>
int main() {
int n, m, k;
assert(3 == scanf("%d %d %d", &n, &m, &k));
std::vector<int> r(n), c(n);
for (int i = 0; i < n; i++) {
assert(2 == scanf("%d %d", &r[i], &c[i]));
}
long long ans = take_photos(n, m, k, r, c);
printf("%lld\n", ans);
return 0;
}