Task: | Gas tank |
Sender: | aalto2024k_001 |
Submission time: | 2024-11-13 17:27:18 +0200 |
Language: | C++ (C++17) |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.00 s | details |
#2 | WRONG ANSWER | 0.00 s | details |
#3 | WRONG ANSWER | 0.00 s | details |
#4 | WRONG ANSWER | 0.00 s | details |
#5 | WRONG ANSWER | 0.00 s | details |
#6 | WRONG ANSWER | 0.00 s | details |
#7 | WRONG ANSWER | 0.00 s | details |
#8 | WRONG ANSWER | 0.00 s | details |
#9 | WRONG ANSWER | 0.00 s | details |
#10 | WRONG ANSWER | 0.00 s | details |
#11 | WRONG ANSWER | 0.00 s | details |
#12 | WRONG ANSWER | 0.00 s | details |
#13 | WRONG ANSWER | 0.00 s | details |
#14 | WRONG ANSWER | 0.00 s | details |
#15 | WRONG ANSWER | 0.00 s | details |
#16 | WRONG ANSWER | 0.00 s | details |
#17 | WRONG ANSWER | 0.00 s | details |
#18 | WRONG ANSWER | 0.00 s | details |
#19 | WRONG ANSWER | 0.00 s | details |
#20 | WRONG ANSWER | 0.00 s | details |
#21 | WRONG ANSWER | 0.00 s | details |
#22 | WRONG ANSWER | 0.00 s | details |
#23 | WRONG ANSWER | 0.00 s | details |
#24 | WRONG ANSWER | 0.00 s | details |
#25 | WRONG ANSWER | 0.00 s | details |
#26 | WRONG ANSWER | 0.00 s | details |
#27 | WRONG ANSWER | 0.00 s | details |
#28 | WRONG ANSWER | 0.00 s | details |
#29 | WRONG ANSWER | 0.00 s | details |
#30 | WRONG ANSWER | 0.00 s | details |
#31 | WRONG ANSWER | 0.00 s | details |
#32 | WRONG ANSWER | 0.00 s | details |
#33 | WRONG ANSWER | 0.00 s | details |
#34 | WRONG ANSWER | 0.00 s | details |
#35 | WRONG ANSWER | 0.00 s | details |
#36 | WRONG ANSWER | 0.00 s | details |
#37 | WRONG ANSWER | 0.00 s | details |
#38 | WRONG ANSWER | 0.00 s | details |
#39 | WRONG ANSWER | 0.00 s | details |
#40 | WRONG ANSWER | 0.00 s | details |
#41 | WRONG ANSWER | 0.00 s | details |
#42 | WRONG ANSWER | 0.00 s | details |
#43 | WRONG ANSWER | 0.00 s | details |
#44 | WRONG ANSWER | 0.00 s | details |
#45 | WRONG ANSWER | 0.00 s | details |
#46 | WRONG ANSWER | 0.00 s | details |
#47 | WRONG ANSWER | 0.00 s | details |
#48 | WRONG ANSWER | 0.00 s | details |
#49 | WRONG ANSWER | 0.00 s | details |
#50 | WRONG ANSWER | 0.00 s | details |
#51 | WRONG ANSWER | 0.01 s | details |
#52 | WRONG ANSWER | 0.01 s | details |
#53 | WRONG ANSWER | 0.01 s | details |
#54 | WRONG ANSWER | 0.01 s | details |
#55 | WRONG ANSWER | 0.01 s | details |
#56 | WRONG ANSWER | 0.01 s | details |
#57 | WRONG ANSWER | 0.01 s | details |
#58 | WRONG ANSWER | 0.01 s | details |
#59 | WRONG ANSWER | 0.01 s | details |
#60 | WRONG ANSWER | 0.01 s | details |
#61 | WRONG ANSWER | 0.05 s | details |
#62 | WRONG ANSWER | 0.06 s | details |
#63 | WRONG ANSWER | 0.03 s | details |
#64 | WRONG ANSWER | 0.03 s | details |
#65 | WRONG ANSWER | 0.04 s | details |
#66 | WRONG ANSWER | 0.05 s | details |
#67 | WRONG ANSWER | 0.03 s | details |
#68 | WRONG ANSWER | 0.05 s | details |
#69 | WRONG ANSWER | 0.03 s | details |
#70 | WRONG ANSWER | 0.06 s | details |
#71 | WRONG ANSWER | 0.05 s | details |
#72 | WRONG ANSWER | 0.04 s | details |
#73 | WRONG ANSWER | 0.06 s | details |
#74 | WRONG ANSWER | 0.04 s | details |
#75 | WRONG ANSWER | 0.02 s | details |
#76 | WRONG ANSWER | 0.04 s | details |
#77 | WRONG ANSWER | 0.06 s | details |
#78 | WRONG ANSWER | 0.03 s | details |
#79 | WRONG ANSWER | 0.04 s | details |
#80 | WRONG ANSWER | 0.05 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:49:18: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'ull' {aka 'long long unsigned int'} [-Wsign-compare] 49 | for(ll b=1; b<maxv; b++){ | ~^~~~~
Code
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; ll val(ll A, ll B){ return A*A*B + B*B*A; } ll binsearchA(ll B, ll N){ ll b = 1<<30; ll a = 0; ll s = 0; while(b){ ll a2 = a | b; ll v = val(a2, B); ll s2 = N - v; cout << "this: " << a2 << " " << s2 << "\n"; if(s2 >= 0 && s2 < s){ s = s2; a = a2; } b >>= 1; } return a; } int main(){ ios::sync_with_stdio(0); cin.tie(0); ll N; cin >> N; if(N == 0){ cout << "0 0\n"; return 0; } if(N == 1){ cout << "1 0\n"; return 0; } ull maxv = pow(N/2+1, 1.0/3)+1; ll bA = 0, bB = 0; ll bS = (unsigned)(-1); for(ll b=1; b<maxv; b++){ ll a = binsearchA(b, N); cout << "this: " << b << " " << a << "\n"; ll v = val(a,b); ll s = N - v; if(s >= 0 && s < bS){ bS = s; bA = a; bB = b; } } cout << bA << " " << bB << "\n"; }
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
8 |
correct output |
---|
2 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 2
Verdict: WRONG ANSWER
input |
---|
7 |
correct output |
---|
2 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 3
Verdict: WRONG ANSWER
input |
---|
46 |
correct output |
---|
6 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 4
Verdict: WRONG ANSWER
input |
---|
28 |
correct output |
---|
4 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 5
Verdict: WRONG ANSWER
input |
---|
40 |
correct output |
---|
5 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 6
Verdict: WRONG ANSWER
input |
---|
34 |
correct output |
---|
5 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 7
Verdict: WRONG ANSWER
input |
---|
39 |
correct output |
---|
5 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 8
Verdict: WRONG ANSWER
input |
---|
38 |
correct output |
---|
5 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 9
Verdict: WRONG ANSWER
input |
---|
25 |
correct output |
---|
4 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 10
Verdict: WRONG ANSWER
input |
---|
26 |
correct output |
---|
4 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 11
Verdict: WRONG ANSWER
input |
---|
549 |
correct output |
---|
7 6 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 12
Verdict: WRONG ANSWER
input |
---|
418 |
correct output |
---|
13 2 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 13
Verdict: WRONG ANSWER
input |
---|
436 |
correct output |
---|
6 6 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 14
Verdict: WRONG ANSWER
input |
---|
551 |
correct output |
---|
7 6 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 15
Verdict: WRONG ANSWER
input |
---|
968 |
correct output |
---|
21 2 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 16
Verdict: WRONG ANSWER
input |
---|
222 |
correct output |
---|
14 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 17
Verdict: WRONG ANSWER
input |
---|
893 |
correct output |
---|
13 4 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 18
Verdict: WRONG ANSWER
input |
---|
77 |
correct output |
---|
8 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 19
Verdict: WRONG ANSWER
input |
---|
874 |
correct output |
---|
29 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 20
Verdict: WRONG ANSWER
input |
---|
11 |
correct output |
---|
2 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 21
Verdict: WRONG ANSWER
input |
---|
772 |
correct output |
---|
12 4 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 22
Verdict: WRONG ANSWER
input |
---|
181 |
correct output |
---|
5 4 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 23
Verdict: WRONG ANSWER
input |
---|
155 |
correct output |
---|
11 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 24
Verdict: WRONG ANSWER
input |
---|
778 |
correct output |
---|
12 4 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 25
Verdict: WRONG ANSWER
input |
---|
514 |
correct output |
---|
15 2 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 26
Verdict: WRONG ANSWER
input |
---|
849 |
correct output |
---|
8 7 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 27
Verdict: WRONG ANSWER
input |
---|
224 |
correct output |
---|
14 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 28
Verdict: WRONG ANSWER
input |
---|
295 |
correct output |
---|
11 2 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 29
Verdict: WRONG ANSWER
input |
---|
651 |
correct output |
---|
25 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 30
Verdict: WRONG ANSWER
input |
---|
98 |
correct output |
---|
6 2 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 31
Verdict: WRONG ANSWER
input |
---|
588264 |
correct output |
---|
172 18 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 32
Verdict: WRONG ANSWER
input |
---|
48736 |
correct output |
---|
80 7 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 33
Verdict: WRONG ANSWER
input |
---|
208508 |
correct output |
---|
99 18 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 34
Verdict: WRONG ANSWER
input |
---|
517415 |
correct output |
---|
172 16 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 35
Verdict: WRONG ANSWER
input |
---|
960234 |
correct output |
---|
290 11 |
user output |
---|
this: 1073741824 -115292150567... Truncated |
Test 36
Verdict: WRONG ANSWER
input |
---|
870321 |
correct output |
---|
111 49 |
user output |
---|
this: 1073741824 -115292150567... Truncated |
Test 37
Verdict: WRONG ANSWER
input |
---|
308005 |
correct output |
---|
70 40 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 38
Verdict: WRONG ANSWER
input |
---|
425818 |
correct output |
---|
652 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 39
Verdict: WRONG ANSWER
input |
---|
729178 |
correct output |
---|
83 61 |
user output |
---|
this: 1073741824 -115292150567... Truncated |
Test 40
Verdict: WRONG ANSWER
input |
---|
863955 |
correct output |
---|
535 3 |
user output |
---|
this: 1073741824 -115292150567... Truncated |
Test 41
Verdict: WRONG ANSWER
input |
---|
116086 |
correct output |
---|
340 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 42
Verdict: WRONG ANSWER
input |
---|
612309 |
correct output |
---|
782 1 |
user output |
---|
this: 1073741824 -115292150567... Truncated |
Test 43
Verdict: WRONG ANSWER
input |
---|
375142 |
correct output |
---|
228 7 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 44
Verdict: WRONG ANSWER
input |
---|
852178 |
correct output |
---|
161 28 |
user output |
---|
this: 1073741824 -115292150567... Truncated |
Test 45
Verdict: WRONG ANSWER
input |
---|
151667 |
correct output |
---|
156 6 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 46
Verdict: WRONG ANSWER
input |
---|
196137 |
correct output |
---|
103 16 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 47
Verdict: WRONG ANSWER
input |
---|
375254 |
correct output |
---|
612 1 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 48
Verdict: WRONG ANSWER
input |
---|
451513 |
correct output |
---|
298 5 |
user output |
---|
this: 1073741824 -115292150568... Truncated |
Test 49
Verdict: WRONG ANSWER
input |
---|
942864 |
correct output |
---|
122 46 |
user output |
---|
this: 1073741824 -115292150567... Truncated |
Test 50
Verdict: WRONG ANSWER
input |
---|
848035 |
correct output |
---|
215 17 |
user output |
---|
this: 1073741824 -115292150567... Truncated |
Test 51
Verdict: WRONG ANSWER
input |
---|
727949226 |
correct output |
---|
1876 188 |
user output |
---|
this: 1073741824 -115292150495... Truncated |
Test 52
Verdict: WRONG ANSWER
input |
---|
119540561 |
correct output |
---|
395 387 |
user output |
---|
this: 1073741824 -115292150556... Truncated |
Test 53
Verdict: WRONG ANSWER
input |
---|
168568700 |
correct output |
---|
447 430 |
user output |
---|
this: 1073741824 -115292150551... Truncated |
Test 54
Verdict: WRONG ANSWER
input |
---|
747828096 |
correct output |
---|
2098 158 |
user output |
---|
this: 1073741824 -115292150493... Truncated |
Test 55
Verdict: WRONG ANSWER
input |
---|
113886324 |
correct output |
---|
949 113 |
user output |
---|
this: 1073741824 -115292150556... Truncated |
Test 56
Verdict: WRONG ANSWER
input |
---|
544092912 |
correct output |
---|
2620 77 |
user output |
---|
this: 1073741824 -115292150513... Truncated |
Test 57
Verdict: WRONG ANSWER
input |
---|
112927706 |
correct output |
---|
532 266 |
user output |
---|
this: 1073741824 -115292150556... Truncated |
Test 58
Verdict: WRONG ANSWER
input |
---|
562461747 |
correct output |
---|
1803 159 |
user output |
---|
this: 1073741824 -115292150511... Truncated |
Test 59
Verdict: WRONG ANSWER
input |
---|
930544437 |
correct output |
---|
7390 17 |
user output |
---|
this: 1073741824 -115292150475... Truncated |
Test 60
Verdict: WRONG ANSWER
input |
---|
612603672 |
correct output |
---|
1128 364 |
user output |
---|
this: 1073741824 -115292150506... Truncated |
Test 61
Verdict: WRONG ANSWER
input |
---|
575864416073 |
correct output |
---|
7427 5843 |
user output |
---|
this: 1073741824 -115292092981... Truncated |
Test 62
Verdict: WRONG ANSWER
input |
---|
942935707814 |
correct output |
---|
63092 236 |
user output |
---|
this: 1073741824 -115292056274... Truncated |
Test 63
Verdict: WRONG ANSWER
input |
---|
171264013251 |
correct output |
---|
14433 780 |
user output |
---|
this: 1073741824 -115292133441... Truncated |
Test 64
Verdict: WRONG ANSWER
input |
---|
76712165827 |
correct output |
---|
8381 978 |
user output |
---|
this: 1073741824 -115292142896... Truncated |
Test 65
Verdict: WRONG ANSWER
input |
---|
161612205399 |
correct output |
---|
7527 2206 |
user output |
---|
this: 1073741824 -115292134406... Truncated |
Test 66
Verdict: WRONG ANSWER
input |
---|
641183113758 |
correct output |
---|
50116 254 |
user output |
---|
this: 1073741824 -115292086449... Truncated |
Test 67
Verdict: WRONG ANSWER
input |
---|
87822361843 |
correct output |
---|
24538 145 |
user output |
---|
this: 1073741824 -115292141785... Truncated |
Test 68
Verdict: WRONG ANSWER
input |
---|
550401843854 |
correct output |
---|
14093 2372 |
user output |
---|
this: 1073741824 -115292095527... Truncated |
Test 69
Verdict: WRONG ANSWER
input |
---|
56603972680 |
correct output |
---|
10404 499 |
user output |
---|
this: 1073741824 -115292144907... Truncated |
Test 70
Verdict: WRONG ANSWER
input |
---|
991404337870 |
correct output |
---|
109250 83 |
user output |
---|
this: 1073741824 -115292051427... Truncated |
Test 71
Verdict: WRONG ANSWER
input |
---|
534149659344 |
correct output |
---|
53496 186 |
user output |
---|
this: 1073741824 -115292097153... Truncated |
Test 72
Verdict: WRONG ANSWER
input |
---|
336010906011 |
correct output |
---|
183301 10 |
user output |
---|
this: 1073741824 -115292116966... Truncated |
Test 73
Verdict: WRONG ANSWER
input |
---|
871714540470 |
correct output |
---|
214186 19 |
user output |
---|
this: 1073741824 -115292063396... Truncated |
Test 74
Verdict: WRONG ANSWER
input |
---|
254659717917 |
correct output |
---|
17240 818 |
user output |
---|
this: 1073741824 -115292125102... Truncated |
Test 75
Verdict: WRONG ANSWER
input |
---|
40507166127 |
correct output |
---|
3335 2196 |
user output |
---|
this: 1073741824 -115292146517... Truncated |
Test 76
Verdict: WRONG ANSWER
input |
---|
445628406612 |
correct output |
---|
23039 811 |
user output |
---|
this: 1073741824 -115292106005... Truncated |
Test 77
Verdict: WRONG ANSWER
input |
---|
822717753419 |
correct output |
---|
39363 524 |
user output |
---|
this: 1073741824 -115292068296... Truncated |
Test 78
Verdict: WRONG ANSWER
input |
---|
40410210216 |
correct output |
---|
10096 382 |
user output |
---|
this: 1073741824 -115292146527... Truncated |
Test 79
Verdict: WRONG ANSWER
input |
---|
366117794932 |
correct output |
---|
49165 151 |
user output |
---|
this: 1073741824 -115292113956... Truncated |
Test 80
Verdict: WRONG ANSWER
input |
---|
657992849714 |
correct output |
---|
11698 3662 |
user output |
---|
this: 1073741824 -115292084768... Truncated |