数数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Problem Description
现在有四种物品,分别有 ,有多少种排列所有物品的方案使得任意两个相邻物品的种类不同。
Input Format
一行四个正整数 。
Output Format
输出一行一个整数表示方案数。对 取模。
Sample
Input
0 1 2 3
Output
10
Hint
$0 \leq n_1,n_2 \leq 200, 0 \leq n3,n4 \leq 5 \times 10^4$
重庆邮电大学第二十一届ACM程序设计大赛(网络赛)
- Status
- Done
- Rule
- XCPC
- Problem
- 11
- Start at
- 2026-4-18 0:00
- End at
- 2026-4-20 0:00
- Duration
- 48 hour(s)
- Host
- Partic.
- 24