답안 #958286

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
958286 2024-04-05T10:12:08 Z lovrot Fish 2 (JOI22_fish2) C++17
컴파일 오류
0 ms 0 KB
#include "dango3.h"
#include <vector>
#include <cstdio>
#include <algorithm> 

using namespace std;

const int MAXN = 30;
const int OO = 2e9;

int DP[MAXN], I[MAXN];

void dnc(vector<int> V, int n) {
	if(n == 1) {
		Answer(V);
		return;
	}
	
	vector<int> _V;
	for(int i = (int) V.size() - 1; i >= 0; --i) {
		int x = V[i];
		V.erase(V.begin() + i); 
		if(Query(V) >= I[n]) _V.push_back(x);
		else V.push_back(x);
	}
	
	dnc(V, I[n]);
	dnc(_V, n - I[n]);
}

void Solve(int N, int M) {
	DP[1] = 0;
	for(int i = 2; i <= M; ++i) {
		DP[i] = OO;
		for(int j = 1; j < i; ++j) 
			if(DP[i] > DP[j] + DP[i - j] + i) {
				DP[i] = DP[j] + DP[i - j] + i;
				I[i] = j;
			}
	}

	vector<int> V;
	for(int i = 1; i <= N * M; ++i) V.push_back(i);
	dnc(V, M);
}

Compilation message

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