[Help] Problem A [Div 2 — #672]

Revision en1, by kalzor, 2020-09-26 08:30:05

As the title says I need some help to find some test cases where my solution fails for the problem Cubes Sorting. My logic is simple, I first sort the array in decreasing order, then check if two elements are the same in the array. Then i check if the original array is in strictly decreasing order. If either the original array is not sorted in decreasing order or if there are two(or more) elements with the same value I print out YES else No. My Java Code:-

Spoiler

The logic seems right to me but it is still giving WA.Link to WA Submission 93757010. Any help is appreciated.

Tags help, debug

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English kalzor 2020-09-26 11:09:30 8
en2 English kalzor 2020-09-26 10:37:44 179
en1 English kalzor 2020-09-26 08:30:05 1181 Initial revision (published)