제출 #301290

#제출 시각아이디문제언어결과실행 시간메모리
301290williamMBDKAliens (IOI16_aliens)C++17
4 / 100
2 ms384 KiB
#include<bits/stdc++.h> #include "aliens.h" using namespace std; long long take_photos(int N, int M, int K, std::vector<int> R, std::vector<int> C) { vector<vector<bool>> seen (M, vector<bool> (M)); for(int i = 0; i < N; i++){ if(R[i] > C[i]) swap(R[i], C[i]); int a = R[i], b = R[i]; int c = C[i], d = C[i]; for(int i = a; i <= c; i++){ for(int j = b; j <= d; j++){ seen[i][j] = 1; } } } int c = 0; for(int i = 0; i < M; i++) for(int j = 0; j < M; j++) c += seen[i][j]; return c; }
#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...