제출 #478239

#제출 시각아이디문제언어결과실행 시간메모리
478239PiejanVDC벽 (IOI14_wall)C++17
컴파일 에러
0 ms0 KiB
#include "wall.h" #include <bits/stdc++.h> using namespace std; void buildWall(int n, int k, vector<int>op, vector<int>left, vector<int>right, vector<int>height, vector<int>finalHeight) { finalHeight.assign(n,0); for(int i = 0 ; i < k ; i++) { if(op[i] == 1) { for(int p = left[i] ; p <= right[i] ; p++) { finalHeight[p] = max(height[i],finalHeight[p]); } } else { for(int p = left[i] ; p <= right[i] ; p++) { finalHeight[p] = min(height[i],finalHeight[p]); } } } }

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/ccPXXtVO.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