ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1330. Интервалы

How get AC in 0.031s?
Послано r1d1 11 авг 2010 13:32
My solve O(N), but output too slow. How fast print answer?
Re: How get AC in 0.031s?
Послано Andrew Hoffmann aka SKYDOS [Vladimir SU] 11 авг 2010 13:51
printf()
Re: How get AC in 0.031s?
Послано r1d1 11 авг 2010 13:59
I use printf. Also slow.

Edited by author 11.08.2010 14:00
Re: How get AC in 0.031s?
Послано Andrew Hoffmann aka SKYDOS [Vladimir SU] 11 авг 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?
Послано r1d1 11 авг 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?
Послано Andrew Hoffmann aka SKYDOS [Vladimir SU] 11 авг 2010 14:10
Yep! old server I think.
my solution uses printf(), scanf()... so faster - I dont know how to do)
r1d1 писал(a) 11 августа 2010 14:08
06:43:27
1 окт 2009, 0.031s.
Re: How get AC in 0.031s?
Послано r1d1 11 авг 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?
Послано Andrew Hoffmann aka SKYDOS [Vladimir SU] 11 авг 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?
Послано r1d1 11 авг 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?
Послано Andrew Hoffmann aka SKYDOS [Vladimir SU] 11 авг 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?
Послано tiancaihb 11 авг 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.