Fred_Flintstone's blog

By Fred_Flintstone, history, 2 years ago, In English,

Hi codeforces!

I was solving this problem: 100685J - Just Another Disney Problem and I solved it using c++ sort() (submission: 29823860), however I got WA and I was very confused as to why. Later I tried the same but using stable_sort() (submission: 29824442) and surprisingly I got AC. In the statement it says that "for every two of them he likes one of them more than another one" meaning that they have each different "beauty", thus stability is useless. I'd be very grateful if someone could explain me why my first submission failed, it's driving me crazy, I even wrote my first blog because of that!!!

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it