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

Обсуждение задачи 1167. Bicolored Horses

King Without Kingdom Why Memory Limit Exceeded?????HELPHELPHELPHELPHELP [2] // Задача 1167. Bicolored Horses 25 сен 2002 03:04
[deleted by moderator]

Edited by moderator 13.04.2004 07:47
Petar Zhivkov Petrov Re: Why Memory Limit Exceeded?????HELPHELPHELPHELPHELP [1] // Задача 1167. Bicolored Horses 25 сен 2002 19:44
 You may use 'short int' instead of 'int' sizeof(int) == 4, sizeof
(short int) == 2, according to the timus's compiler. So unsigned
short int is enough. Even if this program fits in the memory limit,
it will get TL. You have complexity of O(N^3). Mine was the same, it
needs 3-4 secs. for N=500 K=300. I'm now wondering how to solve this
problem.
you must use longint not just int, but O(N) memory. O(N^3) works, don't know if N^2 possible