Submission #683454

#TimeUsernameProblemLanguageResultExecution timeMemory
683454Jarif_RahmanPrisoner Challenge (IOI22_prison)C++17
0 / 100
8 ms752 KiB
#include <bits/stdc++.h> #define pb push_back #define f first #define sc second using namespace std; typedef long long int ll; typedef string str; vector<vector<int>> devise_strategy(int N){ int X = 32; vector<vector<int>> ans(X, vector<int>(N+1, 0)); for(int i = 0; i < X; i++){ int x = i/8; if(x == 0) ans[i][0] = 0; else ans[i][0] = 1; for(int j = 1; j <= N; j++){ int pos = 7-(i%8); int b = (j&(1<<pos))/(1<<pos); if(x == 0) ans[i][j] = (7-pos)+(b+1)*8; else if(b > x-1) ans[i][j] = -1; else if(b < x-1) ans[i][j] = -2; else ans[i][j] = 7-pos+1; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...