結果
問題 | No.11 カードマッチ |
ユーザー | cherrypi59 |
提出日時 | 2018-09-30 17:41:45 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 132 ms / 5,000 ms |
コード長 | 387 bytes |
コンパイル時間 | 86 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 26,368 KB |
最終ジャッジ日時 | 2024-10-12 09:14:40 |
合計ジャッジ時間 | 2,036 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
def main():w, h, n = [int(input()) for i in range(3)]soot, no = [0] * w, [0] * hfor i in range(n):s, k = map(int, input().split())soot[s-1] = no[k-1] = 1ans, used_no = 0, sum(no)for i in range(w):if soot[i]:ans += helse:ans += used_noprint(ans-n)if __name__ == '__main__':main()