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>
using namespace std;
const int MAXN = 110;
int tb[MAXN][MAXN];
long long take_photos(int n, int m, int k, vector<int> r, vector<int> c) {
if(n != k) return 0;
for(int i = 0; i < n; i++) {
int a = min(r[i], c[i]), b = max(r[i], c[i]);
for(int j = a; j <= b; j++) {
for(int k = a; k <= b; k++) {
tb[j][k] = 1;
}
}
}
long long resp = 0;
for(int i = 0; i < MAXN; i++) {
for(int j = 0; j < MAXN; j++) resp += tb[i][j];
}
return resp;
}
# | 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... |