結果
| 問題 | No.11 カードマッチ | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-02-12 19:10:29 | 
| 言語 | Ruby (3.4.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 115 ms / 5,000 ms | 
| コード長 | 336 bytes | 
| コンパイル時間 | 234 ms | 
| コンパイル使用メモリ | 7,296 KB | 
| 実行使用メモリ | 27,776 KB | 
| 最終ジャッジ日時 | 2024-12-29 16:55:20 | 
| 合計ジャッジ時間 | 2,892 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 19 | 
コンパイルメッセージ
Syntax OK
ソースコード
W = gets.to_i H = gets.to_i N = gets.to_i w_list = Array.new(W, false) h_list = Array.new(H, false) N.times do s,k = gets.chomp.split.map(&:to_i) w_list[s - 1] = true h_list[k - 1] = true end w_not_used_count = w_list.count(false) h_not_used_count = h_list.count(false) puts (W * H) - (w_not_used_count * h_not_used_count) - N
