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

Обсуждение задачи 1565. Необычная дуэль

Hint for this problem
Послано 198808xc 12 окт 2010 17:42
This is a problem with possible loops in decision. That means your decision will be based on others' decision, which might  again be based on yourself. I think the best way to solve this sort of problems is to use ITERATION.

I believe that some people could solve this directly. If you are like this, please post your idea or formula, I want to know it very much.

During iteration, we must pay attention to the initialization value. If you have a bad init-value, you will not be able to  move even one step in this problem. In my opinion, the init-value could be set as: when someone is starting a duel, then he could win this duel with prob 1.

By the way, iteration will stop very quickly, as the calculation is unusual: there is function "MAX". So do not worry about the complexity of the problem.

At last, some test-data here:

1.0 0.8 0.5
0.30000000 0.17777778 0.52222222

1.0 0.5 0.0
0.75000000 0.25000000 0.00000000

1.0 1.0 0.0
0.50000000 0.50000000 0.00000000

1 0.9 0.8
0.11000000 0.08265306 0.80734694

1 0.99999 0.99998
0.00001000 0.00001000 0.99998000
(Suprising or not?)

1 0.0001 0.0002
0.99975002 0.00014998 0.00010000

So, Good luck.
Re: Hint for this problem
Послано [York Hotel] maple 13 июн 2011 20:11
Thanks for your hint. I got WA12, then I increase iteration to 5000 times, it ac now.
Re: Hint for this problem
Послано Alex Danilyuk [SESC USU Dandelion] 15 фев 2013 17:35
My AC solution doesn't use iterations. It is based on some formulas.
Rules of the forum says that I mustn't post my solution. But I can send my solution to you if you want to.