No.1655 123 Swaps
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.
- Swap the values of $P_1$ and $P_2$.
- Swap the values of $P_2$ and $P_3$.
- Swap the values of $P_3$ and $P_1$.
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$
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もしくは右上の雲マークをクリックしてアカウントを作成してください。
chocorusk
Kiri8128