Submission #552278

#TimeUsernameProblemLanguageResultExecution timeMemory
552278pckienCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#define fto(i, a, b) for (int i = a; i <= b; ++i)
using namespace std;

int n;
string haha[5] = {"A", "B", "X", "Y"};

int press(string p){
};

string guess_sequence(int n){
	int hoho, hehe = 0;
	string tmp = "", G = "";
	fto(i, 1, n){
		fto(j, 0, 3){
			tmp = G + haha[j];
			cout << tmp << endl;
			cin >> hoho;
			if (hehe < hoho){
				hehe = hoho;
				G = tmp;
				break;
			}
		}
	}	

	return G;
}




// int main(){
// 	cin >> n;


// 	return 0;
// }

Compilation message (stderr)

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