結果
問題 | No.11 カードマッチ |
ユーザー | nakamura sosuke |
提出日時 | 2019-07-16 18:22:26 |
言語 | Ruby (3.3.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 427 bytes |
コンパイル時間 | 197 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 603,904 KB |
最終ジャッジ日時 | 2024-05-08 07:54:14 |
合計ジャッジ時間 | 7,351 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 84 ms
17,664 KB |
testcase_01 | AC | 83 ms
12,160 KB |
testcase_02 | AC | 86 ms
12,160 KB |
testcase_03 | AC | 83 ms
12,160 KB |
testcase_04 | MLE | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
コンパイルメッセージ
Syntax OK
ソースコード
W = gets.to_i H = gets.to_i N = gets.to_i SK = N.times.map{ gets.split.map(&:to_i) } # cards: マークの数を配列長 cs = Array.new(W){ Array.new(H){ false } } SK.each do | s, k | # マークs 0.upto(H-1) do | i | cs[s-1][i] = true end # マークs以外 0.upto(W-1) do | j | cs[j][k-1] = true end end SK.each do | s, k | cs[s-1][k-1] = false end sum = 0 cs.each{ | c | sum += c.count(true) } p sum