제출 #1318786

#제출 시각아이디문제언어결과실행 시간메모리
1318786tkm_algorithmsCombo (IOI18_combo)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; using ll = long long; #define int ll using P = pair<int, int>; #define all(x) x.begin(), x.end() #define rep(i, l, n) for (int i = l; i < (n); ++i) #define sz(x) (int)x.size() const char nl = '\n'; string guess_sequence(int n) { string p; int x = press("AB"); if (x == 1) { if (press("A"))p += 'A'; else p += 'B'; } else { if (press("X"))p += 'X'; else p += 'Y'; } if (n == 1)return p; char a, b, c; if (p[0] == 'A')a = 'B', b = 'X', c = 'Y'; else if (p[0] == 'B')a = 'A', b = 'X', c = 'Y'; else if (p[0] == 'X')a = 'A', b = 'B', c = 'Y'; else a = 'A', b = 'B', c = 'X'; rep(i, 2, n) { x = press(p+a+p+b+a+p+b+c+p+b+b); if (x == i)p += a; else if (x == i+1)p += b; else p += c; } x = press(p+a+p+b); if (x == n) { if (press(p+a) == n)return p+a; else return p+b; } else return p+c; }

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

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