結果

問題 No.60 魔法少女
ユーザー letrangerjpletrangerjp
提出日時 2017-06-18 01:25:10
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 221 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 214,036 KB
最終ジャッジ日時 2024-04-08 21:04:23
合計ジャッジ時間 11,008 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 716 ms
76,800 KB
testcase_01 AC 717 ms
76,800 KB
testcase_02 AC 723 ms
76,800 KB
testcase_03 AC 716 ms
76,800 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 #

A=$<.map{|s|s.split.map &:to_i}
m=(1..M=2e3).map{[0]*M}
A.pop(A.shift[1]).map{|x,y,w,h,d|(x..x+w).map{|i|m[i][y]+=d;m[i][y+h+1]-=d}}
(R=-500..1e3).map{|x|R.map{|y|m[x][y+1]+=m[x][y]}}
p A.map{|x,y,h|[0,h-m[x][y]].max}.sum
0