Submission #873199

#TimeUsernameProblemLanguageResultExecution timeMemory
873199TurkhuuAliens (IOI16_aliens)C++17
4 / 100
1 ms436 KiB
#include "aliens.h" #include <bits/stdc++.h> using namespace std; using ll = long long; ll take_photos(int n, int m, int k, vector<int> r, vector<int> c) { vector f(m, vector<int>(m)); for (int i = 0; i < n; i++) { for (int j = min(r[i], c[i]); j <= max(r[i], c[i]); j++) { for (int k = min(r[i], c[i]); k <= max(r[i], c[i]); k++) { f[j][k] = 1; } } } int ans = 0; for (int i = 0; i < m; i++) { for (int j = 0; j < m; j++) { ans += f[i][j]; } } return ans; }
#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...