地地斗斗主主
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.
Background
请勿因题目名称而惊慌,出题人很菜,本题难度远小于 ''.join(random.choice(list(itertools.permutations("斗地主"))))
Description
小果在玩地地斗斗主主
一副牌共有种大小的牌,第种大小共有张
小果有个卡槽,编号~,他闭着眼睛摸了一手牌,使得每个卡槽内恰好有张牌
如果卡槽内牌的大小恰好分别为,则称这是一个天地顺
小果想知道一共有多少种可能,使得这手牌内恰有个天地顺
两手牌被认为是不同的,当且仅当存在至少一个卡槽,槽内的牌大小不相等
答案对取模
Format
Input
第一行,三个正整数
第二行,个正整数
Output
一行,一个非负整数,表示答案对取模
Samples
4 2 1
4 4
10
Limitation
2023年中国科学院大学第一届“果萌杯”程序设计大赛(决赛)
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 5
- Start at
- 2023-8-20 14:00
- End at
- 2023-8-20 16:00
- Duration
- 2 hour(s)
- Host
- Partic.
- 21