Submission #92963

#TimeUsernameProblemLanguageResultExecution timeMemory
92963temoyanteladzeCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n) { string s; if (n==1){ if (press('A')) s='A'; if (press('B')) s='B'; if (press('X')) s='X'; if (press('Y')) s='Y'; } return s; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:9:19: error: could not convert ''A'' from 'char' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
    9 |         if (press('A'))
      |                   ^~~
      |                   |
      |                   char
combo.cpp:11:19: error: could not convert ''B'' from 'char' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   11 |         if (press('B'))
      |                   ^~~
      |                   |
      |                   char
combo.cpp:13:20: error: could not convert ''X'' from 'char' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   13 |          if (press('X'))
      |                    ^~~
      |                    |
      |                    char
combo.cpp:15:19: error: could not convert ''Y'' from 'char' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   15 |         if (press('Y'))
      |                   ^~~
      |                   |
      |                   char