ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2003. Simple Magic

What is mistake? 3 days of hard tries
Posted by Dmitriy 3 Sep 2016 20:55
Hello, as you can see (http://acm.timus.ru/status.aspx?author=52097 ), my solve cant get AC.

For all my test cases it looks like very good. Probably I have a little bug or something else and I cant find this mistake (WA on test #10). After many hours spenting for this problem I dont know where could it be. Please, give me simple hint or fail testcase.

My solution at work on those tests:

4
1 1 1 1
0

4
3 1 3 3
inf


4
8 12 4 6
inf

6
4 4 2 4 2 2
inf

3
5 3 7
1

3
8 8 3
2

3
32 64 3
2

3
36 225 1225
2

3
16777216 1594323 5764801
1

3
16777216 1594323 11529602
2

6
2365440 2 3 5 7 11
2


It looks like good for big tests too. Please help. What is the #10 test?

Edited by author 03.09.2016 20:56
Re: What is mistake? 3 days of hard tries
Posted by Dmitriy 3 Sep 2016 20:58
(my solution provide 4 answers at all: infinity, 0, 1, 2)
Re: What is mistake? 3 days of hard tries
Posted by Jade 3 Sep 2016 21:35
You're welcome~

Edited by author 04.09.2016 18:23
Re: What is mistake? 3 days of hard tries
Posted by Dmitriy 4 Sep 2016 18:08
Thx, I've got AC.
Re: What is mistake? 3 days of hard tries
Posted by D4nick 24 Sep 2020 16:28
.

Edited by author 24.09.2020 17:19