제출 #92963

#제출 시각아이디문제언어결과실행 시간메모리
92963temoyanteladze콤보 (IOI18_combo)C++14
컴파일 에러
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; }

컴파일 시 표준 에러 (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