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

Обсуждение задачи 1863. Мирный атом

Test 1
Послано sherbina_evgeniy 27 сен 2014 12:33
I got WA1 and I don't understand why. Give me some tests please.
Re: Test 1
Послано Tolstobrov Anatoliy[Ivanovo SPU] 6 янв 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