Codeforces 1191B. Tokitsukaze and Mahjong Codeforces Round #573 (Div. 2)


Problem link

There are only two types of mentsus, so you can enumerate the mentsu you want her to form, and check the difference between that and those currently in her hand.

Alternatively, you can find out that the answer is at most 2, since she can draw two extra identical tiles which are the same as one of those in her hand. You may enumerate at most 1 extra tile for her and check if it can contribute to a mentsu. If she can't, the answer will be 2.

A solution in c++


Post a Comment

0 Comments