Help needed in CHANDF from May Long Challenge

I am trying to implement the logic that Rachit Jain’s explains in this video
But i am only passing one test case. Please help me with this code
problem link

Update both ans and ans_z only when temp_ans > ans
. When temp_ans == ans, update ans_z only when z1/z2 is less than ans_z. This way you will find the minimum z which gives maximum of f(x, y, z).

thanks @techfreak_19. I am trying it. Can you please share your solution.

CodeChef: Practical coding for everyone My code is mostly based on the editorial but the idea is same.

You can look at my AC solution on my GitHub here

1 Like