Submission #915523

#TimeUsernameProblemLanguageResultExecution timeMemory
915523NamkhingPrisoner Challenge (IOI22_prison)C++17
0 / 100
0 ms348 KiB
#include "prison.h" #include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; vvi devise_strategy(int N) { vvi report(39, vi(N + 1)); for (int i = 0; i < 13; i++) { report[3 * i][0] = 0; report[3 * i + 1][0] = report[3 * i + 2][0] = 1; for (int j = 1; j <= N; j++) { int total = (j & (1 << (12 - i))) > 0; report[3 * i][j] = total + 3 * i + 1; report[3 * i + 1][j] = total == 0 ? 3 * (i + 1) : total > 0 ? -1 : -2; report[3 * i + 2][j] = total == 1 ? 3 * (i + 1) : total < 1 ? -2 : -1; } } return report; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...