Submission #775509

# Submission time Handle Problem Language Result Execution time Memory
775509 2023-07-06T13:08:47 Z vjudge1 Rack (eJOI19_rack) C++17
40 / 100
1 ms 212 KB
#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
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Incorrect 0 ms 212 KB Output isn't correct
12 Halted 0 ms 0 KB -