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

Обсуждение задачи 1302. Дельта-волна

Damn, I cann't solve it!
Послано Alexey 2 июн 2006 17:08
Please, tell me how to solve this problem...
Not solution but an idea or a hint...
Thanks.
Re: Damn, I cann't solve it!
Послано Samsonov Alex [USU] 2 июн 2006 19:58
You just have to understand the optimal algorithm for finding a shortest way from A to B on this object.
Re: Damn, I cann't solve it!
Послано Alexey 2 июн 2006 20:31
I'm trying...
Should I write a Function(n) wich
returns the number of row in wich
n shands? There is three kinds of "rows",
so, what shall I do?
Give me the way to think...
Re: Damn, I cann't solve it!
Послано Burunduk1 2 июн 2006 22:30
Find optimal path from 1 to some small numbers.
It will help you.
Try to change direction in the optimal path as few times as possible.
Re: Damn, I cann't solve it!
Послано Alexey 3 июн 2006 16:34
It must be formula, isn't it?
Or there is an algo to find answer?
Re: Damn, I cann't solve it!
Послано Denis Koshman 25 июл 2008 20:00
There is a formula, but it's a bit easier to solve using algo. Convert input numbers into row/column. Row will not exceed ~33000, so you can iterate over row using algo and use math over column.
Re: Damn, I cann't solve it!
Послано Anton Beriugin 26 май 2022 17:45
Sorry, could you tell me the algorithm, otherwise I don’t understand it ...