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?
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?
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?
Yep! old server I think.
my solution uses printf(), scanf()... so faster - I dont know how to do)
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?
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?
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?
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.