Submission #421904

# Submission time Handle Problem Language Result Execution time Memory
421904 2021-06-09T13:34:31 Z shenxy Navigation 2 (JOI21_navigation2) C++17
0 / 100
0 ms 196 KB
#include "Anna.h"
#include <algorithm>
#include <vector>
using namespace std;
void Anna(int N, int K, vector<int> R, vector<int> C) {
	for (int i = 0; i < N; ++i) {
		for (int j = 0; j < N; ++j) {
			int flag = 0;
			for (int k = 0; k < K; ++k) flag = flag * 3 + (abs(i - R[k]) + abs(j - C[k])) % 3;
			SetFlag(i, j, flag + 1);
		}
	}
}
#include "Bruno.h"
#include <algorithm>
#include <vector>
using namespace std;
int arr[4] = {5, 3, 7, 1};
vector<int> Bruno(int K, vector<int> value) {
	vector<int> ans(K, 4);
	for (int i = 0; i < K; ++i) {
		for (int j = 0; j < 4; ++j) {
			if ((value[arr[j]] + 1) % 3 == value[4] % 3) ans[i] = j;
			value[arr[j]] /= 3;
		}
		value[4] /= 3;
	}
	reverse(ans.begin(), ans.end());
	return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 196 KB Wrong Answer [7]
2 Halted 0 ms 0 KB -