結果
問題 | No.11 カードマッチ |
ユーザー | nohakai3 |
提出日時 | 2022-10-19 14:42:18 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 287 bytes |
コンパイル時間 | 321 ms |
コンパイル使用メモリ | 86,980 KB |
実行使用メモリ | 84,012 KB |
最終ジャッジ日時 | 2023-09-12 04:28:43 |
合計ジャッジ時間 | 3,279 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 77 ms
71,208 KB |
testcase_01 | AC | 78 ms
71,276 KB |
testcase_02 | AC | 79 ms
71,268 KB |
testcase_03 | AC | 79 ms
70,924 KB |
testcase_04 | WA | - |
testcase_05 | AC | 77 ms
71,036 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
ソースコード
w=int(input()) h=int(input()) n=int(input()) p=[] for i in range(n): a,b=map(int,input().split()) p.append([a,b]) cnt=[0]*w for x in p: cnt[x[0]-1]+=1 y=max(cnt) ans=0 for i in range(w): if cnt[i]>0: ans+=(h-cnt[i]) elif cnt[i]==0: ans+=y print(ans)