제출 #735216

#제출 시각아이디문제언어결과실행 시간메모리
735216MrAndriaRack (eJOI19_rack)C++17
0 / 100
1 ms324 KiB
#include <bits/stdc++.h> using namespace std; #define pb push_back #define ff first #define ss second map <long long,long long> b; long long n,k,p,p1,l; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cin>>n>>k; p=pow(2,n); for(int i=n-1;i>=1;i--){ p1=pow(2,i); // cout<<"21321213"<<endl; for(int j=1;j<=p/2;j++){ if(j%p1==1 and b[j]==0){ l++; b[j]=1; if(l==k){ cout<<j<<endl; return 0; } l++; if(l==k){ cout<<j+p/2<<endl; return 0; } } } } } /* ########################### ########################## ################################ ##################################### #################### ############################################## ############################### ############################### ################################## ##################################### #################### ################################################## ################################# ################################# #################################### ##################################### #################### ###################################################### ################################### ################################### ###################################### ##################################### #################### ######################################################### ############ ######### ######## ############ ######################################## ##################################### #################### ############### ############ ######### ######## ############ ############ ############ ##################################### #################### ############### ############ ######### ######## ############ ############ ############ ################# #################### ############### ############ ######### ######## ############ ############ ############ ################# #################### ############### ############ #################### ############ ############ ############ ################# ############### ############ ################# ############ ############ ############ ################# #################### ############### ############ ############## ############ ############ ############ ################# #################### ############### ############ ############ ############ ############ ############ ################# #################### ############### ############ ########## ############ ############ ############ ##################################### #################### ############### ############ ###### ############ ############ ############ ##################################### #################### ############### ############ #### ############ ############################################################ ##################################### #################### ############### ###################### ############ ############ ############################################################## ##################################### #################### ############### ###################### ############ ############ ################################################################ ##################################### #################### ############### ############ ############ ############ ############ ############ ##################################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################################### #################### ######################################################## ############ ############ ############ ############ ##################################### #################### ####################################################### ############ ############ ############ ############ ##################################### #################### ##################################################### ############ ############ ############ ############ ##################################### #################### ################################################# ############ ############ ############ ############ */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...