이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define lalala ios_base::sync_with_stdio(false);cin.tie(NULL);
#define endl "\n"
#define ll long long
#define pb push_back
#define mod 1000000007
inline ll int hmm(ll int l,ll int r,ll int k){
if(l==r)return l%mod;
ll int m=(l+r)/2;
m=m%mod;
//cout<<l<<" "<<r<<" "<<k<<endl;
if(k%2==0&&k!=0){
return hmm(m+1,r,k/2);
}
else return hmm(l,m,k/2+1);
}
int main(){
lalala;
ll int n,k;cin>>n>>k;
ll int kalan=1;
while(n>10){
kalan*=(((1 <<10))%mod);
kalan%=mod;
n-=10;
}
if(n){
kalan*=((1<<n)%mod);
kalan%=mod;
}
cout<<hmm(1,kalan,k)<<endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |