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"
#define int long long
using namespace std;
int take_photos(signed n, signed m, signed k, vector<signed> r, vector<signed> c) {
int ans = 0;
vector<vector<bool>> a(m,vector<bool>(m));
for(int i = 0; i < n; i ++){
int mi = min(r[i],c[i]);
int ma = max(r[i],c[i]);
for(int j = mi; j <= ma; j ++){
for(int k = mi; k <= ma; k ++){
if(!a[j][k]) ans ++;
a[j][k] = true;
}
}
}
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... |