Doubt Regarding ArrayList.get() JAVA

Revision en1, by XDD_____, 2021-01-29 08:00:30

I was solving C in Div2 #698 and I have a query

105802847 and 105802880 are my submission the only difference is the line

if(a.get(i)-a.get(i-1)!=0){f=false;} and if(a.get(i)!=a.get(i-1)){f=false;}respectively

The first one got accepted while the second one fails the last tc of sample test

Please tell me why this is happening

Thanks.

Tags doubts

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English XDD_____ 2021-01-29 08:00:30 427 Initial revision (published)