#Lutece0219. Chiara’s “Beiju”
Chiara’s “Beiju”
Migrated from Lutece 219 Chiara’s “Beiju”
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Chiara has cups, numbered from to . Cups are laid on a table, each upward or downward. Chiara enjoys turning cups. Every time she will select cups and play her silly game. If a cup is upward, it will be downward after her turning, and vice versa. One day, Chiara's friends are coming to see her. She'd like to use the cups for coffee serving (Chiara is addicted to coffee desperately, that's...OK). However, the cups are not all upward. She is wondering if it is possible to make them all upward after several turnings. Since time is limited, you have to give her the minimum number of steps.
Note: Chiara has to turn cups each time.
Input
There are multiple cases. The first line is an integer , then following cases.
For each case:
The first line has two integers ,. is the total number of cups and is the number of cups Chiara has to turn each time.
The second line has numbers, either or ( for upward and for downward), separated by spaces.
Output
If Chiara can achieve her goal, please output the minimum number of turnings, otherwise print Poor Girl
.
Samples
2
6
3
0 0 0 1 1 1
2
2
0 1
1
Poor Girl
Resources
第四届北京邮电大学程序设计竞赛网络预赛