electicode
АсосӣКурсҳоМанбаъҳоМасъалаҳоОлимпиадаи миллӣМусобиқаҳоҶадвали роҳбарон
...

Bouquet

Маҳдудияти вақт: 1000msМаҳдудияти ҳофиза: 256MB
Ҳамаи ҳалҳо

Тавсифи масъала

Somon has nnn types of flowers, one of each. He is going to choose one or more of these flowers to make a bouquet. However, she does not like two numbers aaa and bbb, so the number of flowers in the bouquet cannot be equal to aaa or bbb. How many different bouquets can Somon make? Find the number of bouquets modulo (109+7)(10^9+7)(109+7). Here, two bouquets are considered different if there is a flower that is used in one bouquet but absent in the other.

Input Format

The only line of the input contains three integers nnn, aaa and bbb (2≤n≤109,1≤a<b≤min⁡(n,2×105))(2 \le n \le 10^9, 1 \le a < b \le \min(n, 2 \times 10^5))(2≤n≤109,.

Output Format

Print a single number --- the answer to the problem modulo (109+7)(10^9+7)(109+7).

Мисолҳо

Мисол 1
Вуруд
4 1 3
Баромад
7
Мисол 2
Вуруд
1000000000 141421 173205
Баромад
34076506

© 2026 Electicode. All rights reserved.

1
≤
a<
b≤
min(n,2×
105))