제출 #683452

#제출 시각아이디문제언어결과실행 시간메모리
683452Jarif_Rahman죄수들의 도전 (IOI22_prison)C++17
38 / 100
20 ms1620 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 = 39; vector<vector<int>> ans(X, vector<int>(N+1, 0)); for(int i = 0; i < X; i++){ int x = i/13; if(x == 0) ans[i][0] = 0; else ans[i][0] = 1; for(int j = 1; j <= N; j++){ int pos = 12-(i%13); int bit = (j&(1<<pos)); if(x == 0 && !bit) ans[i][j] = (12-pos)+13; else if(x == 0 && bit) ans[i][j] = (12-pos)+26; else if(x == 1 && bit) ans[i][j] = -1; else if(x == 2 && !bit) ans[i][j] = -2; else ans[i][j] = 12-pos+1; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...