제출 #594994

#제출 시각아이디문제언어결과실행 시간메모리
594994Valaki2Aliens (IOI16_aliens)C++14
4 / 100
2 ms304 KiB
#include "aliens.h" #include <bits/stdc++.h> using namespace std; #define n N #define m M #define k K #define int long long #define pb push_back #define mp make_pair #define pii pair<int, int> #define fi first #define se second int n, m, k; vector<int> a, b; vector<vector<bool> > v; int solve() { v.assign(m, vector<bool> (m, false)); for(int i = 0; i < n; i++) { int l = min(a[i], b[i]); int r = max(a[i], b[i]); for(int x = l; x <= r; x++) { for(int y = l; y <= r; y++) { v[x][y] = true; } } } int ans = 0; for(int i = 0; i < m; i++) { for(int j = 0; j < m; j++) { if(v[i][j]) { ans++; } } } return ans; } #undef n #undef m #undef k int take_photos(signed n, signed m, signed k, vector<signed> r, vector<signed> c) { N = n; M = m; K = k; a.assign(N, 0); b.assign(N, 0); for(int i = 0; i < N; i++) { a[i] = r[i]; b[i] = c[i]; } return solve(); }
#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...