# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
69208 | mr_banana | Aliens (IOI16_aliens) | C++17 | 218 ms | 2756 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>
using namespace std;
const int MN=500+10;
const long long inf=1e13;
long long dp[MN][MN];
pair<int,int> p[MN];
long long sq(int x){
return 1ll*x*x;
}
bool g[MN][MN];
long long take_photos(int n, int m, int k, vector<int> r, vector<int> c) {
for(int i=0;i<n;i++){
p[i]={min(r[i],c[i]),-max(r[i],c[i])-1};
}
sort(p,p+n);
int n1=unique(p,p+n)-p;
n=0;
int mx=-1;
for(int i=0;i<n1;i++){
if(mx<-p[i].second){
p[n++]={p[i].first,-p[i].second};
mx=p[i].second;
}
}
/*long long ans=0;
for(int i=0;i<n;i++){
for(int j=p[i].first;j<p[i].second;j++){
for(int k=p[i].first;k<p[i].second;k++){
if(g[j][k]==0){
# | 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... |