이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//#pragma GCC optimize("Ofast,unroll-loops")
//#pragma GCC target("avx,avx2,fma")
#include "prison.h"
#include<bits/stdc++.h>
using namespace std;
vector<vector<int>> devise_strategy(int n){
vector<vector<int>> v(43, vector<int>(n+1));
for (int i=0; i<43; ++i) v[i][0]=1;
int mm=1000;
for (int r=0; r<4; ++r){
for (int i=10*r+3; i<10*(r+1)+3; ++i){
for (int j=1; j<=n; ++j){
int t=j/mm%10;
if (i%10<t) v[i][j]=-1;
if (i%10>t) v[i][j]=-2;
if (i%10==t) v[i][j]=40+r;
}
}
mm/=10;
if (r==3) break;
for (int j=1; j<=n; ++j){
v[r][j]=10*r+(j/mm)%10;
}
}
return v;
}
// int32_t main(){
// cout << devise_strategy(9);
// return 0;
// }
// int32_t main(){
// ios_base::sync_with_stdio(false);
// cin.tie(nullptr);
// #ifdef beez
// NEVER GONNA GIVE YOU UP
// NEVER GONNA LET YOU DOWN
// NEVER GONNA RUN AROUND AND DESERT YOU
// #endif // beez
// int ntests=1;
// cin >> ntests;
// while (ntests--) solve();
// return 0;
// }
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |