제출 #919582

#제출 시각아이디문제언어결과실행 시간메모리
919582Khanhcsp2콤보 (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
#include "combo.h" #include <bits/stdc++.h> #define el '\n' #define fi first #define sc second #define int long long using namespace std; using ll=long long; using ull=unsigned long long; using ld=long double; const int mod=1e9+7; const int N=1e5+11; string guess_sequence(int n) { string s="ABXY", ans=""; int ch, pos; ch=press("AB"); if(ch) { int v=press("A"); if(v) pos=0; else pos=1; } else { int v=press("X"); if(v) pos=2; else pos=3; } ans+=s[pos]; swap(s[pos], s[3]); for(int i=1;i<n;i++) { string tmp=ans+s[0]+s[0]+ans+s[0]+s[1]+ans+s[0]+s[2]+ans+s[1]; int l=press(tmp); if(l==i+2) ans+=s[0]; else if(l==i+1) ans+=s[1]; else ans+=s[2]; } if(press(ans+s[0])==n) return ans+s[0]; else if(press(ans+s[1])==n) return ans+s[1]; else return ans+s[2]; } //void sol() //{ // //} //signed main() //{ //// freopen("task.INP", "r", stdin); //// freopen("task.OUT", "w", stdout); // ios_base::sync_with_stdio(0); // cin.tie(0); // int t=1; // //cin >> t; // while(t--) // { // sol(); // } //}

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

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