제출 #592912

#제출 시각아이디문제언어결과실행 시간메모리
592912skittles1412곤돌라 (IOI14_gondola)C++17
컴파일 에러
0 ms0 KiB
#include "bits/extc++.h" using namespace std; template <typename T> void dbgh(const T& t) { cerr << t << endl; } template <typename T, typename... U> void dbgh(const T& t, const U&... u) { cerr << t << " | "; dbgh(u...); } #ifdef DEBUG #define dbg(...) \ cerr << "L" << __LINE__ << " [" << #__VA_ARGS__ << "]: "; \ dbgh(__VA_ARGS__); #else #define dbg(...) #define cerr \ if (false) \ cerr #endif #define endl "\n" #define long int64_t #define sz(x) int((x).size()) int valid(int n, int arr[]) { vector<int> cur; for (int i = 0; i < n; i++) { if (arr[i] < n) { cur.push_back(arr[i]); } } rotate(begin(cur), min_element(begin(cur), end(cur)), end(cur)); return is_sorted(begin(cur), end(cur)); } int replacement(int n, int gondolaSeq[], int replacementSeq[]) {} int countReplacement(int n, int inputSeq[]) {}

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

gondola.cpp: In function 'int replacement(int, int*, int*)':
gondola.cpp:42:65: warning: no return statement in function returning non-void [-Wreturn-type]
   42 | int replacement(int n, int gondolaSeq[], int replacementSeq[]) {}
      |                                                                 ^
gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:44:46: warning: no return statement in function returning non-void [-Wreturn-type]
   44 | int countReplacement(int n, int inputSeq[]) {}
      |                                              ^
/usr/bin/ld: /tmp/ccqIwLpn.o: in function `main':
grader.cpp:(.text.startup+0xb6): undefined reference to `valid'
/usr/bin/ld: grader.cpp:(.text.startup+0x108): undefined reference to `countReplacement'
/usr/bin/ld: grader.cpp:(.text.startup+0x132): undefined reference to `replacement'
collect2: error: ld returned 1 exit status