Submission #1215113

#TimeUsernameProblemLanguageResultExecution timeMemory
1215113nataliaaCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include "combo.h"
using namespace std;
string guess_sequence(int N) {
	string p = "";
	char c[4] = {'A', 'B', 'X', 'Y'};
	for(int j = 0; j < 3; j++) {
		for(int i = 0; i < 4; i++) {
			int ok = press(c[i]);
			if(ok) {
				p+=c[i];
				break;
			}
		}
	}
	

	return p;
}

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:8:43: error: could not convert 'c[i]' from 'char' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
    8 |                         int ok = press(c[i]);
      |                                        ~~~^
      |                                           |
      |                                           char