結果

問題 No.2178 Payable Magic Items
ユーザー ニックネーム
提出日時 2023-01-06 23:28:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 497 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 79,112 KB
最終ジャッジ日時 2024-12-14 18:06:00
合計ジャッジ時間 6,706 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 17 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
x = set()
for _ in range(n):
    s = tuple(map(int, input()))
    y = set()
    for t in x:
        f = g = False
        for i in range(k):
            if s[i]>t[i]: f = True
            if s[i]<t[i]: g = True
        if g: y.add(t)
        if not f: break
    else: y.add(s)
    x = set(y)
print(n-len(x))
0