2026牛客国庆集训派对day6
F
MMR Double Down Tokens
牛客竞赛
未评级
原题
← EG →

MMR Double Down Tokens官方中文

题目描述

官方中文

Bobo has recently been playing Dota2. Due to a new event, "Crownfall" in Dota2, Bobo received a number of $k$ Double Down Tokens. In ranked contests of Dota2, players receive $+1$ MMR for wins and $-1$ MMR for loses. MMR Double Down tokens are items that can be used \textbf{at the beginning of a ranked contest}, so that the MMR gained in this contest will be doubled ($+2$ for wins and $-2$ for loses). However, Bobo suspects that Dota2 uses the ELO matching system to balance the winrates of players so that he will receive exactly $n$ wins and $m$ loses in the upcoming $n+m$ contests, and all possible combinations of $n$ wins and $m$ loses will appear with equal probability. Now, Bobo wants to design a strategy to use some of the $k$ MMR Double Down tokens so that after the $n+m$ contests, the expected additional MMR gained using MMR Double Down Tokens(that is, the MMR change across all $n+m$ contests, subtracted by $n-m$) is maximum. You need to find out this maximum expected value.官方中文

输入格式

官方中文

The only line of input contains $3$ integers $n,m,k$ $(1\leq n,m\leq 5\cdot 10^6, 0\leq k\leq n+m)$.官方中文

输出格式

官方中文

Output an integer in one line, denoting the answer. Under the input constraints of this problem, it can be shown that the answer can be written as $\frac{P}{Q}$, where $P$ and $Q$ are coprime integers and $Q\not\equiv 0\pmod {998244353}$. You need to output $P\cdot Q^{-1}\pmod{998244353}$ as an answer, where $Q^{-1}$ is the modular inverse of $Q$ with respect to $998244353$.官方中文

样例

Input #1
1 1 2
Output #1
499122177
For the first sample test, the optimal strategy of Bobo is as follows: if the first game is a lost, Bobo will use the MMR Double Down token at the beginning of the second contest, so he will guarantee an additional MMR gain of $+1$; if the first game is a win, Bobo will not use any MMR double down token. The expected additional MMR gained using this strategy is $\frac{1}{2}\times 1+\frac{1}{2}\times 0=\frac{1}{2}$.
Input #2
1 3 0
Output #2
0
Input #3
4 1 5
Output #3
598946615
Input #4
1 9 5
Output #4
299473306
题目信息
题号
nc140734pf
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 牛客竞赛 及出题人所有;中文翻译由 AI 生成(官方原文),如有出入请以原文为准。