# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
719223 | veehz | Prisoner Challenge (IOI22_prison) | C++17 | 13 ms | 1108 KiB |
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 "prison.h"
#include <bits/stdc++.h>
using namespace std;
int get_num(int digit, int pos) {
if (pos < 7)
return 3 * pos + digit + 1;
else
return get_num(2, 6) + 1;
}
string base3(int n) {
string s;
while (n) {
s += (n % 3) + '0';
n /= 3;
}
while (s.size() < 8) s += '0';
reverse(s.begin(), s.end());
return s;
}
int whichBag(int pos, int ifA, int ifB) {
if (pos % 2) return ifA;
return ifB;
}
vector<vector<int>> devise_strategy(int n) {
vector<vector<int>> strategy(27, vector<int>(n + 1));
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |