# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
467182 | 2021-08-21T22:49:36 Z | nemethm | Rack (eJOI19_rack) | C++17 | 1 ms | 308 KB |
#include <iostream> #include <list> #include <algorithm> #include <queue> #include <vector> #include <limits> #include <set> #include <numeric> #include <string> #include <assert.h> #include <map> #include <cmath> #include <stack> #include <cstring> #include <stack> #pragma warning(disable : 4996) using namespace std; using ll = long long int; const ll inf = numeric_limits<ll>::max(); const ll mod = 1e9+7; void setIO(string s) { freopen((s + ".in").c_str(), "r", stdin); freopen((s + ".out").c_str(), "w", stdout); } int main() { ios::sync_with_stdio(false); cin.tie(0); cout.precision(9); uint64_t n, k, m = 1e9 + 7; cin >> n >> k; --k; uint64_t k_rev = 0; for (int i = 0; i < 64; ++i) { if ((k >> i) & 1) k_rev |= 1ull << (64 - i - 1); } if (n <= 64) { k_rev >>= (64 - n); k_rev %= m; ++k_rev; k_rev %= m; cout << k_rev << endl; } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 308 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 308 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 0 ms | 204 KB | Output is correct |
7 | Correct | 0 ms | 204 KB | Output is correct |
8 | Correct | 0 ms | 308 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 0 ms | 204 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 308 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 0 ms | 204 KB | Output is correct |
7 | Correct | 0 ms | 204 KB | Output is correct |
8 | Correct | 0 ms | 308 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 0 ms | 204 KB | Output is correct |
11 | Correct | 0 ms | 204 KB | Output is correct |
12 | Incorrect | 0 ms | 204 KB | Output isn't correct |
13 | Halted | 0 ms | 0 KB | - |