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 1863. Peaceful Atom

Test 1
Posted by sherbina_evgeniy 27 Sep 2014 12:33
I got WA1 and I don't understand why. Give me some tests please.
Re: Test 1
Posted by Tolstobrov Anatoliy[Ivanovo SPU] 6 Jan 2016 21:02
Test #1 describe into problem statement.

10 3 3
4 5 1

What it means, we have range [0, 10] and start position in 3. And have 3 shifts.
First shift we can go from 3 to [-1, 7] as -1 not in range we have only [7] positions.
Second shift we can go to positions [2, 12] as 12 not in range we have only [2] position.
Third shift we can go to positions [1, 3] as all of them in range we have 2 possible final states 1 and 3, minimal of them 1 and maximal 3. Answer will be 1 3.


Another test:
100 50 4
1 2 4 8

Possible positions on steps:
0) [50]
1) [49, 51]
2) [47, 49, 51, 53]
3) [43, 45, 47, 49, 51, 53, 55, 57]
4) [35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65]
Answer will be 35 65