Submission #1243010

#TimeUsernameProblemLanguageResultExecution timeMemory
1243010CirclingCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include <iostream> #include <iomanip> #include <utility> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <algorithm> #include <cmath> #include <cstdint> using namespace std; int press(string p){ } string guess_sequence(int n){ string ans, comb, c1, c2, c3; char first; if (press("AB") > 0) first = "BA"[press("A")]; else first = "XY"[press("Y")]; c1 = "AB"[first < 'B']; c2 = "BX"[first < 'X']; c3 = "XY"[first < 'Y']; ans += first; comb = c1 + c2 + c3; for (int i = 1; i < n - 1; i++) ans += comb[press(ans + c2 + ans + c3 + c1 + ans + c3 + c2 + ans + c3 + c3) - i]; if (press(ans + c1) == n) return ans + c1; else if (press(ans + c2) == n) return ans + c2; else return ans + c3; } int main(){ }

Compilation message (stderr)

combo.cpp: In function 'int press(std::string)':
combo.cpp:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | }
      | ^
/usr/bin/ld: /tmp/cceo31Fl.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/ccdjJlbI.o:combo.cpp:(.text.unlikely+0x0): first defined here
/usr/bin/ld: /tmp/cceo31Fl.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccdjJlbI.o:combo.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status