結果
問題 |
No.11 カードマッチ
|
ユーザー |
|
提出日時 | 2021-02-03 09:44:52 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 70 ms / 5,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 243 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 72,704 KB |
最終ジャッジ日時 | 2024-06-30 00:13:05 |
合計ジャッジ時間 | 2,065 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
W = int(input()) H = int(input()) N = int(input()) lssk = [list(map(int,input().split())) for i in range(N)] lsW = [False]*(W+1) lsH = [False]*(H+1) for i in range(N): w,h = lssk[i][0],lssk[i][1] lsW[w] = True lsH[h] = True print(lsW.count(True)*H+lsH.count(True)*W-lsW.count(True)*lsH.count(True)-N)