@everule1, I was able to fix this error, but now I am not able to find the center in 300 queries. I think my logic is flawed but I can’t seem to find the error. Can you help.
You’re right.
Instead of trying to just read your code, I ran it locally to figure out what’s wrong, and all your binary searches seem to get stuck.
This is your output for a random test case.
The last line is X, Y and R respectively
Your output
-1000000000 -1000000000
MISS
-1000000000 -750000000
MISS
-1000000000 -500000000
MISS
-1000000000 -250000000
MISS
-1000000000 0
MISS
-1000000000 250000000
MISS
-1000000000 500000000
MISS
-1000000000 750000000
MISS
-1000000000 1000000000
MISS
-750000000 -1000000000
MISS
-750000000 -750000000
MISS
-750000000 -500000000
MISS
-750000000 -250000000
MISS
-750000000 0
MISS
-750000000 250000000
MISS
-750000000 500000000
MISS
-750000000 750000000
MISS
-750000000 1000000000
MISS
-500000000 -1000000000
MISS
-500000000 -750000000
MISS
-500000000 -500000000
MISS
-500000000 -250000000
MISS
-500000000 0
HIT
-500000000 250000000
MISS
-500000000 500000000
MISS
-500000000 750000000
MISS
-500000000 1000000000
MISS
-250000000 -1000000000
MISS
-250000000 -750000000
MISS
-250000000 -500000000
MISS
-250000000 -250000000
HIT
-250000000 0
HIT
-250000000 250000000
HIT
-250000000 500000000
MISS
-250000000 750000000
MISS
-250000000 1000000000
MISS
0 -1000000000
MISS
0 -750000000
MISS
0 -500000000
MISS
0 -250000000
HIT
0 0
HIT
0 250000000
HIT
0 500000000
HIT
0 750000000
MISS
0 1000000000
MISS
250000000 -1000000000
MISS
250000000 -750000000
MISS
250000000 -500000000
MISS
250000000 -250000000
HIT
250000000 0
HIT
250000000 250000000
HIT
250000000 500000000
MISS
250000000 750000000
MISS
250000000 1000000000
MISS
500000000 -1000000000
MISS
500000000 -750000000
MISS
500000000 -500000000
MISS
500000000 -250000000
MISS
500000000 0
MISS
500000000 250000000
MISS
500000000 500000000
MISS
500000000 750000000
MISS
500000000 1000000000
MISS
750000000 -1000000000
MISS
750000000 -750000000
MISS
750000000 -500000000
MISS
750000000 -250000000
MISS
750000000 0
MISS
750000000 250000000
MISS
750000000 500000000
MISS
750000000 750000000
MISS
750000000 1000000000
MISS
1000000000 -1000000000
MISS
1000000000 -750000000
MISS
1000000000 -500000000
MISS
1000000000 -250000000
MISS
1000000000 0
MISS
1000000000 250000000
MISS
1000000000 500000000
MISS
1000000000 750000000
MISS
1000000000 1000000000
MISS
-375000000 250000000
HIT
-687500000 250000000
MISS
-531249999 250000000
MISS
-453124999 250000000
MISS
-414062499 250000000
HIT
-433593748 250000000
MISS
-423828123 250000000
HIT
-428710935 250000000
HIT
-431152341 250000000
HIT
-432373044 250000000
HIT
-432983395 250000000
HIT
-433288571 250000000
MISS
-433135982 250000000
MISS
-433059688 250000000
HIT
-433097834 250000000
MISS
-433078760 250000000
MISS
-433069223 250000000
MISS
-433064455 250000000
HIT
-433066838 250000000
MISS
-433065646 250000000
MISS
-433065050 250000000
MISS
-433064752 250000000
MISS
-433064603 250000000
MISS
-433064528 250000000
HIT
-433064565 250000000
MISS
-433064546 250000000
MISS
-433064536 250000000
HIT
-433064540 250000000
HIT
-433064542 250000000
HIT
-433064543 250000000
MISS
625000000 250000000
MISS
437499999 250000000
MISS
343749999 250000000
HIT
390624998 250000000
HIT
414062498 250000000
HIT
425781248 250000000
HIT
431640623 250000000
HIT
434570310 250000000
MISS
433105466 250000000
MISS
432373044 250000000
HIT
432739254 250000000
HIT
432922359 250000000
HIT
433013912 250000000
HIT
433059688 250000000
MISS
433036799 250000000
MISS
433025355 250000000
HIT
433031076 250000000
MISS
433028215 250000000
MISS
433026784 250000000
MISS
433026069 250000000
HIT
433026426 250000000
MISS
433026247 250000000
MISS
433026157 250000000
MISS
433026112 250000000
HIT
433026134 250000000
HIT
433026145 250000000
MISS
433026139 250000000
HIT
433026141 250000000
HIT
433026142 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
433026143 250000000
HIT
WRONG
-19199 20251 500018144
Corrected code
I left in the preprocessor directives so you can see how I checked your code.
There was an isssue in your binary search, I have modified the code it is passing all the test cases. I have also decreased the counts in loop to further reduce queries (it is not required, just an improvisation).
I had no problem in Quali this year, but 1B had the same problem (on win10 pc) that I had some years before with the interactive runner: although my “python” is configured to default to python 3, the python for my code was complaining with the differences (e.g. input-raw_input). I was not able to rewrite the full code but was really annoying having no test possibilities (as the numbers are huge so I couldn’t interactively provide the answers by hand).
Did anyone encountered the same? And more importantly, any idea how to avoid this next time?(python2 is required by another program so no complete uninstall possible)