This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |