Submission #486648

#TimeUsernameProblemLanguageResultExecution timeMemory
486648alextodoranNavigation 2 (JOI21_navigation2)C++17
0 / 100
19 ms564 KiB
/** ____ ____ ____ ____ ____ ||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); } }
/** ____ ____ ____ ____ ____ ||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]; 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 timeMemoryGrader output
Fetching results...