이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 pb push_back
#define MID ((l+r)/2)
#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;
typedef vector <ll> vi;
typedef pair <ll,ll> ii;
typedef vector <ii> vii;
void printVct(vi &v, string s = ""){
cout<<s<<": ";
for (ll i=0; i<sz(v); i++){
cout<<v[i]<<" ";
}
cout<<endl;
}
void printVct2D(vector <vi> &v, string s = ""){
cout<<s<<": ";
for (ll i=0; i<sz(v); i++){
cout<<i<<": ";
for (ll j =0; j<sz(v[i]); j++){
cout<<v[i][j]<<" ";
}
cout<<endl;
}
cout<<endl;
}
vector<vi> devise_strategy(int n) {
vector <vi> s(n+1, vi(n+1));
for (ll i=0; i<=n; i++){
s[0][i] = i;
}
for (ll i=1; i<=n; i++){
s[i][0] = 1;
for (ll j =1; j<i; j++){
s[i][j] = -2;
}
for (ll j =i; j<=n; j++){
s[i][j] = -1;
}
}
// printVct2D(s, "s");
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |