제출 #1141894

#제출 시각아이디문제언어결과실행 시간메모리
1141894mehdiba콤보 (IOI18_combo)C++20
0 / 100
0 ms408 KiB
#include "combo.h" #include <bits/stdc++.h> #define endl '\n' #define pb push_back #define F first #define S second #define all(v) v.begin(), v.end() #define allr(v) v.rbegin(), v.rend() using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; string guess_sequence(int n){ string p = ""; // press(p): gives the amount of coins you get by pressing the string p vector<string> pp; string tt = "ABXY"; for(int i = 0; i < n; i++){ string t; t += tt[i]; for(int j = i + 1; j < n; j++){ t += tt[j]; for(int k = j + 1; k < n; k++){ t += tt[k]; pp.pb(t); } } } for(string t : pp) if(press(t) == 3) return t; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:31:1: warning: control reaches end of non-void function [-Wreturn-type]
   31 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...