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

Обсуждение задачи 1827. Войны туземцев

I use double hash but still tle. and i do not know how to use fread, fwrite in online judge,please help
Послано muhammad 27 мар 2011 22:48
my algo should be n*50*order of hash
probably large input is causing problem

i can use fread and fwrite but don't know how to do it in online judge submission.
please provide me with some code segment that utilize fread and fwrite.
better be some eg problem as 1000. a+b problem

thanks in advance.
Re: I use double hash but still tle. and i do not know how to use fread, fwrite in online judge,please help
Послано tracyzhu 28 мар 2011 12:17
So did i. did you find some methods to solve it? please help me.thx a lot.
Re: I use double hash but still tle. and i do not know how to use fread, fwrite in online judge,please help
Послано muhammad 29 мар 2011 22:26
yes. my hash was correct. but i used long long for calculation. i replaced with int except for one case and got ac. anyway my mod value for double hash was 499979. hash using just those 3 integers in 2e8 radix system and avoid long long as much as possible. good luck. anyway i still want to know the fread, fwrite magic. as so many problems i got ac in 0.015 sec but best timing was 0.001 sec. if u know, please help.

Edited by author 29.03.2011 22:28