Comments

I hope you won’t regret your decision to participate in ABBYY Cup :)

Bump :)

The contest starts in 7 hours. Good luck all!

On ashmelevCodeforces Beta Round #66, 13 months ago
0
Did you mean pretests? It works fine for the examples.
On ashmelevCodeforces Beta Round #66, 13 months ago
+5
No one solved it yet, it seems the test case is broken.
On ashmelevCodeforces Beta Round #66, 13 months ago
+9
Да, согласен. Я потратил где-то полчаса, пытаясь понять, где ошибка в моём решении. Более того, перед отправкой я задал вопрос: "Может ли Вася использовать информацию, которую он получил при просмотре некого режима, для открытия нового режима?" -- и получил ответ "Да", так что даже не было сомнений, что я мог понять условие неправильно.
Но вариант голосования здесь вполне уместен, поскольку действительно повлияло это на очень немногих участников.
It seems my solution didn't consider transporting m goats at once, now it outputs 5 for 2 2 and receives WA 10, so the 10th test case is probably wrong.
Yes, this is correct. It's almost the same as the second approach described in the analysis (using Euler's theorem directly).
If your solution is as you wrote, then I believe it's wrong, at least for the case a = 2, b = 4, c = 12. Your answer is 1 while the correct answer is 2^4 mod 12 = 4.