| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1220595 | durdona | Rack (eJOI19_rack) | C++20 | 0 ms | 328 KiB |
#include <iostream>
#include <cmath>
const int mod = 1e9 + 7;
long long rec(int i, int j) {
if (i == 0) return 1;
if (j % 2 == 0) {
return (rec(i - 1, j / 2) + static_cast<long long>(pow(2, i - 1)) % mod) % mod;
} else {
return rec(i - 1, j / 2 + 1);
}
}
int main() {
int n, k;
std::cin >> n >> k;
std::cout << rec(n, k) << std::endl;
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
