Different Answers

Revision en1, by prakhar_111, 2019-10-05 12:14:29

Hello, I have recently been solving the following question: D. Zero Quantity Maximization It is giving answer as 1 on test case 2. However on almost all online compilers such as Hacker earth, Rextester, Codechef IDE as well as offline ones such as codeblocks, the output is coming as 2 which is correct. I am unable to understand why the codeforces compiler is giving wrong answer. Please can someone point out what's the possible error in my code and why such difference is occurring. Some links to my code on various compilers: Hackerearth Geeks for geeks Thanks in advance.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English prakhar_111 2019-10-05 12:14:29 796 Initial revision (published)