제출 #432186

#제출 시각아이디문제언어결과실행 시간메모리
432186Pichon5Aliens (IOI16_aliens)C++17
4 / 100
1 ms204 KiB
#include "aliens.h" #include <bits/stdc++.h> #define pb push_back #define F first #define S second #define vi vector<int> using namespace std; long long take_photos(int n, int m, int k,vi r,vi c) { bool M[m][m]; memset(M,false,sizeof(M)); for(int i=0;i<n;i++){ int x=r[i],y=c[i]; if(y>x)swap(x,y); int tam=x-y; for(int i=x-tam;i<=x;i++){ for(int l=y;l<=y+tam;l++){ M[i][l]=true; } } } int res=0; for(int i=0;i<m;i++){ for(int l=0;l<m;l++){ if(M[i][l])res++; } } return res; }
#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...