結果
| 問題 |
No.2178 Payable Magic Items
|
| コンテスト | |
| ユーザー |
MasKoaTS
|
| 提出日時 | 2022-08-05 15:41:44 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 509 bytes |
| コンパイル時間 | 262 ms |
| コンパイル使用メモリ | 81,976 KB |
| 実行使用メモリ | 99,700 KB |
| 最終ジャッジ日時 | 2024-12-14 17:30:39 |
| 合計ジャッジ時間 | 3,835 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 3 |
| other | AC * 1 RE * 22 |
ソースコード
import sys input = sys.stdin.readline N, K = map(int, input().split()) A = [list(map(int, input().split())) for _ in [0] * N] if(K == 1): print(N - 1) exit(0) local_max = [False] * N for i in range(K-1): for j in range(i+1, K): lis = sorted([(A[k][i], A[k][j], k) for k in range(N)], reverse = True) ma = lis[0][1] local_max[lis[0][2]] = (lis[0][0] > lis[1][0] or lis[0][1] > lis[1][1]) for a, b, c in lis: if(b <= ma): continue local_max[c] = True ma = b print(N - sum(local_max))
MasKoaTS