Submission #492654

#TimeUsernameProblemLanguageResultExecution timeMemory
492654boykutWall (IOI14_wall)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define UNDEFADD 0 template <typename T> class segment_tree { public: segment_tree() {} segment_tree(int k) { n = 1; while (n < k) n <<= 1; t = vector<node> (2 * n - 1); } private: struct node { int min, max; }; int n; vector<node> t; }; int main() { cin.tie(0)->sync_with_stdio(0); int n, t; cin >> n >> t; vector<int> a(n, 0); while (t --) { int o, l, r, h; cin >> o >> l >> r >> h; for (int i = l; i <= r; i++) { if (o == 1) a[i] = max(a[i], h); else a[i] = min(a[i], h); } } for (int i = 0; i < n; i++) { cout << a[i] << '\n'; } return 0; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccgoI6OP.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccTRBohS.o:wall.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccgoI6OP.o: in function `main':
grader.cpp:(.text.startup+0x133): undefined reference to `buildWall(int, int, int*, int*, int*, int*, int*)'
collect2: error: ld returned 1 exit status