답안 #624594

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
624594 2022-08-08T14:08:43 Z Blagoj Rack (eJOI19_rack) C++14
40 / 100
7 ms 4524 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(0);
    int n, k;
    cin >> n >> k;
    vector<int> v;
    v = {1, (1 << (n - 1)) + 1};
    int sum = (1 << (n - 2));
    while (sum > 0)
    {
        int sz = v.size();
        for (int i = 0; i < sz; i++)
        {
            v.push_back(v[i] + sum);
        }
        sum /= 2;
    }
    cout << v[k - 1];
}
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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 340 KB Output is correct
8 Correct 1 ms 600 KB Output is correct
9 Correct 2 ms 1492 KB Output is correct
10 Correct 7 ms 4524 KB Output is correct
# 결과 실행 시간 메모리 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 340 KB Output is correct
8 Correct 1 ms 600 KB Output is correct
9 Correct 2 ms 1492 KB Output is correct
10 Correct 7 ms 4524 KB Output is correct
11 Runtime error 1 ms 468 KB Execution killed with signal 11
12 Halted 0 ms 0 KB -