結果
問題 |
No.11 カードマッチ
|
ユーザー |
![]() |
提出日時 | 2017-08-02 11:56:22 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 279 ms / 5,000 ms |
コード長 | 349 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 26,284 KB |
最終ジャッジ日時 | 2024-10-11 05:49:02 |
合計ジャッジ時間 | 3,126 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
W=int(input()) H=int(input()) N=int(input()) #print(N) S=[[int(i) for i in input ().split()] for i in range (N)] #print(S) T=[0]*W L=[0]*H for i in range (N): #print (S) T[S[i][0]-1]+=1 L[S[i][1]-1]+=1 C=0 Tw=0 for i in range(W): if T[i]>0: C+=H Tw+=1 for i in range(H): if L[i]>0: C+=W-Tw C-=N print(C)