Codeforces Round #819 (Div. 1 + Div. 2) Problem A

Revision en2, by afanehkareem, 2022-09-06 21:28:32

Hello Codeforces,

In Round #819 (Div. 1 + Div. 2) today, my solution for problem A turns out it was wrong after the updated tests.

So my first solution was with the picture where b ==> int b=*max_element(arr+1,arr+n); /predownloaded/3c/2e/3c2e442d920b73d300c780f2ca0403c1ed29dd94.png but after the contest finished i submitted a new solution where b ==> the one with picture where i used a loop. /predownloaded/c0/0e/c00eff724751e38ab498f357f8ea061a158d9562.png the first solution failed on test #4, and the second was accepted.

But i really don't understand why the first solution was wrong, or why it didn't pass the updated tests.

Any help!! Thank you all.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English afanehkareem 2022-09-06 21:30:33 168
en2 English afanehkareem 2022-09-06 21:28:32 132
en1 English afanehkareem 2022-09-06 21:22:56 594 Initial revision (published)