Submission #1073024

#TimeUsernameProblemLanguageResultExecution timeMemory
1073024ZicrusPrisoner Challenge (IOI22_prison)C++17
30 / 100
18 ms2140 KiB
#include <bits/stdc++.h> #include "prison.h" using namespace std; typedef long long ll; int n; vector<vector<int>> devise_strategy(int N) { n = N; int x = 2*26; vector<vector<int>> res(x+1, vector<int>(n+1)); for (int i = 0; i <= x; i++) { res[i][0] = i&1; for (int j = 1; j <= n; j++) { bool b = (j >> (12-(i%26)/2)) & 1; if ((i&1) && (b != i/26)) { res[i][j] = b < i/26 ? -2 : -1; continue; } res[i][j] = (i%26)+1 + 26*(!(i&1) && b); if (res[i][j] > x) res[i][j] = 0; } } return res; } #ifdef TEST #include "grader.cpp" #endif
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...