제출 #259075

#제출 시각아이디문제언어결과실행 시간메모리
259075knightron0콤보 (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
// #include <bits/stdc++.h> #include <string> #include <iostream> #include "combo.h" #define pb push_back #define mp make_pair #define fr first #define sc second #define clr(a) memset(a, 0, sizeof(a)) #define sz(x) x.size() #define printarray(arr) for (auto it = arr.begin(); it != arr.end(); ++it) cout<<*it<<" "; cout<<endl; #define rep(n) for (ll i = 0; i < n; i++) #define repc(i, n) for (ll i = 0; i < n; i++) #define FOR(i, x, y) for (int i = x; i < y; i++) #define DEC(i, x, y) for (int i = x; i >= y; i--) #define all(v) v.begin(), v.end() #define min3(a, b, c) min(a, min(b, c)) #define max3(a, b, c) max(a, max(b, c)) #define alla(a, n) a, a + n #define gcd(a, b) __gcd(a, b) #define lcm(a, b) (a * b)/gcd(a, b) #define int long long int #define ull unsigned long long using namespace std; const int MOD = 1e9 + 7; const int MAXN = 1e5 + 5; string guess_sequence(int N){ string options[4] = {"A", "B", "X", "Y"}; string starting = ""; string curr = ""; for(int i= 0;i<4;i++){ if(press(options[i]) == 1){ starting = options[i]; break; } } curr += starting; for(int i = 2;i<=N;i++){ for(int j = 0;j<4;j++){ if(options[j] == starting) continue; if(press(curr + options[j]) == i){ curr += options[j]; break; } } } return curr; }

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

/usr/bin/ld: /tmp/cc4iVZjA.o: in function `main':
grader.cpp:(.text.startup+0x4c): undefined reference to `guess_sequence[abi:cxx11](int)'
collect2: error: ld returned 1 exit status