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;
#define ll int
#define sz(x) (ll)x.size()
#define F first
#define S second
#define endl "\n"
#define pb push_back
typedef vector <ll> vi;
typedef pair <ll,ll> ii;
typedef vector <ii> vii;
#define dbg(x) cout<<#x<<": "<<x<<endl;
#define dbg2(x,y) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;
#define dbg3(x,y,z) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl;
void printVct(vi &v){
for(ll i =0; i<sz(v); i++){
cout<<v[i]<<" ";
}
cout<<endl;
}
vector<vi> devise_strategy(int n) {
vector <vi> s(n+1, vi(n+1));
s[0][0] = 0;
s[0][1] = -2;
s[0][n] = -1;
for (ll j = 2; j<n; j++){
s[0][j] = j;
}
for (ll i =1; i<=n; i++){
s[i][0] = 1;
for (ll j = 1; j<=n; j++){
if (j <= i) s[i][j] = -1;
else s[i][j] = -2;
}
}
return s;
}
/*
5
3 4
2 5
4 1
-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... |