#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 x=407693x=40^{76^{93}}. There are nn points on the plane, and the coordinates of the ii-th point are (xi,0)(x^i,0).

Perform mm operations. In each operation, choose two points AA and BB, rotate AA clockwise around BB by 60°60°, and delete BB.

Find how many possible positions the centroid of all remaining points can have in the end, modulo 998244353998244353.

2n4076932 \le n\le 407693, 1mn11\le m\le n-1.

Input Format

One line with two integers n,mn,m.

Output Format

One line: the answer modulo 998244353998244353.

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