Submission #427090

#TimeUsernameProblemLanguageResultExecution timeMemory
427090vincentpikachu20Aliens (IOI16_aliens)C++17
4 / 100
2 ms292 KiB
#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 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...