제출 #735254

#제출 시각아이디문제언어결과실행 시간메모리
735254MrAndriaRack (eJOI19_rack)C++14
40 / 100
1 ms320 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,ans; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cin>>n>>k; if(k==1){ cout<<1<<endl; return 0; } p=pow(2,n); while(k>1){ if(k%2==0){ ans+=p/2; p/=2; k/=2; }else{ p/=2; k=(k+1)/2; } } cout<<ans+1<<endl; } /* ########################### ########################## ################################ ##################################### #################### ############################################## ############################### ############################### ################################## ##################################### #################### ################################################## ################################# ################################# #################################### ##################################### #################### ###################################################### ################################### ################################### ###################################### ##################################### #################### ######################################################### ############ ######### ######## ############ ######################################## ##################################### #################### ############### ############ ######### ######## ############ ############ ############ ##################################### #################### ############### ############ ######### ######## ############ ############ ############ ################# #################### ############### ############ ######### ######## ############ ############ ############ ################# #################### ############### ############ #################### ############ ############ ############ ################# ############### ############ ################# ############ ############ ############ ################# #################### ############### ############ ############## ############ ############ ############ ################# #################### ############### ############ ############ ############ ############ ############ ################# #################### ############### ############ ########## ############ ############ ############ ##################################### #################### ############### ############ ###### ############ ############ ############ ##################################### #################### ############### ############ #### ############ ############################################################ ##################################### #################### ############### ###################### ############ ############ ############################################################## ##################################### #################### ############### ###################### ############ ############ ################################################################ ##################################### #################### ############### ############ ############ ############ ############ ############ ##################################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################################### #################### ######################################################## ############ ############ ############ ############ ##################################### #################### ####################################################### ############ ############ ############ ############ ##################################### #################### ##################################################### ############ ############ ############ ############ ##################################### #################### ################################################# ############ ############ ############ ############ */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...