Submission #1276055

#TimeUsernameProblemLanguageResultExecution timeMemory
1276055hiepsimauhong벽 (IOI14_wall)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #include "wall.h" #define int long long using ll = long long; #define fs first #define sd second #define ii pair<int,int> #define iii pair<int, ii> #define all(A) A.begin(), A.end() const int N = 2e6 + 5; int a[N]; void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]) { for(int i(0) ; i < k; ++i){ if(op[i] == 1){ for(int j = left[i] ; j <= right[i] ; ++j){ a[j] = max(a[j], height[i]); } } else{ for(int j = left[i] ; j <= right[i] ; ++j){ a[j] = min(a[j], height[i]); } } } for(int i(0) ; i < n ; ++i){ finalHeight[i] = a[i]; } return; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cccxfUZp.o: in function `main':
grader.cpp:(.text.startup+0x123): undefined reference to `buildWall(int, int, int*, int*, int*, int*, int*)'
collect2: error: ld returned 1 exit status