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

SPbSU ITMO contest. Petrozavodsk training camp. Winter 2008

Описание     Задачи     Отправить на проверку     Состояние проверки     Результаты
Соревнование завершено

C. Clever House

Ограничение времени: 2.0 секунды
Ограничение памяти: 64 МБ
Little boy Vasya likes high-end technologies. Recently he read about "clever houses", where everything is managed automatically, and decided to make his house "clever". To begin with, he connected all N light-bulbs to his computer, which will help to manage the lighting level and save the energy.
Little hacker Petr, who lives nearby, decided to make a nasty thing to Vasya. He created a computer virus. The main action of this virus is to select a random light-bulb and change its state (to switch off if it was on, and vice versa). This action is repeated for K times.
At the beginning there were M light bulbs turned on. Now Petr wants to know how efficient his attack will be. More precisely, he wants to know how much light-bulbs in average will be on after the virus is activated (the mathematical expectation of this value). Help him in this complex task!

Исходные данные

In the only line there are three integers: N (1 ≤ N ≤ 109), M (0 ≤ MN), K (0 ≤ K ≤ 1000).


Output the answer as an irreducible fraction p/q.


исходные данныерезультат
1 1 9
5 4 3
Источник задачи: SPbSU ITMO contest. Petrozavodsk training camp. Winter 2008.
Чтобы отправить решение этой задачи на проверку перейдите в Архив задач: 1620. Clever House