Question link: https://codeforces.me/contest/1334/problem/C.
I will attach my code further, in that in 3rd test case my answer coming incorrect but when I compiling same testcase in my VSCode then I get the correct results and I don't know why it is happening so please anyone helps me to resolve this. Thank You
Code link: https://codeforces.me/contest/1334/submission/76727603
I also done your mistake when I solved that officially(but fixed it officially after 5 minutes). Your minimum value is LONG_MAX. The mini variable value must be equal to at least $$$3*10^{17}$$$. Make it $$$10^{18}$$$ just in case.
Edit: LONG_MAX is around $$$2*10^9$$$
Yeah! You are right. Thanx a lot.