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

Обсуждение задачи 1189. Pairs of Integers

Only some hours to solve it ! I think it's simple problem. Although at the first sight, it's likely hard.
Послано Phan Hoài Nam (Harvey Nash) 12 янв 2011 15:27
You can go from last digit to the first (the leftmost digit to the rightmost digit).

For example : 302

Considering 2 : There are some possibilities: 0 + 2, 1 + 1, 2 + 0, 6 + 6, 5 + 7 ... (first operant is of the larger number, second operant is of the smaller number).

Considering 0 : For each possibilities, you try to find out some possibilities that can be combined to produce 0 : 0 + 0...
You can try any combinations to produce 0 if two operants used to produce 2 is equal, if they are different, you only have an only way, it reduce very much calculations).

Considering 3 : The last digit, you can stop here and consider whether you have achieved a solution.