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 "grader.cpp"
#include <bits/stdc++.h>
#define y1 asdfasdf123
using namespace std;
bool used[155][155];
void f(int y1, int x1, int y2, int x2) {
for (int i = y1; i <= y2; i++) {
for (int j = x1; j <= x2; j++) {
used[i][j] = true;
}
}
}
long long take_photos(int n, int m, int k, vector<int> r, vector<int> c) {
for (int i = 0; i < n; i++) {
int mn = min(r[i], c[i]);
int mx = max(r[i], c[i]);
f(mn, mn, mx, mx);
}
long long ans = 0;
for (int i = 0; i < m; i++) {
for (int j = 0; j < m; j++) {
if (used[i][j]) {
ans++;
}
}
}
return ans;
}
# | 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... |