#P6870. [COCI 2019/2020 #5] Zapina
[COCI 2019/2020 #5] Zapina
Description
There are distinct people and distinct problems.
The -th person is happy if and only if they are assigned problems.
Find the number of assignment plans that make at least one person happy.
Input Format
One positive integer: .
Output Format
One number: your answer .
1
1
2
3
314
192940893
Hint
Constraints
This problem uses bundled testdata.
- For pts of testdata, .
- For another pts of testdata, .
- For all testdata, .
Sample #2 Explanation
There are the following plans:
-
Give the first problem to the first person, and the second problem to the second person.
-
Give the second problem to the first person, and the first problem to the second person.
-
Give both problems to the second person.
Notes
Translated from COCI2019-2020 CONTEST #5 T5 Zapina, translated by 90693。
Translated by ChatGPT 5
京公网安备 11011102002149号