QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#136480#4186. Card TradingRetiredButNotTired#WA 1ms3584kbC++17747b2023-08-08 20:33:162023-08-08 20:33:21

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-08-08 20:33:21]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3584kb
  • [2023-08-08 20:33:16]
  • 提交

answer

// Hey there.. I love you <3
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

mt19937 rnd(time(nullptr));

const int N = 1e5 + 5, mod = 1e9 + 7;
const double pi = acos(-1), eps = 1e-10;


void work() {
    
    ll x;
    cin >> x;
    --x;
    int b = __builtin_popcountll(x);
    if (b > 2)
        cout << "impossible" << endl;
    else
        cout << (x & -x) + 1 << endl;
    
    
    
}


void init() {
    cin.tie(nullptr);
    istream::sync_with_stdio(false);
//    freopen("in.txt", "r", stdin);
//    freopen("out.txt", "w", stdout);


}

int main() {
    init();
    
    int testCases = 1;
//    cin >> testCases;
    while (testCases--) work();
    
    return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3584kb

input:

5
12.00 0 3
11.99 2 0
11.98 5 0
10.00 1 0
12.01 0 6

output:

5

result:

wrong output format Unexpected end of file - token expected