sahilarora.535's blog

By sahilarora.535, history, 8 years ago, In English

This submission: 374 Div2 B — Sahil Arora gives an RTE on test case 28, while it is working fine on my machine, and I am unable to figure out why. Any help would be appreciated.

  • Vote: I like it
  • -5
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by sahilarora.535 (previous revision, new revision, compare).

»
8 years ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

The comparison function cmp2 that you pass as a parameter, for some elements a and b, will give the following interpretation to std::sort: a < b and b < a, which is an absurd. This happens in a case that a and b have the same size and neither is equal to s.