제출 #492654

#제출 시각아이디문제언어결과실행 시간메모리
492654boykut벽 (IOI14_wall)C++14
컴파일 에러
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; }

컴파일 시 표준 에러 (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