#abc253e. E - Distance Sequence
E - Distance Sequence
Score : points
问题描述
有多少个长度为 的整数序列 满足以下所有条件?
由于满足条件的序列数量可能非常庞大,因此请在模 下计算该数量。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
How many integer sequences of length satisfy all the conditions below?
Since the count can be enormous, find it modulo .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the count modulo .
Sample Input 1
2 3 1
Sample Output 1
6
The following sequences satisfy the conditions.
Sample Input 2
3 3 2
Sample Output 2
2
The following sequences satisfy the conditions.
Sample Input 3
100 1000 500
Sample Output 3
657064711
Print the count modulo .
update @ 2024/3/10 10:47:45
相关
在以下作业中: