#P1375. 小猫
小猫
Description
There are kittens standing in a circle. Their owner, Xiao Ming, wants to tie their tails together in pairs with strings. At the same time, Xiao Ming is a perfectionist and does not allow any two strings to cross. How many ways are there to connect them so that all kittens are paired?
The number of ways can be large; you only need to output the value modulo (a prime).
Input Format
A single line containing an integer .
Output Format
Output the number of ways modulo .
3
5
Hint
Constraints
- For 60% of the testdata, .
- For 100% of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号