QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#426882#4184. Amusement Arcaderania__#WA 0ms3748kbC++14867b2024-05-31 23:49:112024-05-31 23:49:11

Judging History

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

  • [2024-05-31 23:49:11]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3748kb
  • [2024-05-31 23:49:11]
  • 提交

answer

#pragma GCC optimize("O3,unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef int in;
#define int long long
#define double long double
#define f first
#define s second
#define pb push_back
#define pp push
#define ceill(x,y) ((x/y)+(x%y!=0)*(x/abs(x)*y/abs(y)<0?0:1))
#define floorr(x,y) ((x/y)+(x%y!=0)*(x/abs(x)*y/abs(y)<0?-1:0))
#define YN(x) cout<<(x?"YES\n":"NO\n");
#define Yn(x) cout<<(x?"Yes\n":"No\n");
#define yn(x) cout<<(x?"yes\n":"no\n");
const int MAAX=1e18;
const int MOD=1e9+7;
const int MAX=1e9;



in main(){
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int tc=1;
    // cin>>tc;
    while(tc--){
		int n;
		cin>>n;
		for(int i=0;i<61;i++){
			if(__builtin_popcountll(n-(1<<i)-1)==1){
				cout<<(1<<i)+1<<"\n";
				return 0;
			}
		}
		cout<<"impossbile\n";
    }
    return 0;
}

詳細信息

Test #1:

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

input:

7

output:

3

result:

ok 

Test #2:

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

input:

15

output:

impossbile

result:

wrong answer WA: supposed to be impossible, team says otherwise