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

Обсуждение задачи 1225. Флаги

How to solve it ?
Послано prostack 5 фев 2014 16:27
I'm newby here and I didn't solve this kind of tasks before.
I know, that must be very easy, give me please some pieces of advice to solve it.
Re: How to solve it ?
Послано [RISE] Levon Oganesyan [RAU] 6 фев 2014 05:51
Think abstractly! It's very easy!

Edited by author 06.02.2014 05:58

Edited by author 06.02.2014 05:58
Re: How to solve it ?
Послано morbidel 6 фев 2014 19:38
You can either take it the mathematical way, and solve it by induction: assume you know the number of ways for 1..N stripes, how to find out the ways for N+1?
Or you can make a brute-force algorithm (backtracking) that simply counts and prints the number of ways for each N between 1 and 10-20 (until it gets too slow), then try to deduce a general rule for N, based on this series.
Good luck!