Submission #892684

#TimeUsernameProblemLanguageResultExecution timeMemory
892684Trisanu_DasPrisoner Challenge (IOI22_prison)C++17
56 / 100
11 ms1324 KiB
#include <bits/stdc++.h> using namespace std; vector<vector<int> > devise_strategy(int N) { vector<vector<int> > ans(27, vector<int> (N + 1)); for(int i = 0; i < 27; i++) ans[i][0] = ((i + 1) >> 1) & 1; for(int i = 0; i < 27; i++) { for(int j = 1; j <= N; j++) { int ex = (i + 1) >> 1, case_ = i & 1; if((!!(j & (1 << (13 - ex)))) ^ case_) ans[i][j] = (case_ ^ (ex & 1)) ? -1 : -2; else ans[i][j] = min(2 * (ex + 1) - !!(j & (1 << (13 - ex - 1))), 26); } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...