C. 找不同

    Type: Default File IO: find 1000ms 256MiB

找不同

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

小明有nn个字符串,每个字符串长度都是mm,只包含大写字母GGBB

定义Fi,jF_{i,j}表示第ii个字符串跟第jj个字符串有多少个不一样的位置。

现在,对于每一个ii,小明好奇maxjFi,j\max_j F_{i,j}是多少。也就是跟ii最不一样的字符串,有多少个位置不一样。

输入格式

第一行输入n,mn,m

接下来nn行,每行一个长度为mm的字符串。

输出格式

输出nn个数字,每个在单独的一行。

3 2
GG
HH
GH
2
2
1
3 3
GGG
HGH
GHG
2
3
3

数据范围

对于10%的数据:n1000n\leq 1000

对于另20%的数据:m10m\leq 10

对于另40%的数据:m15m\leq 15

对于100%的数据:n105,m18n\leq 10^5,m\leq 18

0127测试

Not Attended
Status
Done
Rule
IOI
Problem
4
Start at
2026-1-27 8:30
End at
2026-1-27 11:42
Duration
3.2 hour(s)
Host
Partic.
36