Submission #1270109

#TimeUsernameProblemLanguageResultExecution timeMemory
1270109almazCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' #define ff first #define ss second #define pb push_back #define all(a) a.begin(), a.end() const int MOD = 1e9 + 7,INF = 1e18; string guess_sequence(int n) { ios::sync_with_stdio(false); cin.tie(nullptr); string s = ""; string ans = ""; string a , b , c; int t = press("AB"); if(t > 0){ int f = press("A"); if(f == 1){ ans += "A"; a = "B"; b = "X"; c = "Y"; } else{ ans += "B"; a = "A"; b = "X"; c = "Y"; } } else{ int f = press("X"); if(f == 1){ ans += "X"; a = "B"; b = "A"; c = "Y"; } else{ ans += "Y"; a = "B"; b = "X"; c = "A"; } } for(int i = 1; i < n;i++){ int h = press(ans + a + a + ans + a + b + ans + b + c); h -= ans.size(); if(h == 0){ ans += c; } if(h == 1){ int j = press(ans + b + b); j -= ans.size(); if(j == 0){ ans += a + b; } if(j == 1){ ans += b + a; } if(j == 2){ ans += b + b; } i++; } if(h == 2){ int j = press(ans + a + a); j -= ans.size(); if(j == 0){ ans += b + c; } if(j == 1){ ans += a + b; } if(j == 2){ ans += a + a; } i++; } } return ans; }

Compilation message (stderr)

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