QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#635374#9249. Elimination Series Once Moreshiqiaqiaya#WA 0ms3592kbC++20454b2024-10-12 19:37:382024-10-12 19:37:38

Judging History

你现在查看的是最新测评结果

  • [2024-10-12 19:37:38]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3592kb
  • [2024-10-12 19:37:38]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int main() {
    int n, k;
    std::cin >> n >> k;
    std::vector<int> a(1LL << n);
    for (int i = 0; i < (1LL << n); ++i) {
        std::cin >> a[i];
    }
    std::vector<int> ans(1LL << n);
    for (int i = 0; i < (1 << n); ++i) {
        ans[i] = __lg(a[i]);
    }
    for (int i = 0; i < (1 << n); ++i) {
        std::cout << ans[i] << " \n"[i == (1 << n) - 1];
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3568kb

input:

2 1
1 2 3 4

output:

0 1 1 2

result:

ok 4 number(s): "0 1 1 2"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

3 5
2 4 7 5 3 8 6 1

output:

1 2 2 2 1 3 2 0

result:

ok 8 numbers

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3592kb

input:

3 0
1 2 7 4 5 8 3 6

output:

0 1 2 2 2 3 1 2

result:

wrong answer 4th numbers differ - expected: '0', found: '2'