Submission #311783

#TimeUsernameProblemLanguageResultExecution timeMemory
311783MilosMilutinovicWall (IOI14_wall)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "wall.h" using namespace std; void buildwall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]) { for (int i = 0; i < k; i++) { for (int j = left[i]; j <= right[i]; j++) { if (op[i] == 1) { if (finalHeight[j] < height[i]) { finalHeight[j] = height[i]; } } else { if (finalHeight[j] > height[i]) { finalHeight[j] = height[i]; } } } } } /*int main() { ios::sync_with_stdio(false); cin.tie(0); int n, qq; cin >> n >> qq; vector<int> op(qq), l(qq), r(qq), h(qq); vector<int> ans(n, 0); for (int i = 0; i < qq; i++) { cin >> op[i] >> l[i] >> r[i] >> h[i]; } buildwall(n, qq, op, l, r, h, ans); for (int i = 0; i < n; i++) { cout << ans[i] << " "; } return 0; }*/ /* 10 6 1 1 8 4 2 4 9 1 2 3 6 5 1 0 5 3 1 2 2 5 2 6 7 0 */

Compilation message (stderr)

/tmp/cczqsWHK.o: In function `main':
grader.cpp:(.text.startup+0x118): undefined reference to `buildWall(int, int, int*, int*, int*, int*, int*)'
collect2: error: ld returned 1 exit status