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


dishown july long problem

the same solution when used faster i/o gave ac and without faster i/o gave tle .. is it justified to use faster i/o to get ac ?? the link to the problem is

asked 14 Jul '14, 20:40

meintoo's gravatar image

accept rate: 16%

Got same problem with java Language. :(

(14 Jul '14, 20:50) shivamsharma3★

Actually its not necessary to use fast input output... Have a look at my code... I got AC without fast i/o... There is always an alternative, just think! Have fun!!!


answered 14 Jul '14, 20:52

megatron_64's gravatar image

accept rate: 33%


you have used scanf and printf . It would be very difficult to do this question using cin and cout .

(14 Jul '14, 20:58) the65bit4★

If the reference to fast i/o is scanf and printf then I am sorry... It is always recommended by admins (and good coders of codechef, codeforces etc) to always prefer scanf/printf over cin/cout...

(14 Jul '14, 22:13) megatron_644★

An example to such case is "Enormous input test" problem of codechef

(14 Jul '14, 22:14) megatron_644★

I am not saying scanf and printf to be fast i/o . I am saying cin/cout will give tle while scanf and print won`t .

(15 Jul '14, 10:30) the65bit4★

There is no problem in using faster io to get ac , because if your algo is wrong it would still give tle if you use faster IO . Cin , cout are generally more slow , so even if you have used scanf and printf you could have got ac , without using faster IO .

Check Your solution using scanf and printf gives AC .


answered 14 Jul '14, 20:56

the65bit's gravatar image

accept rate: 13%

edited 14 Jul '14, 21:08

but still using cin and cout gives tle . its just amazing . but whatever it is , i learnt a few things


answered 15 Jul '14, 09:29

meintoo's gravatar image

accept rate: 16%

If you find my answer useful please upvote and accept it as correct answer .

(15 Jul '14, 10:29) the65bit4★
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: 14 Jul '14, 20:40

question was seen: 886 times

last updated: 15 Jul '14, 10:30