# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
285284 | user202729 | Aliens (IOI16_aliens) | C++17 | 859 ms | 11108 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.
// moreflags=grader.cpp
// it's too late.
//
// ...
#include "aliens.h"
// 15
#include<algorithm>
#include<map>
#include<cmath>
#include<cstdint>
#include<climits>
#include<cfloat>
#if not LOCAL
#define NDEBUG
#endif
#include<cassert>
long long take_photos(int n, int m, int numPhoto, std::vector<int> r, std::vector<int> c) {
std::vector<std::pair<int, int>> points(r.size());
for(int index=0; index<(int)r.size(); ++index)
points[index]=std::minmax({r[index], c[index]});
std::sort(begin(points), end(points),
[&](auto first, auto sec){return first.first!=sec.first ? first.first<sec.first: first.second>sec.second;
});
{ // keep only extreme points
auto out=points.begin()+1;
std::for_each(out, points.end(),[&](auto it){
assert(it.first>=out[-1].first);
if(it.second>out[-1].second){
# | 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... |