제출 #788189

#제출 시각아이디문제언어결과실행 시간메모리
788189Bula콤보 (IOI18_combo)C++17
컴파일 에러
0 ms0 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define int ll const ll mod=1e9+7; string guess_sequence(int n){ string s="."; vector<string> v={"A","B","X","Y"}; int x=3; for(int i=0;i<3;i++){ int k=press(v[i]); if(k==1){ s=v[i]; x=i; break; } } if(s==".") s=v[3]; vector<string> t; for(int i=0;i<4;i++){ if(i!=x) t.pb(v[i]); } if(n==1) return s; for(int i=1;i<n-1;i++){ string p=s+t[0]; for(int j=0;j<3;j++){ string k=s+t[1]; k+=t[j]; p+=k; } int N=(int) s.size(); int c=press(p); if(c==N){ s+=t[2]; }else if(c==N+1) s+=t[0]; else s+=t[1]; } if(n==2) return s; for(int i=0;i<2;i++){ string p=s+t[i]; int c=press(p); if(c==n){ s+=t[i]; break; } } if((int) s.size() == n-1) s+=t[2]; return s; }

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

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