제출 #480319

#제출 시각아이디문제언어결과실행 시간메모리
480319omg콤보 (IOI18_combo)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
#include "combo.h"
using namespace std; 
string guess_sequence(int N) {
  string R=""; 
  int comboCur=0; 
  string target="AXYZ"; 
  for (int i=0;i<N;i++) {
    for (int j=0;j<4; j++) {
      R.push_back(target[j]); 
      if (press(R) > comboCur) break; 
      R.pop_back(); 
    }
    comboCur++; 
  }
  cout<<R;
  return;  
}

컴파일 시 표준 에러 (stderr) 메시지

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:17:3: error: return-statement with no value, in function returning 'std::string' {aka 'std::__cxx11::basic_string<char>'} [-fpermissive]
   17 |   return;
      |   ^~~~~~