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

Обсуждение задачи 1016. Кубик на прогулке

Xan Tei Jun What is the BruteForce Algorithm [3] // Задача 1016. Кубик на прогулке 28 окт 2009 12:09


Edited by author 28.10.2009 16:46
tiancaihb Re: What is the BruteForce Algorithm [1] // Задача 1016. Кубик на прогулке 28 окт 2009 16:48
For every point on the board, we change it into 24 different points in our graph. Every point means a state where the cube move onto it, eg (a,b) means "a" at bottom and "b" at front. Weights are the numbers on the bottom. Use dijkstra at last.
Start dfs from starting node and when you crossed through some node more than 2 then return.