8604: SolarPea and Inversion

内存限制:512 MB 时间限制:4 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:1 通过:1

题目描述

SolarPea thinks inversion is beautiful.

For a 01-sequence Z with length n and a constant c, SolarPea defines the rating of Z is:






SolarPea wrote all 01-sequences which have length n and contain m '1's on the paper. PolarSea saw it and crossed out all sequences that he doesn't like. Now you're given c, please calculate the sum of the ratings of the remaining sequences on the paper.

Since the answer could be very large, you should output it modulo 1065977431 (a prime number).

It is guaranteed that c is generated randomly.

输入格式

输出格式

Output the answer modulo 1065977431。

输入样例 复制

3 2 1 10
2 1

输出样例 复制

101

数据范围与提示

分类标签