結果

問題 No.2178 Payable Magic Items
ユーザー ニックネームニックネーム
提出日時 2023-01-06 23:36:53
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 337 bytes
コンパイル時間 329 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 127,120 KB
最終ジャッジ日時 2024-05-08 13:40:21
合計ジャッジ時間 6,793 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,480 KB
testcase_01 AC 39 ms
51,840 KB
testcase_02 AC 37 ms
52,096 KB
testcase_03 AC 37 ms
51,968 KB
testcase_04 AC 37 ms
51,712 KB
testcase_05 AC 37 ms
51,712 KB
testcase_06 AC 39 ms
51,840 KB
testcase_07 AC 37 ms
51,968 KB
testcase_08 AC 38 ms
51,712 KB
testcase_09 AC 39 ms
51,712 KB
testcase_10 AC 38 ms
51,712 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
a = sorted(input() for _ in range(n))
x = []
for s in a[::-1]:
    y = []
    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.append(t)
        if not f: break
    else: y.append(s); x = y[:]
print(n-len(x))
0