# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
748734 | QwertyPi | Prisoner Challenge (IOI22_prison) | C++17 | 11 ms | 1364 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;
vector<vector<int>> ans;
const int MAX = 21;
const int C = 7;
int a[C] = {2, 3, 3, 3, 3, 3, 3};
int p[C] = {18, 15, 12, 9, 6, 3, 0};
void solve(int L, int R, int ai, int ID){
ans[ID][0] = ai % 2 != 0;
if(R - L < 2) return;
ans[ID][L] = ai % 2 != 0 ? -2 : -1;
ans[ID][R - 1] = ai % 2 != 0 ? -1 : -2;
L++; R--;
if(L >= R) return;
assert(ai != -1);
vector<int> M;
M.push_back(L);
for(int i = 1; i < a[ai]; i++){
M.push_back((L * (a[ai] - i) + R * i) / a[ai]);
}
M.push_back(R);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |