제출 #975738

#제출 시각아이디문제언어결과실행 시간메모리
975738ALeonidou죄수들의 도전 (IOI22_prison)C++17
0 / 100
1 ms348 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...