# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
418050 | Mamnoon_Siam | Navigation 2 (JOI21_navigation2) | C++17 | 21 ms | 464 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
using ii = pair<int, int>;
using ll = long long;
using vll = vector<ll>;
using vi = vector<int>;
#define fi first
#define se second
#define all(v) begin(v), end(v)
#define sz(v) (int)(v.size())
namespace {
} // namespace
void Anna(int N, int K, std::vector<int> R, std::vector<int> C) {
for(int r = 0; r < N; ++r) {
for(int c = 0; c < N; ++c) {
vi action(7, 4);
for(int i = 0; i < K; ++i) {
if(C[i] > c) action[i] = 0;
if(C[i] < c) action[i] = 1;
if(R[i] > r) action[i] = 2;
if(R[i] < r) action[i] = 3;
}
int value = 0;
for(int i = K-1; i >= 0; --i) {
value = value * 5 + action[i];
}
SetFlag(r, c, value);
}
}
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
using ii = pair<int, int>;
using ll = long long;
using vll = vector<ll>;
using vi = vector<int>;
#define fi first
#define se second
#define all(v) begin(v), end(v)
#define sz(v) (int)(v.size())
namespace {
} // namespace
vi Bruno(int K, vi value) {
int number = value[4];
vi ret(K);
for(int i = 0; i < K; ++i) {
ret[i] = number % 5;
number /= 5;
}
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |