Submission #142688

#TimeUsernameProblemLanguageResultExecution timeMemory
142688triplem5dsCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include "combo.h"
#include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
char go[] = {'A','B','X','Y'};

std::string guess_sequence(int N) {
  std::string p = "";
  for(int i = 0; i < N; i++){
  	for(int j = 0; j < 4; j++){
  		p.push_back(go[j]);
  		int x = press(p);
  		if(x > i){
  			break;
  		}
  		p.pop_back();
  	}
  }
  return p;
}

Compilation message (stderr)

/usr/bin/ld: /tmp/ccLognde.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/cc46ERsd.o:combo.cpp:(.text+0x0): first defined here
/usr/bin/ld: /tmp/ccLognde.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc46ERsd.o:combo.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status