結果
問題 |
No.11 カードマッチ
|
ユーザー |
|
提出日時 | 2017-02-12 19:14:35 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 93 ms / 5,000 ms |
コード長 | 288 bytes |
コンパイル時間 | 199 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-12-29 16:55:28 |
合計ジャッジ時間 | 2,813 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
コンパイルメッセージ
Syntax OK
ソースコード
W = gets.to_i H = gets.to_i N = gets.to_i w_list = [] h_list = [] N.times do s,k = gets.chomp.split.map(&:to_i) w_list << s h_list << k end w_not_used_count = W - w_list.uniq.count h_not_used_count = H - h_list.uniq.count puts (W * H) - (w_not_used_count * h_not_used_count) - N