# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
486650 | alextodoran | Navigation 2 (JOI21_navigation2) | C++17 | 804 ms | 900 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/**
____ ____ ____ ____ ____
||a |||t |||o |||d |||o ||
||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|
**/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int East = 0;
const int West = 1;
const int South = 2;
const int North = 3;
const int Finish = 4;
#include "Anna.h"
void SetFlag (int r, int c, int value);
void Anna (int N, int K, vector <int> R, vector <int> C)
{
for(int r = 0; r < N; r++)
for(int c = 0; c < N; c++)
{
int value = 0;
for(int t = 0; t < K; t++)
{
value *= 5;
if(r == R[t] && c == C[t])
value += Finish;
else if(r < R[t])
value += South;
else if(r > R[t])
value += North;
else if(c < C[t])
value += East;
else if(c > C[t])
value += West;
}
SetFlag(r, c, value + 1);
}
}
/**
____ ____ ____ ____ ____
||a |||t |||o |||d |||o ||
||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|
**/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int East = 0;
const int West = 1;
const int South = 2;
const int North = 3;
const int Finish = 4;
#include "Bruno.h"
vector <int> Bruno (int K, vector <int> value)
{
int mat[3][3];
for(int i = 0; i < 3; i++)
for(int j = 0; j < 3; j++)
mat[i][j] = value[i * 3 + j] - 1;
vector <int> sol (K);
for(int t = K - 1; t >= 0; t--)
{
sol[t] = mat[1][1] % 5;
mat[1][1] /= 5;
}
return sol;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |