QOJ.ac

QOJ

Límite de tiempo: 2.0 s Límite de memoria: 512 MB Puntuación total: 100 Hackeable ✓

#15544. 未命名简单题

Estadísticas

Alice 想要组一套包含 $m$ 道简单题的题单。她有 $n$ 个想法:前 $k$ 个想法是“极简单”的,而剩下的 $n-k$ 个想法是“简单”的。在 Alice 看来,一道简单题是由至少一个“简单”想法和若干个“极简单”想法组成的想法集合。众所周知,题单中不允许出现两道想法集合完全相同的题目,且题单中题目的顺序并不重要。对于每个想法,Alice 要求包含该想法的题目数量必须恰好为奇数或偶数。Alice 想要知道满足条件的不同的可能题单的总数,你只需要输出这个数量模 $19260817$ 的结果。

输入格式

第一行包含三个正整数 $n$,$k$ 和 $m$($1 \le k \le n \le 10^9$,$1 \le m \le 10^6$,且 $2^n - 2^k \ge m$)。

第二行包含两个整数 $o_{ee}$ 和 $o_{ez}$($0 \le o_{ee} \le k$ 且 $0 \le o_{ez} \le n - k$)。这表示有 $o_{ee}$ 个“极简单”想法和 $o_{ez}$ 个“简单”想法被要求在奇数道题中出现,而剩下的 $k - o_{ee}$ 个“极简单”想法和 $n - k - o_{ez}$ 个“简单”想法被要求在偶数道题中出现。

输出格式

唯一的一行包含一个整数,表示满足条件的题单总数模 $19260817$ 的值。

样例

输入样例 1

4 2 2
0 1

输出样例 1

4

说明

在这个样例中,标记为 $0, 1$ 的想法是“极简单”的,标记为 $2, 3$ 的想法是“简单”的。假设想法 $2$ 被要求在奇数道题中出现,而其他想法被要求在偶数道题中出现。

一共有 $12$ 道可能的简单题。每道题都可以用一个想法集合来表示:

$\{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\}$。

一共有 $4$ 种可能的题单。每种题单都可以用上述题目集合的集合来表示:

$\{\{3\}, \{2, 3\}\}$, $\{\{0, 3\}, \{0, 2, 3\}\}$, $\{\{1, 3\}, \{1, 2, 3\}\}$, $\{\{0, 1, 3\}, \{0, 1, 2, 3\}\}$。

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.