| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1359397 | lyra_g13 | Rack (eJOI19_rack) | C++20 | 1 ms | 344 KiB |
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main(){
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
ll n , k;
cin >> n >> k;
ll block =1;
ll mod = 1000000000 + 7;
ll ans = 1;
for(int i = 0 ; i< n-1 ; i++){
block = (block*2)%mod;
}
for(int i = 0 ; i < n and k > 1; i++){
if(k%2 == 0){
ans = (ans + block + mod)%mod;
}
k = (k+1)/2;
block = block/2;
}
cout << ans << "\n";
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
