Submission #130113

#TimeUsernameProblemLanguageResultExecution timeMemory
130113HungAnhGoldIBO2020Combo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include<iostream> using namespace std; char ohyeah[]={'X','Y','A','B'}; int press(string p){ } string guess_sequence(int N){ string cac=""; int i,j; for(i=0;i<N;i++){ for(j=0;j<4;j++){ if(i!=0&&cac[0]==ohyeah[j]){ continue; } if(press(cac+ohyeah[j])==i+1){ cac+=ohyeah[j]; break; } } } return cac; }

Compilation message (stderr)

combo.cpp: In function 'int press(std::string)':
combo.cpp:5:1: warning: no return statement in function returning non-void [-Wreturn-type]
    5 | }
      | ^
/usr/bin/ld: /tmp/ccK5hTqZ.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/ccRw6Y4Z.o:combo.cpp:(.text.unlikely+0x0): first defined here
collect2: error: ld returned 1 exit status