답안 #640082

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
640082 2022-09-13T14:19:40 Z victor_gao Fish 2 (JOI22_fish2) C++17
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
#include "dango3.h"
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void Solve(int N,int M){
    int B[30]={0,1,1,1,1,1,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,5,5,5};
    deque<int>all;
    for (int i=1;i<=N*M;i++)
        all.push_back(i);
    for (int i=1;i<=M;i++){
        bool find=1;
        assert(all.size()==(N*(M-i+1)));
        while (find){
            shuffle(all.begin(),all.end(),rng);
            vector<int>now;
            vector<int>ok,no;
            int sz=all.size();
            for (int j=0;j<sz/B[i];j++){
                now.push_back(all[sz+j-sz/B[i]]);
            }
            int Q=Query(now);
            if (Q==0) continue;
            else {
                int nsz=now.size();
                for (int i=0;i<nsz;i++){
                    int out=now.back();
                    now.pop_back();
                    all.pop_back();
                    int nq=Query(now);
                    if (nq==0){
                        now.insert(now.begin(),out);
                    }
                    else no.push_back(out);
                }
                for (auto j:no)
                    all.push_back(j);
                if (now.size()!=N){
                    assert(0);
                }
                find=0;
                Answer(now);
            }
        }
    }
}

Compilation message

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