QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#48645#4184. Amusement Arcadeneko_nyaa#WA 3ms3580kbC++20371b2022-09-14 21:13:042022-09-14 21:13:06

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-09-14 21:13:06]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3580kb
  • [2022-09-14 21:13:04]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define int long long
 
signed main() {
	ios::sync_with_stdio(0); cin.tie(0);
	
	int n; cin >> n;
	for (int i = 0; i < 60; i++) {
		for (int j = 0; j < 60; j++) {
			if ((1LL << i) + (1LL << j) + 1 == n) {
				cout << (1LL << i)+1 << '\n';
				return 0;
			}
		}
	}
	cout << "impossible\n";

	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 3ms
memory: 3564kb

input:

7

output:

3

result:

ok 

Test #2:

score: 0
Accepted
time: 3ms
memory: 3436kb

input:

15

output:

impossible

result:

ok 

Test #3:

score: 0
Accepted
time: 3ms
memory: 3504kb

input:

19

output:

3

result:

ok 

Test #4:

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

input:

2049

output:

1025

result:

ok 

Test #5:

score: 0
Accepted
time: 3ms
memory: 3544kb

input:

32769

output:

16385

result:

ok 

Test #6:

score: 0
Accepted
time: 3ms
memory: 3492kb

input:

536870913

output:

268435457

result:

ok 

Test #7:

score: 0
Accepted
time: 3ms
memory: 3572kb

input:

35184372088833

output:

17592186044417

result:

ok 

Test #8:

score: 0
Accepted
time: 3ms
memory: 3496kb

input:

2251799813685249

output:

1125899906842625

result:

ok 

Test #9:

score: 0
Accepted
time: 2ms
memory: 3548kb

input:

576460752303423489

output:

288230376151711745

result:

ok 

Test #10:

score: 0
Accepted
time: 2ms
memory: 3500kb

input:

1027

output:

3

result:

ok 

Test #11:

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

input:

2081

output:

33

result:

ok 

Test #12:

score: 0
Accepted
time: 3ms
memory: 3500kb

input:

34393292801

output:

33554433

result:

ok 

Test #13:

score: -100
Wrong Answer
time: 1ms
memory: 3504kb

input:

1

output:

impossible

result:

wrong output format Expected integer, but "impossible" found