Submission #223650

#TimeUsernameProblemLanguageResultExecution timeMemory
223650DedMaximAliens (IOI16_aliens)C++17
4 / 100
7 ms512 KiB
#include <bits/stdc++.h> long long take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c) { std::vector<std::vector<bool>> used(m, std::vector<bool>(m, false)); for (int i = 0; i < n; ++i) { int left = r[i], right = c[i]; if (left > right) std::swap(left, right); for (int x = left; x <= right; ++x) { for (int y = left; y <= right; ++y) { used[x][y] = true; } } } long long result = 0; for (int x = 0; x != m; ++x) { for (int y = 0; y != m; ++y) { result += used[x][y]; } } return result; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...