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

Обсуждение задачи 2021. Страшно интересно!

WA17
Послано Agabek 11 окт 2014 17:24
What is T17 ?
Re: WA17
Послано BSN 13 окт 2014 10:54
The same problem :(
Re: WA17
Послано Angel Gonzalez 11 дек 2014 19:25
Can anybody share that testcase?
Re: WA17
Послано Otrebus 22 янв 2015 21:30
Same! :)
Re: WA17
Послано Otrebus 22 янв 2015 23:17
Here's a test case:
4
6 6 5 0
0 2 1 2
Re: WA17
Послано SergeiEgorov 15 авг 2015 01:49
Which answer is correct for this test?
My output (I also have WA17):
4 1
3 2
1 4
2 3
Why is it wrong?
Re: WA17
Послано Jane Soboleva (SumNU) 7 мар 2016 16:01
Okay, so i finally figured it out.
There was a phrase «For example, if six challenges until the end “Oozma Kappa” is forty points ahead, the audience at the stadium stands will just lose interest to the game.», which made me think that to "keep in suspense", on each step, i should choose such pair, that the current total sum is as close to zero as possible. However, this approach gives WA17. The proper approach is to keep, for as long as possible, such situation that if the first team gets all 6's for the remaining participants, and second gets all 0's, the first team wins; respectively, if 2nd team gets all 6's for the remaining participants, and 1st gets all 0's, 2nd team wins.
An example test:
11
5 5 5 5 5 5 6 6 6 6 6
6 6 6 6 6 6 0 0 0 0 0
Wrong WA17 approach gives
6 6 6 6 6 5 5 5 5 5 5
6 6 6 6 6 6 0 0 0 0 0
but last two rounds aren't interesting, because at that point 1st team has 50, and 2nd team has 36 points, and even if 2nd team gets all 6's for last two, and 1st all 0's, it's still 50:48 and 1st team wins.
One of the right answers is
5 5 5 5 5 5 6 6 6 6 6
6 6 6 6 6 6 0 0 0 0 0
Before last two rounds, we have 48:36, and 2nd team can potentially get all 6's on last two rounds for a draw 48:48; however, after a next round we have 54:36, and only then gets clear that 2nd team isn't going to win.

Cheers to Felix_Mate for a test and nice explanation.
Re: WA17
Послано Smilodon_am [Obninsk INPE] 1 ноя 2018 02:21
> Which answer is correct for this test?
> My output (I also have WA17):
> 4 1
> 3 2
> 1 4
> 2 3
> Why is it wrong?

This answer is wrong. We understand that the first team is a winner after the third round:
4 1    ->    0 + (0-0) = 0
3 2    ->    0 + (5-2) = 3
1 4    ->    3 + (6-2) = 7 - we understand that the first team is a winner
2 3    ->    +(6-1) = 12

Correct answer is, for example:
4 2
3 4
2 3
1 1
Explanation - we understand that the first team is a winner only after the last (forth) round:
4 2    ->    0 + (0-2) = -2
3 4    ->    -2 + (5-2) = 1
2 3    ->    1 + (6-1) = 6 - we don't know who is a winner
1 1    ->    6 + (6-0) = 12

Edited by author 01.11.2018 02:24

Edited by author 01.11.2018 02:24