제출 #1248075

#제출 시각아이디문제언어결과실행 시간메모리
1248075exoworldgdCombo (IOI18_combo)C++20
컴파일 에러
0 ms0 KiB
#pragma GCC optimize("O3") #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt") #include <bits/stdc++.h> #define exoworldgd cin.tie(0)->sync_with_stdio(0),cout.tie(0) #define int long long using namespace std; int press(string s); int ask(string s) {return press(s);} string guess_sequence(int n) { string res= ""; char c[4] = {'A','B','X','Y'},first; if (ask("A") > 0) first = 'A'; else if (ask("B") > 0) first = 'B'; else if (ask("X") > 0) first = 'X'; else first = 'Y'; res += first; vector<char> ch; for (char chr : c) if (chr != first) ch.push_back(chr); for (int i = 1; i< n; i ++) { bool yes = 0; for (int j =0 ; j < 2 && !yes; j++) { string temp = res + ch[j]; if (ask(temp) == i+1) res += ch[i], yes = 1; } if (!yes) res += ch[2]; } return res; }

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

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