QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#419207 | #4184. Amusement Arcade | zezoo050# | WA | 1ms | 3872kb | C++20 | 498b | 2024-05-23 18:52:32 | 2024-05-23 18:52:32 |
Judging History
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;
}
Details
Tip: Click on the bar to expand more detailed information
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