Knight_Fury_'s blog

By Knight_Fury_, history, 37 hours ago, In English

Last Div — 2 -1001 , in problem C , in C++ my code was wrong at test case 2, but after that i used java , it was accepted . is there any reason?

  • Vote: I like it
  • +13
  • Vote: I do not like it

»
36 hours ago, # |
  Vote: I like it +6 Vote: I do not like it

I guess that's because you reverse the array always in C++ and only if the first element is bigger than the last in the Java.

(If i'm wrong, sorry, i haven't read the problem)

  • »
    »
    36 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    ok, thank for sharing your knowledge. I am trying to find the reason, i will let u know .