제출 #1068093

#제출 시각아이디문제언어결과실행 시간메모리
1068093Unforgettablepl죄수들의 도전 (IOI22_prison)C++17
41 / 100
13 ms1628 KiB
#include "prison.h" #include <bits/stdc++.h> using namespace std; vector<vector<int>> devise_strategy(int N){ vector<vector<int>> ans; for(int bit=12;bit;bit--) { vector<int> curr(N+1); curr[0]=0; for(int i=1;i<=N;i++) { if(i&(1<<bit))curr[i]=ans.size()+2; else curr[i]=ans.size()+1; } ans.emplace_back(curr); // If 0 at bit curr[0]=1; for(int i=1;i<=N;i++) { if(i&(1<<bit))curr[i]=-1; else curr[i]=ans.size()+2; } ans.emplace_back(curr); // If 1 at bit curr[0]=1; for(int i=1;i<=N;i++) { if(i&(1<<bit))curr[i]=ans.size()+1; else curr[i]=-2; } ans.emplace_back(curr); } vector<int> curr(N+1); curr[0]=0; for(int i=1;i<=N;i++) { if(i&1)curr[i]=-2; else curr[i]=-1; } ans.emplace_back(curr); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...