#P16781. ⌈Xzy OI R1 T3⌋ 穿穿表

    ID: 18745 远端评测题 500ms 512MiB 尝试: 0 已通过: 0 显示难度提高 上传者: 标签>矩阵加速Lucas 定理根号分治

⌈Xzy OI R1 T3⌋ 穿穿表

Problem Description

Ciyaqiu has a Pascal’s triangle placed in the fourth quadrant of the Cartesian coordinate system. Inside the triangle, (ij)\binom{i}{j} is placed at the coordinate (j,−i)(j,-i), as shown in the figure:

Ciyaqiu has two non-negative integers k,bk,b. He wants to use the line y=kx−by=kx-b to pass through this Pascal’s triangle. Please tell him the result of the sum of all numbers on this line modulo 11451411145141. 11451411145141 is a prime number, and Ciyaqiu does not know why he has to use it.

Input Format

One line with two non-negative integers k,bk,b.

Output Format

One line with one non-negative integer representing the answer.

2 6
6

Hint

【Constraints】

This problem uses bundled testdata, meaning you must pass all test points in a subtask to obtain the score for that subtask.

::cute-table{tuack}

Subtask Score 0≤k≤0 \le k \le 0≤b≤0 \le b \le
11 1010 00 2×1092 \times 10 ^9
22 2020 11 ^
33 100100
44 5050 2×1092 \times 10^9

Translated by ChatGPT 5