#P1595. Exam Manipulation

Exam Manipulation

题目描述

Click here to read PDF of this problem

输入格式

As shown in the PDF.

输出格式

As shown in the PDF

样例

5 4 
TFTF 
TFFF 
TFTT 
TFFT 
TFTF 

2 

3 5 
TFTFT 
TFTFT 
TFTFT 

5 

提示

by 20张席畅