Submission #519665

#TimeUsernameProblemLanguageResultExecution timeMemory
519665jjjjj19980806Aliens (IOI16_aliens)C++17
4 / 100
1 ms292 KiB
#include "aliens.h" #include <bits/stdc++.h> #ifdef LOCAL #include "../../codebook/debug.h" #else #define debug(...) 0516 #endif using namespace std; long long solve_1(int n, int m, int k, vector<int> &r, vector<int> &c) { vector<vector<bool>> g(m, vector<bool>(m)); long long ans = 0; for (int i = 0; i < n; i++) { if (r[i] > c[i]) { swap(r[i], c[i]); } for (int x = r[i]; x <= c[i]; x++) { for (int y = r[i]; y <= c[i]; y++) { if (g[x][y] == false) { g[x][y] = true; ans += 1; } } } } return ans; } long long take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c) { if (n <= 50 && m <= 100 && k == n) return solve_1(n, m, k, r, c); return 0; }
#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...