#include "aliens.h"
#include <bits/stdc++.h>
#define pb push_back
#define pii pair<int,int>
#define f first
#define s second
#define INF (int)1e18
#define MOD (int)(1e9+7)
#define MAXN 100005
#define enl '\n'
#define DB(CODE) cout<<'\t'<<CODE<<'\n';
#define SP <<' '<<
#define Int long long
typedef long long ll;
using namespace std;
long long take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c) {
bool area[m][m];
memset(area,false,sizeof(area));
for(Int i=0; i<n; i++) for(Int j=min(r[i],c[i]); j<=max(r[i],c[i]); j++) for(Int k=min(r[i],c[i]); k<=max(r[i],c[i]); k++) area[j][k]=true;
Int cnt=0;
for(Int i=0; i<m; i++) for(Int j=0; j<m; j++) cnt+=area[i][j];
return cnt;
}
Compilation message (stderr)
aliens.h:1:9: warning: #pragma once in main file
1 | #pragma once
| ^~~~
aliens_c.h:1:9: warning: #pragma once in main file
1 | #pragma once
| ^~~~
# | 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... |