제출 #396428

#제출 시각아이디문제언어결과실행 시간메모리
396428BlondieAliens (IOI16_aliens)C++17
0 / 100
1 ms296 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef long double ld; #define F first #define S second ll take_photos(int n, int m, int k, vector<int> r, vector<int> c) { ll answer = 0; vector<vector<bool>> used(m, vector<bool>(m)); for(int i = 0; i < n; i++) { if(r[i] > c[i]) { swap(r[i], c[i]); } int len = c[i] - r[i] + 1; for(int row = r[i]; row < r[i]+len; row++) { for(int col = r[i]; col < c[i]+len; col++) { if(!used[row][col]) { answer++; used[row][col] = true; } } } } return answer; }
#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...