# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
774073 | jasmin | Prisoner Challenge (IOI22_prison) | C++17 | 0 ms | 0 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;
std::vector<std::vector<int>> devise_strategy(int n) {
vector<int> ans(n+1, -1);
ans[0][0]=0;
for(int i=1; i<=n; i++){
ans[i][0]=1;
}
for(int i=1; i<=n; i++){
for(int j=1; j<=n; j++){
if(j<i){
ans[i][j]=-2;
}
else{
ans[i][j]=-1;
}
}
}
return ans;
}