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


I got run time error.Help me.

asked 23 Apr '16, 17:56

vickycod's gravatar image

accept rate: 6%

Seems like you got already rid of the segmentation fault. For your problems with the time limit: Use somewhat faster IO. Either use scanf instead of cin, or start your program with

ios_base::sync_with_stdio ( false );

In that case don't mix C-type IO with C++-type IO. I guess this should be enough to let your program pass the time limit. Concerning your logic just one thing: Look at the compare function, you forget a return (I didn't think about the rest).


answered 23 Apr '16, 20:56

ceilks's gravatar image

accept rate: 36%

thanks for pointing mistake.:)

(25 Apr '16, 15:06) vickycod2★
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 23 Apr '16, 17:56

question was seen: 341 times

last updated: 25 Apr '16, 15:06