Submission #1056230

#TimeUsernameProblemLanguageResultExecution timeMemory
1056230epicci23Prisoner Challenge (IOI22_prison)C++17
0 / 100
1 ms348 KiB
#include "bits/stdc++.h" #include "prison.h" #define all(v) v.begin() , v.end() #define sz(a) (int)a.size() using namespace std; vector<vector<int>> devise_strategy(int N) { vector<vector<int>> v(27,vector<int>(N+1,0)); v[0][0]=0; for(int i=1;i<=N;i++) v[0][i]=1+(i>>12); for(int i=1;i<=26;i++){ if((i-1)%4<=1) v[i][0]=1; else v[i][0]=0; } for(int j=12;j>=1;j--){ for(int i=1;i<=N;i++){ int xd=i>>j&1; int xd2=!((i>>(j-1))&1); if(xd){ v[(13-j)*2][i]=(14-j)*2-xd2; v[(13-j)*2-1][i]=-1; } else{ v[(13-j)*2][i]=-2; v[(13-j)*2-1][i]=(14-j)*2-xd2; } } } for(int i=1;i<=N;i++){ if(i&1) v[25][i]=-1; else v[25][i]=0; if(i&1) v[26][i]=0; else v[26][i]=-2; } return v; } /*void _(){ } int32_t main(){ cin.tie(0); ios::sync_with_stdio(0); int tc=1;//cin >> tc; while(tc--) _(); return 0; }*/
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...