제출 #555538

#제출 시각아이디문제언어결과실행 시간메모리
555538snasibov05Aliens (IOI16_aliens)C++14
4 / 100
2 ms296 KiB
#include "aliens.h" using namespace std; long long take_photos(int n, int m, int k, vector<int> r, vector<int> c) { vector<vector<bool>> grid(m, vector<bool>(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 l = min(r[i], c[i]); l <= max(r[i], c[i]); ++l) grid[j][l] = true; } } int ans = 0; for (int i = 0; i < m; ++i){ for (int j = 0; j < m; ++j){ if (grid[i][j]) ans++; } } 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...