답안 #218152

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
218152 2020-04-01T10:33:00 Z 2fat2code Password (RMI18_password) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "victor.h"
#define ll long long
#define ld long double
#define all(a) (a).begin(), (a).end()
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define sz() size()
#define fr first
#define sc second
#define pi pair<int,int>
#define pii pair<pair<int,int>,int>
#define mp make_pair
//#define int long long
#define rc(s) return cout<<s,0
#define rcc(s) cout<<s,exit(0)
using namespace std;

const int mod=1e9+7;
const int modp=1999999973;
const int modulo=998244353;

int cnt[26];
queue<string>q;

int query(string str);

string guess(int n,int s){
    ios_base::sync_with_stdio(false);cin.tie(0);cerr.tie(0);cout.tie(0);
    srand(chrono::steady_clock::now().time_since_epoch().count());
    for(int i=0;i<s;i++){
        string tz;
        for(int j=1;j<=n;j++) tz.push_back(i+'a');
        cnt[i] = query(tz);
    }
    for(int i=0;i<s;i++){
        string tz;
        for(int j=1;j<=cnt[i];j++) tz.push_back(i+'a');
        if(tz.size()) q.push(tz);
    }
    while(q.size()>=2){
        string t1=q.front();
        q.pop();
        string t2=q.front();
        q.pop();
        string pref="";
        int i=0;
        for(int j=0;j<=t2.size();j++){
            string t4 = pref + t1[i] + t2.substr(j,t2.size()-j);
            if(query(t4)==(t2.size()+i+1)){
                pref.push_back(t1[i]);
                i++;
                if(i==t1.size()){
                    pref+=t2.substr(j,t2.size()-j);
                    break;
                }
                j--;
            }
            else pref.push_back(t2[j]);
        }
        q.push(pref);
    }
    return q.front();
}

Compilation message

password.cpp:2:10: fatal error: victor.h: No such file or directory
 #include "victor.h"
          ^~~~~~~~~~
compilation terminated.