# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
885728 | normankr07 | Aliens (IOI16_aliens) | C++17 | 1 ms | 436 KiB |
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 ll = long long;
using namespace std;
long long take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c)
{
// Sub1
if (n == k)
{
vector<vector<int>> arr(m + 3, vector<int>(m + 3));
for (int i = 0; i < n; i++)
{
int xx = r[i], yy = c[i];
for (int x = min(xx, yy); x <= max(xx, yy); x++)
for (int y = min(xx, yy); y <= max(xx, yy); y++)
{
arr[x][y]++;
}
}
int cnt = 0;
for (int x = 0; x <= m; x++)
for (int y = 0; y <= m; y++)
cnt += (arr[x][y] != 0);
return cnt;
}
}
Compilation message (stderr)
# | 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... |