結果
問題 | No.678 2Dシューティングゲームの必殺ビーム |
ユーザー | siman |
提出日時 | 2022-10-24 14:27:50 |
言語 | Ruby (3.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 350 bytes |
コンパイル時間 | 83 ms |
コンパイル使用メモリ | 11,276 KB |
実行使用メモリ | 15,392 KB |
最終ジャッジ日時 | 2023-09-15 14:07:07 |
合計ジャッジ時間 | 2,357 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 90 ms
15,084 KB |
testcase_01 | AC | 79 ms
15,304 KB |
testcase_02 | WA | - |
testcase_03 | AC | 77 ms
15,024 KB |
testcase_04 | AC | 78 ms
15,024 KB |
testcase_05 | WA | - |
testcase_06 | AC | 79 ms
15,272 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 80 ms
15,076 KB |
testcase_15 | WA | - |
testcase_16 | AC | 82 ms
15,132 KB |
testcase_17 | WA | - |
コンパイルメッセージ
Syntax OK
ソースコード
N, LB, RB = gets.split.map(&:to_i) P = N.times.map { |i| [i] + gets.split.map(&:to_i) } P.sort_by! { |_, _, yu, _, _| -yu } ans = Array.new(N, false) covered = Hash.new(false) P.each do |i, xl, yu, xr, yd| hit = false xl.upto(xr) do |x| hit |= !covered[x] covered[x] = true end ans[i] = hit end puts ans.map { |f| f ? 1 : 0 }