제출 #1103870

#제출 시각아이디문제언어결과실행 시간메모리
1103870asdfghjk콤보 (IOI18_combo)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #define ll long long #define pb push_back #define all(x) x.begin(), x.end() #define F first #define ld long double #define S second using namespace std; const ll N = 5e3 + 5; const ll NN = 4e5 + 5; const ll INF = 1e18; const ll inf = 1e9; const ll MOD = 1e9 + 7; char a[5]; int press(std::string p); string guess_sequence(int n){ a[1] = 'A'; a[2] = 'B'; a[3] = 'X'; a[4] = 'Y'; string s = ""; int res = 0; for(int i = 1;i <= n;i++){ for(int j = 1;j <= 4;j++){ s += a[j]; int val = press(s); if(val > res){ res = val; break; } s.pop_back(); } } return s; } main(){ ios_base::sync_with_stdio(0); cin.tie(0); // fflush(stdout); ll abd =1; cin >>abd; for(ll i = 1;i <= abd;i++){ solve(); } }

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

combo.cpp:36:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   36 | main(){
      | ^~~~
combo.cpp: In function 'int main()':
combo.cpp:43:9: error: 'solve' was not declared in this scope
   43 |         solve();
      |         ^~~~~