QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 2048 MB Total points: 100

#1366. 考试操纵

Statistics

一群学生正在参加一场判断题考试。每道题一分。作为老师,你希望你的学生表现得尽可能好——所以你作弊了!(我知道,你绝不会真的这么做。)为了作弊,你操纵了答案键,使得班级中的最低分尽可能高。

你能达到的最高最低分是多少?

输入格式

第一行包含两个整数 $n$ ($1 \le n \le 1,000$) 和 $k$ ($1 \le k \le 10$),其中 $n$ 是学生人数,$k$ 是考试中判断题的数量。

接下来的 $n$ 行,每行包含一个长度为 $k$ 的字符串,仅由大写字母 'T' 和 'F' 组成。该字符串表示学生提交的答案,按题目给出的顺序排列。

输出格式

输出一行,表示班级中可能达到的最高最低分。

样例

输入 1

5 4
TFTF
TFFF
TFTT
TFFT
TFTF

输出 1

2

输入 2

3 5
TFTFT
TFTFT
TFTFT

输出 2

5

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.