問題一覧 > 通常問題

No.1655 123 Swaps

レベル : / AI推定難易度 : 2500 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 19
作問者 : chocorusk / テスター : Kiri8128
お気に入りにしたユーザー ProblemId : 6594 / 自分の提出
問題文最終更新日: 2021-08-09 09:32:51
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 310 (順位表) の他の問題:

Problem Statement

Rasuku has a sequence $P=(P_1, P_2, P_3)$ of length $3$. Initially, $P=(1, 2, 3)$. Rasuku can perform the following $3$ types of operations.

  1. Swap the values of $P_1$ and $P_2$.
  2. Swap the values of $P_2$ and $P_3$.
  3. Swap the values of $P_3$ and $P_1$.
How many orders of performing operation $1$ $A$ times, operation $2$ $B$ times, and operation $3$ $C$ times result in $P=(1, 2, 3)$ after all operations are finished? Find the count modulo $924844033$ (a prime).

Input

$A\ B\ C$

  • $0\leq A, B, C\leq 2\times 10^5$
  • $(A, B, C)\neq (0, 0, 0)$
  • All input values are integers.

Output

Print the number of orders of operations that result in $P=(1, 2, 3)$ after all operations are finished, modulo $924844033$.

Sample

Sample 1
Input
1 1 2
Output
4

The orders that perform operation $1$ $1$ time, operation $2$ $1$ time, and operation $3$ $2$ times and result in $P=(1, 2, 3)$ are the following $4$.

  • Operation $1\to$ Operation $3\to$ Operation $2\to$ Operation $3$
  • Operation $2\to$ Operation $3\to$ Operation $1\to$ Operation $3$
  • Operation $3\to$ Operation $1\to$ Operation $3\to$ Operation $2$
  • Operation $3\to$ Operation $2\to$ Operation $3\to$ Operation $1$
For example, if the operations are performed in the order Operation $1\to$ Operation $3\to$ Operation $2\to$ Operation $3$, then $P$ changes as $(1, 2, 3)\to (2, 1, 3)\to (3, 1, 2)\to (3, 2, 1)\to (1, 2, 3)$.

Sample 2
Input
3 1 0
Output
0

No matter in what order you perform operation $1$ $3$ times and operation $2$ $1$ time, you never get $P=(1, 2, 3)$.

Sample 3
Input
314 159 265
Output
856983114

Print the answer modulo $924844033$.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。