#P10897. AGC022F Checkers 故事2
AGC022F Checkers 故事2
Background
"The everlasting past, the future that gradually fades away."
Taking something as a price, taking some price as an opportunity...?
"I'm not crazy, my reality is just different to yours."
Yellow sand rolls with wild winds, and the courtyard remains as it was.
Problem Description
Let . There are points on the plane, and the coordinates of the -th point are .
Perform operations. In each operation, choose two points and , rotate clockwise around by , and delete .
Find how many possible positions the centroid of all remaining points can have in the end, modulo .
, .
Input Format
One line with two integers .
Output Format
One line: the answer modulo .
3 2
12
4 3
60
22 21
478037653
407693 333333
971291318
Hint
This problem has only one Subtask. You can score only if you pass all testdata.
No matter how unreal the dream is,
no matter how faint the hope is,
sadness, pain, and despair—don’t be afraid.
It’s okay, they are all the same.
Forget the unreal dream,
give up the faint hope.
The happy and beautiful scene—let’s do it again,
how about it?
Translated by ChatGPT 5