結果

問題 No.1908 Assault for Keys
ユーザー TsubajiroTsubajiro
提出日時 2022-05-16 19:11:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 310 ms / 2,000 ms
コード長 326 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 9,880 KB
最終ジャッジ日時 2023-10-12 13:03:26
合計ジャッジ時間 7,526 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,612 KB
testcase_01 AC 18 ms
8,584 KB
testcase_02 AC 283 ms
9,880 KB
testcase_03 AC 295 ms
9,700 KB
testcase_04 AC 291 ms
9,656 KB
testcase_05 AC 278 ms
9,736 KB
testcase_06 AC 271 ms
9,768 KB
testcase_07 AC 291 ms
9,800 KB
testcase_08 AC 293 ms
9,700 KB
testcase_09 AC 286 ms
9,700 KB
testcase_10 AC 306 ms
9,696 KB
testcase_11 AC 279 ms
9,732 KB
testcase_12 AC 280 ms
9,776 KB
testcase_13 AC 267 ms
9,700 KB
testcase_14 AC 281 ms
9,744 KB
testcase_15 AC 291 ms
9,836 KB
testcase_16 AC 20 ms
8,600 KB
testcase_17 AC 20 ms
8,488 KB
testcase_18 AC 246 ms
9,608 KB
testcase_19 AC 310 ms
9,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = list(map(int, input().split()))
S = []
for _ in range(N):
    S.append(input())
from collections import defaultdict
dict = defaultdict(int)

for i in range(N):
    for j in range(M):
        if S[i][j]=="o":
            dict[j]+=1
minc = 10**10
for v in dict.values():
    minc = min(minc,v)

ans = N-minc+1

print(ans)
0