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

×

I got run time error.Help me.

asked 23 Apr '16, 17:56

vickycod's gravatar image

2★vickycod
21112
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).

link

answered 23 Apr '16, 20:56

ceilks's gravatar image

7★ceilks
1.8k9
accept rate: 36%

thanks for pointing mistake.:)

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

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:

×51

question asked: 23 Apr '16, 17:56

question was seen: 341 times

last updated: 25 Apr '16, 15:06