結果

問題 No.60 魔法少女
ユーザー gigurururugigurururu
提出日時 2014-11-09 23:36:16
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 232 bytes
コンパイル時間 415 ms
コンパイル使用メモリ 11,256 KB
実行使用メモリ 38,716 KB
最終ジャッジ日時 2023-08-30 02:50:29
合計ジャッジ時間 8,558 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
37,144 KB
testcase_01 AC 100 ms
32,960 KB
testcase_02 AC 99 ms
32,932 KB
testcase_03 AC 136 ms
32,820 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def g;gets.split.map(&:to_i);end
n,k=g
e=(1..n).map{g}
m=(0..1500).map{[0]*1501}
k.times{
  x,y,w,h,d=g
  x+=500;y+=500
  (y..y+h).each{|i|(x..x+w).each{|j|m[i][j]+=d}}
}
p e.map{|x,y,h|[h-m[y+500][x+500],0].max}.inject(:+)
0