Submission #1276046

#TimeUsernameProblemLanguageResultExecution timeMemory
1276046hiepsimauhong벽 (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 print(A,L,R) FOR(OK, L, R){if(A[OK]<=-oo / 10||A[OK]>=oo)cout<<"- ";else cout<<A[OK]<<' ';}cout<<'\n'; #define prints(A) FOA(OK, A){cout<<OK<<' ';}cout << '\n'; #define printz(A,L,R) FOR(OK, 0, L){FOR(KO, 0, R){if(A[OK][KO]>-oo&&A[OK][KO]<oo)cout<<A[OK][KO]<<' ';else cout << "- ";} cout << '\n';}cout << '\n'; #define fs first #define sd second #define ii pair<int,int> #define iii pair<int, ii> #define all(A) A.begin(), A.end() #define quickly ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); const int N = 2e6 + 5; int n, q; /// Input int a[N]; void solve(){ } void buildWall(int _n, int _q, int op[], int left[], int right[], int height[], int finalHeight[]){ n = _n; q = _q; for(int k(0) ; k < q ; ++k){ if(op[k] == 1){ for(int i = left[k] ; i <= right[k] ; ++i){ a[i] = max(a[i], height[k]); } } else{ for(int i = left[k] ; i <= right[k] ; ++i){ a[i] = min(a[i], height[k]); } } } for(int i(0) ; i < n ; ++i){ finalHeight[i] = a[i]; } }

Compilation message (stderr)

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