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

×

Getting "time limit exceeded" in Enormous Input Test.

I need help to understand this problem: http://www.codechef.com/problems/INTEST

Well, I looked into the solutions but couldn't understand much from it. I have no idea how to handle big numbers in C++.

asked 07 Aug '13, 14:51

ankit1992's gravatar image

2★ankit1992
1112
accept rate: 0%

edited 07 Aug '13, 14:52


long can very well handle the required range...for that matter even int can...as the name of the ques depicts...this ques is to test your input output techniques...u are using cin/cout...which are slow...instead use scanf/printf or any other fast i/o techniques to reduce the time taken for ur code to complete execution in the given time limit...hope this helps..:)

PS:- ur logic is correct just change i/o technique..:)

link

answered 07 Aug '13, 15:11

kunal361's gravatar image

4★kunal361
6.0k133272
accept rate: 21%

Oh! that's it? Thank you

(07 Aug '13, 15:16) ankit19922★
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:

×1,901
×47

question asked: 07 Aug '13, 14:51

question was seen: 1,101 times

last updated: 07 Aug '13, 15:16