Nonsense
시간 제한1초메모리 제한1024 MB
각 질의 (a,b)마다 매우 큰 n과 x, y를 사용한 이항계수 곱의 가중합을 998244353으로 나눈 나머지를 구한다.
문제
Given , and , let denote the value of
Bobo also has pairs . Find the value of modulo .
Note:
입력
The input consists of several test cases terminated by end-of-file. For each test case,
The first line contains four integers , , and .
In the following lines, the -th line contains two integers and .
출력
For each pair, output an integer which denotes the value modulo .
제한
- for each
- for each
- In each input, the sum of does not exceed . The sum of does not exceed .