제출 #1006693

#제출 시각아이디문제언어결과실행 시간메모리
1006693devariaota콤보 (IOI18_combo)C++17
컴파일 에러
0 ms0 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() string guess_sequence(int n) { string S = "ABXY"; for (char a = 0; a < 4; a++) for (char b = 0; b <4; b++) for (char c = 0; c < 4; c++) for (char d = 0; d < 4; d++) { string res; res += S[a] + S[b] + S[c] + S[d]; int x = press(res); if (x == 4) { cout << res; return; } } } // string guess_sequence(int N) { // string permu = "AAAABBBBXXXXYYYY"; // do { // cout << permu << endl; // } while (next_permutation(all(permu))); // }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:14:7: error: return-statement with no value, in function returning 'std::string' {aka 'std::__cxx11::basic_string<char>'} [-fpermissive]
   14 |       return;
      |       ^~~~~~
combo.cpp:7:14: warning: control reaches end of non-void function [-Wreturn-type]
    7 |   string S = "ABXY";
      |              ^~~~~~