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 pb push_back
#define F first
#define S second
#define vi vector<int>
using namespace std;
long long take_photos(int n, int m, int k,vi r,vi c) {
bool M[m][m];
memset(M,false,sizeof(M));
for(int i=0;i<n;i++){
int x=r[i],y=c[i];
if(y>x)swap(x,y);
int tam=x-y;
for(int i=x-tam;i<=x;i++){
for(int l=y;l<=y+tam;l++){
M[i][l]=true;
}
}
}
int res=0;
for(int i=0;i<m;i++){
for(int l=0;l<m;l++){
if(M[i][l])res++;
}
}
return res;
}
# | 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... |