제출 #138902

#제출 시각아이디문제언어결과실행 시간메모리
138902arthurconmyAliens (IOI16_aliens)C++14
4 / 100
2 ms376 KiB
#include <bits/stdc++.h> #ifndef ARTHUR_LOCAL #include "aliens.h" #endif using namespace std; using ll = long long; bool grid[101][101]; ll take_photos(int n, int m, int k, vector<int> R, vector<int> C) { for(int i=0; i<n; i++) { int x=R[i]; int y=C[i]; int cor = min(x,y); int sid = max(x,y)-min(x,y); for(int i=cor; i-cor<=sid; i++) { for(int j=cor; j-cor<=sid; j++) { grid[i][j]=1; } } } // for(int i=0; i<10; i++) // { // for(int j=0; j<10; j++) // { // cout << int(grid[i][j]) << " "; // } // cout << endl; // } int ans=0; for(int i=0; i<101; i++) { for(int j=0; j<101; j++) { if(grid[i][j]) ans++; } } return ans; } #ifdef ARTHUR_LOCAL int main() { vector<int> V = {1,2}; cout << take_photos(2,10,1,V,V) << endl; } #endif
#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...