Submission #25223

#TimeUsernameProblemLanguageResultExecution timeMemory
25223RezwanArefin01Aliens (IOI16_aliens)C++14
0 / 100
0 ms2020 KiB
#include "aliens.h" #include <bits/stdc++.h> typedef long long ll; ll solveSubtask1(int n, int m, int k, std::vector<int> r, std::vector<int> c) { bool grid[m][m]; memset(grid,0, sizeof grid); for(int i=0; i<n; i++) { int x = r[i], y = c[i]; for(int j=x; j <= y; j++) for(int k = x; k <= y; k++) grid[j][k] = 1; } int ans = 0; for(int i=0; i<m; i++) for(int j=0; j<m; j++) ans += grid[i][j]; return ans; } ll take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c) { if(n <= 50 && m <= 100) return solveSubtask1(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...