답안 #975593

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
975593 2024-05-05T14:13:50 Z yeediot 콤보 (IOI18_combo) C++17
컴파일 오류
0 ms 0 KB
#include "combo.h"
#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define all(x) x.begin(),x.end()
#define pii pair<int,int>
#define pb push_back
#define sz(x) (int)(x.size())
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
#define vi vector<int>
#define vp vector<pii>
#define vvi vector<vi>
#define ykh mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count())
#define __lg(x) 63-__builtin_clzll(x)
#define pow2(x) (1LL<<x)
string guess_sequence(int n){
    string s;
    vector<char>v={'A','B','X','Y'};
    for(int j=0;j<4;j++){
        for(int i=0;i<n;i++){
            if(j==0)s+=v[j];
            else s[i]=v[j];
        }
        int x=guess(s);
        if(x==1){
            break;
        }
    }
    for(int i=1;i<n;i++){
        for(int j=0;j<4;j++){
            s[i]=v[j];
            int x=press(s);
            if(x==i+1){
                break;
            }
        }
    }
    return s;
}
 /*
 input:
 
 */















 

Compilation message

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:26:15: error: 'guess' was not declared in this scope
   26 |         int x=guess(s);
      |               ^~~~~