제출 #789362

#제출 시각아이디문제언어결과실행 시간메모리
789362NothingXDAliens (IOI16_aliens)C++17
4 / 100
1 ms340 KiB
#include "aliens.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double ld; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef complex<ld> point; void debug_out() {cerr << endl;} template<typename Head, typename... Tail> void debug_out(Head H, Tail... T){ cerr << H << ' '; debug_out(T...); } #define debug(...) cerr << "(" << #__VA_ARGS__ << "): ", debug_out(__VA_ARGS__) #define F first #define S second #define all(x) x.begin(), x.end() #define MP(x, y) make_pair(x, y) const int maxn = 100 + 10; bool mark[maxn][maxn]; long long take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c) { for (int i = 0; i < n; i++){ if (r[i] > c[i]) swap(r[i], c[i]); for (int j = r[i]; j <= c[i]; j++){ for (int k = r[i]; k <= c[i]; k++){ mark[j][k] = true; } } } ll ans = 0; for (int i = 0; i < m; i++){ for (int j = 0; j < m; j++){ ans += mark[i][j]; } } return ans; }
#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...