QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#525619#4561. Catfish Farmgreen_gold_dog#Compile Error//C++20815b2024-08-20 19:29:262024-08-20 19:29:27

Judging History

你现在查看的是最新测评结果

  • [2024-08-20 19:29:27]
  • 评测
  • [2024-08-20 19:29:26]
  • 提交

answer

#include "prison.h"
#include <bits/stdc++.h>

using namespace std;

typedef int ll;

const ll col = 7, osn = 4;

vector<vector<ll>> devise_strategy(ll n) {
	vector<vector<ll>> ans(col * (osn + 1), vector<ll>(n + 1));
	for (ll i = 0; i < col * (osn + 1); i++) {
		ll t = i % (osn + 1);
		ll nb = i / (osn + 1);
		if (t == 0) {
			ans[i][0] = 0;
		} else {
			ans[i][0] = 1;
		}
		for (ll j = 1; j <= n; j++) {
			ll nx = j - 1;
			for (ll k = 0; k < col - nb - 1; k++) {
				nx /= osn;
			}
			nx %= osn;
			if (t == 0) {
				ans[i][j] = i + nx + 1;
			} else {
				t--;
				if (nx == t) {
					ans[i][j] = i - t + osn;
					if (ans[i][j] >= ans.size()) {
						ans[i][j] = i;
					}
				}
				if (nx > t) {
					ans[i][j] = -1;
				}
				if (nx < t) {
					ans[i][j] = -2;
				}
				t++;
			}
		}
	}
	return ans;
}

Details

answer.code:1:10: fatal error: prison.h: No such file or directory
    1 | #include "prison.h"
      |          ^~~~~~~~~~
compilation terminated.