#P3223. [HNOI2012] 排队
[HNOI2012] 排队
Description
A certain middle school has boys, girls, and two teachers who are to line up for a physical examination. They form a single straight line, and no two girls may stand adjacent, and the two teachers may not be adjacent either. How many different lineups are there? (Note: every individual is distinct.)
Input Format
A single line containing two non-negative integers and , separated by a space, as described above.
Output Format
A single non-negative integer, denoting the number of different lineups. Note that the answer may be large.
1 1
12
Hint
For of the testdata, , .
For of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号