제출 #574423

#제출 시각아이디문제언어결과실행 시간메모리
574423MohamedFaresNebili곤돌라 (IOI14_gondola)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> /// #include "gondola.h" #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; using ll = long long; using ii = pair<int, int>; using vi = vector<int>; #define pb push_back #define pp pop_back #define ff first #define ss second #define lb lower_bound typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set; int valid(int n, int arr[]) { int occ[250001]; memset(occ, 0, sizeof occ); for(int l = 0; l < n; l++) { occ[arr[l]]++; if(occ[arr[l]] > 1) return 0; } for(int l = 1; l < n; l++) { if(arr[l] != arr[l - 1] + 1 && arr[l] != 1) return 0; } return 1; } //---------------------- int replacement(int n, int gondolaSeq[], int replacementSeq[]) { return -2; } //---------------------- int countReplacement(int n, int inputSeq[]) { return -3; }

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

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