QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#419207#4184. Amusement Arcadezezoo050#WA 1ms3872kbC++20498b2024-05-23 18:52:322024-05-23 18:52:32

Judging History

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

  • [2024-05-23 18:52:32]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3872kb
  • [2024-05-23 18:52:32]
  • 提交

answer

#include <bits/stdc++.h>

#define ll long long
using namespace std;

const int N = 2e2 + 5, M = 15;


void tc() {
    ll n;
    cin >> n;
    if (__builtin_popcountll(n) < 4) {
        ll pos = n / 2;
        if (pos % 2 == 0)
            pos++;
        cout << pos << '\n';
    } else cout << "impossible";
}

signed main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int t = 1;

//    cin >> t;

    while (t--) {
        tc();
    }

    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3572kb

input:

7

output:

3

result:

ok 

Test #2:

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

input:

15

output:

impossible

result:

ok 

Test #3:

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

input:

19

output:

9

result:

wrong answer WA: not all guests will get a seat