ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1330. Intervals

How get AC in 0.031s?
Posted by r1d1 11 Aug 2010 13:32
My solve O(N), but output too slow. How fast print answer?
Re: How get AC in 0.031s?
Posted by Andrew Hoffmann aka SKYDOS [Vladimir SU] 11 Aug 2010 13:51
printf()
Re: How get AC in 0.031s?
Posted by r1d1 11 Aug 2010 13:59
I use printf. Also slow.

Edited by author 11.08.2010 14:00
Re: How get AC in 0.031s?
Posted by Andrew Hoffmann aka SKYDOS [Vladimir SU] 11 Aug 2010 14:01
I think time 0.031 was on old server, now as I can see there is no 0.031 solutions.

my solution has 0.062

Edited by author 11.08.2010 14:02
Re: How get AC in 0.031s?
Posted by r1d1 11 Aug 2010 14:08
06:43:27
1 окт 2009, 0.031s.
14:54:16
23 июл 2009    Andrew Hoffmann aka SKYDOS [Vladimir SU]    C++    0.062

Edited by author 11.08.2010 14:09
Re: How get AC in 0.031s?
Posted by Andrew Hoffmann aka SKYDOS [Vladimir SU] 11 Aug 2010 14:10
Yep! old server I think.
my solution uses printf(), scanf()... so faster - I dont know how to do)
r1d1 wrote 11 August 2010 14:08
06:43:27
1 окт 2009, 0.031s.
Re: How get AC in 0.031s?
Posted by r1d1 11 Aug 2010 14:18
I do not think that the old server worked faster new or incorrectly measured time. I think that the reason not in it.
Re: How get AC in 0.031s?
Posted by Andrew Hoffmann aka SKYDOS [Vladimir SU] 11 Aug 2010 14:20
I think that the problem is in new compiler C++/C
here is also topic about time: http://acm.timus.ru/forum/thread.aspx?id=25033&upd=634167871146203750
Re: How get AC in 0.031s?
Posted by r1d1 11 Aug 2010 14:30
Yes, you are right. Now the output works very slowly. Can be there are even ways quickly to print symbols, except cout and printf?
Re: How get AC in 0.031s?
Posted by Andrew Hoffmann aka SKYDOS [Vladimir SU] 11 Aug 2010 15:11
I dont know, I am using C# and there is no way to print faster and using less memory. Possible to read faster and with less memory...thats all.
Re: How get AC in 0.031s?
Posted by tiancaihb 11 Aug 2010 16:12
I suppose there's not such a way, as long as you wish to use Microsoft's stdio. Otherwise you'll have to print chars directly to output, using sth like asm, about which I know nothing.