Submission #223649

#TimeUsernameProblemLanguageResultExecution timeMemory
223649DedMaximAliens (IOI16_aliens)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> long long take_photos(int n, int m, int k, const std::vector<int>& r, const std::vector<int>& c) { std::vector<std::vector<bool>> used(m, std::vector<bool>(m, false)); for (int i = 0; i < n; ++i) { int left = r[i], right = c[i]; if (left > right) std::swap(left, right); for (int x = left; x <= right; ++x) { for (int y = left; y <= right; ++y) { used[x][y] = true; } } } long long result = 0; for (int x = 0; x != m; ++x) { for (int y = 0; y != m; ++y) { result += used[x][y]; } } return result; }

Compilation message (stderr)

/tmp/ccTnrGil.o: In function `main':
grader.cpp:(.text.startup+0xdf): undefined reference to `take_photos(int, int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status