So to account for them we we would have to shift till 63.
Your solution is very close.
You are probably missing these cases.
1
33637 9437797 2334 25376
The correct output is 2917.
I am having the same problem. My brute force checker is giving the answer 15684 Can you check my submission? Its just for the second sub-task, but donāt know why is it failing.
Try theseā¦
1
227040 37014 0 2
The answer should be 0.
In that case, we would return L, as otherwise, 0 can possibly be less than L and therefore, will be undermining the range.
Can anybody help
https://www.codechef.com/viewsolution/33031560
please provide me the test case in which it is failing for subtask 2
Try L = R = 0 in your code and try even try generating some random cases as well.
because 2 ^42 is > 10^12, which is the upper limit
thanks.
In the testerās solution, what does it mean when the comment part says ātaking all possible prefix of Rā ?
No i think its fine.ur Z has 7 digits, in the explaination only 6 digits are there
@harshil21 I am getting wrong answer now.Can you give me some testcases where i am getting wrong.
I had tried all the testcases mentioned here.Donāt know what i am missing
@harshil21 trying to solve subtask 2 getting WA
could you let me know which case Iām missing
tried test cases shared by you on this thread getting the expected output
solution url : CodeChef: Practical coding for everyone
@rajasalok1996 Though several 2^n-1 with bits greater than bits in x and y (in other words, simply greater in value than both x and y) will maximize F, we need to find minimum value of Z that minimizes the given expression.
Just missing the last bits probably
2
318458 58156 0 28842
794296 28206 0 26
You are missing these cases.
@harshil21, first of all, nice editorial!
Can you please mention what range of numbers was used in the testcases due to which even a single testcase didnāt got executed within the time limit, leading to entire TLE and 0.0 score, for Brute-Force Approach.
Thanks!
Hey @harshil21. Can you please review this and tell which test cases its failing?
https://www.codechef.com/viewsolution/33065603
Only for subtask 2.
Thanks! forgot to handle it
Maybe your code would fail on higher case as youāve not used 1LL or 1ll while shifting.
For. example:
(1 << 41) != (1LL << 41).