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;
typedef long long ll;
ll take_photos(int n, int m, int k, vector<int> r, vector<int> c) {
vector<vector<bool>> vst(m, vector<bool>(m));
ll res = 0;
for (int i = 0; i < n; i++) {
ll mn = min(r[i], c[i]);
ll mx = max(r[i], c[i]);
for (int x = mn; x <= mx; x++) {
for (int y = mn; y <= mx; y++) {
if (!vst[x][y]) {
vst[x][y] = true;
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... |