제출 #1141913

#제출 시각아이디문제언어결과실행 시간메모리
1141913mehdiba콤보 (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 = 0; j < n; j++){ if(tt[j] == t[0]) continue; t += tt[j]; for(int k = 0; k < n; k++){ if(tt[k] == t[0]) continue; t += tt[k]; pp.pb(t); t.erase(t.end() - 1); } t.erase(t.end() - 1); } } for(string t : pp) if(press(t) == 3) return t; }

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

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