Submission #892681

#TimeUsernameProblemLanguageResultExecution timeMemory
892681Trisanu_DasPrisoner Challenge (IOI22_prison)C++17
0 / 100
1 ms348 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...