Submission #635573

#TimeUsernameProblemLanguageResultExecution timeMemory
635573ionan6ixAliens (IOI16_aliens)C++17
4 / 100
1 ms340 KiB
#include "aliens.h" #include<bits/stdc++.h> using namespace std; 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) //First Subtask { int sol = 0; vector<vector<int> > matrix; matrix.resize(m); for(int i = 0;i<m;i++) matrix[i].resize(m); for(int i=0;i<m;i++) for(int j=0;j<m;j++) matrix[i][j] = 0; for(int i = 0;i<n;i++) { if(matrix[r[i]][c[i]]) continue; int m = min(r[i],c[i]); int M = max(r[i],c[i]); for(int j = m;j<=M;j++) for(int t = m;t<=M;t++) matrix[j][t] = 1; } for(int i = 0;i<m;i++) for(int j=0;j<m;j++) sol+=matrix[i][j]; return sol; } 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...