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

Обсуждение задачи 1507. Трудное решение

After rejudge I had WA42 and Crash on #41. Hints are here (+)
Послано Tbilisi SU: Andrew Lutsenko 31 окт 2006 13:55
I had crash because of trivial stack overflow, my recursion never ended. Check the recursion exit condition.
Hint for WA42:
Power 0 of M(nxn) matrix is a matrix
1 0 .. 0
0 1 .. 0
........
0 0 .. 1

Good luck and have fun :)
Re: After rejudge I had WA42 and Crash on #41. Hints are here (+)
Послано Fantast 31 окт 2006 15:21
As i can understand from changes i did to make my solution work,  42th test was
---------
1
0
---------
And it's considered that [0]^0 = [1]
But Power 0 of [0]-Matrix is undefined, isn't it?
Re: But Power 0 of [0]-Matrix is undefined, isn't it?
Послано Sandro (USU) 31 окт 2006 15:44
Sorry, there may be different definitions. But you may be sure that [0]^0 = [1] in this problem.
Re: After rejudge I had WA42 and Crash on #41. Hints are here (+)
Послано ucmcauchy 31 окт 2006 19:49
My program keeps getting WA in the test 42 but works fine for the input:
1
0
whose output is Yes
In fact my exponentation is ok when the exponent is 0.
Any possible explanation?
N >= 2 now (+)
Послано Vladimir Yakovlev (USU) 31 окт 2006 21:57
I agree, that test
1
0
is not correct, because [0]^0 in not defined in problem statements.

New tests 41 and 42 have been modified. N >= 2 now for this problem. Submissions have been rejudged back.
Re: N >= 2 now (+)
Послано Tbilisi SU: Andrew Lutsenko 1 ноя 2006 14:25
After second rejudge all my attempts (except one or two with silly mistakes) were accepted =)