Submission #1084357

#TimeUsernameProblemLanguageResultExecution timeMemory
1084357MahmytMCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; #define ll long long #define ff first #define ss second #define pb push_back string guess_sequence(int N){ string s=""; for(int i=0;i<N;i++){ s+='A'; } int in=0; char a='B'; while(in<N){ in=press(s); for(int i=in;i<N;i++){ s[i]=a; } if(a=='A') a='B'; else if(a=='B') a='X'; else if(a=='X') a='Y'; else if(a=='Y') a='A'; } return a; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:25:9: error: could not convert 'a' from 'char' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   25 |  return a;
      |         ^
      |         |
      |         char