結果

問題 No.60 魔法少女
ユーザー roiti46roiti46
提出日時 2015-02-18 02:52:45
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 527 bytes
コンパイル時間 41 ms
コンパイル使用メモリ 6,732 KB
実行使用メモリ 24,080 KB
最終ジャッジ日時 2023-09-06 01:55:45
合計ジャッジ時間 5,852 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 409 ms
21,816 KB
testcase_01 AC 411 ms
21,916 KB
testcase_02 AC 411 ms
21,732 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,raw_input().split())
M = [[0]*1001 for i in xrange(1001)]
for loop in xrange(N):
    x,y,hp = map(int,raw_input().split())
    x += 500; y += 500
    M[y][x] = hp

A = [[0]*1002 for i in xrange(1002)]
for loop in xrange(K):
    ax,ay,w,h,d = map(int,raw_input().split())
    ax += 500; ay += 500
    for y in xrange(ay,ay+h+1):
        A[y][ax] += d
        A[y][ax+w+2] -= d
ans = 0
for y in xrange(1001):
    for x in xrange(1,1001):
        A[y][x] += A[y][x-1]
        if M[y][x] > A[y][x]: ans += 1
print ans
0