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;
using ll = int;
#define MP make_pair
#define fi first
#define se second
#define pll pair <ll,ll>
#define sz(a) (ll((a).size()))
#define BIT(mask,i) (((mask) >> (i))&1LL)
#define MASK(i) (1LL<<(i))
std::vector<std::vector<int>> devise_strategy(int n) {
vector <vector<ll> > res(n+1,vector <ll> (n+1,0));
res[0][0] = 0;
for (ll i = 1;i <= n;i ++)res[i][0] = 1;
for (ll i = 1;i <= n;i ++)res[0][i] = i;
for (ll i = 1;i <= n;i ++){
for (ll j = 1;j <= i;j ++)res[i][j] = -2;
for (ll j = i+1;j <= n;j ++)res[i][j] = -1;
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |