Submission #234142

#TimeUsernameProblemLanguageResultExecution timeMemory
234142BinyominCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std ; int press( string s ) { return 0; } string guess_sequence(int N) { vector < char > s, a = { 'A', 'B', 'X', 'Y' } ; string ans = "", p = ""; int cnt = 1, cc; if( press("AB") ) { if( press("A") ) { ans ="A"; s = { 'B', 'X', 'Y' } ; } else { ans ="B"; s = {'A', 'X', 'Y' }; } } else { if( press("X") ) { ans ="X"; s = {'A', 'B', 'Y' }; } else{ ans ="Y"; s = {'A', 'B', 'X'}; } } while( cnt != N ) { p = ans + s[0] + ans + s[1] + ans + s[1] ; cc = press(p) ; if( cc == cnt + 2 ) { cnt ++ ; ans += s[1] ; } else if( cc == cnt + 1 ) { cnt ++ ; ans += s[0] ; } else { cnt ++ ; ans += s[2] ; } } return ans ; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cccWw50y.o: in function `press(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
grader.cpp:(.text+0x0): multiple definition of `press(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'; /tmp/cckuEWHy.o:combo.cpp:(.text+0xc0): first defined here
collect2: error: ld returned 1 exit status