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<bits/stdc++.h>
#include "aliens.h"
using namespace std;
long long take_photos(int N, int M, int K, std::vector<int> R, std::vector<int> C) {
vector<vector<bool>> seen (M, vector<bool> (M));
for(int i = 0; i < N; i++){
if(R[i] > C[i]) swap(R[i], C[i]);
int a = R[i], b = R[i];
int c = C[i], d = C[i];
for(int i = a; i <= c; i++){
for(int j = b; j <= d; j++){
seen[i][j] = 1;
}
}
}
int c = 0;
for(int i = 0; i < M; i++) for(int j = 0; j < M; j++) c += seen[i][j];
return c;
}
# | 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... |