409012: GYM103415 D Unnamed Easy Problem

Memory Limit:512 MB Time Limit:0 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. Unnamed Easy Problemtime limit per test2.0 smemory limit per test512 megabytesinputstandard inputoutputstandard output

Alice wants to compose a set of $$$m$$$ easy problems. And she has $$$n$$$ ideas: The first $$$k$$$ ideas are extremely easy, while the other $$$n{-}k$$$ are easy. In Alice's opinion, an easy problem is a set of ideas consisting of at least one easy idea and several extremely easy ideas. As we all know, two problems with the same set of ideas are not allowed, and the order of problems in a problem set does not matter. For each idea, Alice requires it to be exactly in an odd or even number of problems. Alice wants to know the total number of different possible problem sets, and you just need to output this number modulo $$$19260817$$$.

Input

The first line contains three positive integers $$$n$$$, $$$k$$$, and $$$m$$$ ($$$1\leq k\leq n\leq 10^9$$$, $$$1\leq m\leq 10^6$$$, and $$$2^n-2^k\ge m$$$).

The second line contains two integers $$$o_{ee}$$$ and $$$o_{ez}$$$ ($$$0\leq o_{ee}\leq k$$$ and $$$0\leq o_{ez}\leq n-k$$$). It means $$$o_{ee}$$$ extremely easy ideas and $$$o_{ez}$$$ easy ideas are required to be in an odd number of problems, and the rest $$$k-o_{ee}$$$ extremely easy ideas and $$$n-k-o_{ez}$$$ easy ideas are required to be in an even number of problems.

Output

The only line contains an integer — the total number $$$\bmod 19260817$$$.

ExampleInput
4 2 2
0 1
Output
4
Note

In this example, ideas marked with $$$0,1$$$ are extremely easy, and the ones marked with $$$2,3$$$ are easy. Assume that the idea $$$2$$$ is required to be in an odd number of problems, and the others are required to be in an even number of problems.

There are $$$12$$$ possible easy problems. Each of them can be represented by a set of ideas: $$$$$$\{2\},\{3\},\{2,3\},\{0,2\},\{0,3\},\{0,2,3\},\{1,2\},\{1,3\},\{1,2,3\},\{0,1,2\},\{0,1,3\},\{0,1,2,3\}.$$$$$$ And there are $$$4$$$ possible problem sets. Each of them can be represented by a set of sets above: $$$$$$\{\{3\},\{2,3\}\},\{\{0,3\},\{0,2,3\}\},\{\{1,3\},\{1,2,3\}\},\{\{0,1,3\},\{0,1,2,3\}\}.$$$$$$

加入题单

上一题 下一题 算法标签: