You are not logged in. Please login at www.codechef.com to post your questions!

×

[closed] Educational Codeforces Round 43 Div 2 C. Nested Segments RE

http://codeforces.com/contest/976/submission/37828287

Can someone Explain me RE on test 84. And reason why it is occurring ?? And any method to get rig of this ??

asked 02 May '18, 19:40

aryanc403's gravatar image

6★aryanc403
2.5k1516
accept rate: 10%

closed 03 May '18, 05:06

The question has been closed for the following reason "The question is answered, right answer was accepted" by aryanc403 03 May '18, 05:06


Your compare function does not obey the C++ standard for comparision functions. The function must return true if the first argument is strictly less than the second, and false otherwise. You can check the documentation for details.

link

answered 03 May '18, 04:04

meooow's gravatar image

6★meooow ♦
7.1k718
accept rate: 48%

Thanks. @meooow Got AC. By Just changing true to false in case of equal elements. Earlier I used to think that I can return anything in case of equal elements. But I was wrong.

(03 May '18, 05:05) aryanc4036★

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×682
×532
×239

question asked: 02 May '18, 19:40

question was seen: 190 times

last updated: 03 May '18, 05:06