Submission #45959

#TimeUsernameProblemLanguageResultExecution timeMemory
45959RezwanArefin01Aliens (IOI16_aliens)C++11
0 / 100
2 ms520 KiB
#include <bits/stdc++.h> #include "aliens.h" using namespace std; int g[50][50]; long long take_photos(int n, int m, int k, vector<int> r, vector<int> c) { if(n != k) exit(0); for(int k = 0; k < n; k++) { for(int i = r[k]; i <= c[k]; i++) { for(int j = r[k]; j <= c[k]; j++) { g[i][j] = 1; } } } int ret = 0; for(int i = 0; i < m; i++) { for(int j = 0; j < m; j++) ret += g[i][j]; } return ret; } #ifdef LOCAL_TESTING int main() { freopen("in", "r", stdin); int n, m, k; assert(3 == scanf("%d %d %d", &n, &m, &k)); std::vector<int> r(n), c(n); for (int i = 0; i < n; i++) { assert(2 == scanf("%d %d", &r[i], &c[i])); } long long ans = take_photos(n, m, k, r, c); printf("%lld\n", ans); return 0; } #endif
#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...