結果

問題 No.2509 Beam Shateki
ユーザー ニックネームニックネーム
提出日時 2023-10-20 23:07:40
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 597 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 81,768 KB
実行使用メモリ 79,508 KB
最終ジャッジ日時 2023-10-20 23:08:56
合計ジャッジ時間 72,325 ms
ジャッジサーバーID
(参考情報)
judge12 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
64,576 KB
testcase_01 AC 49 ms
61,720 KB
testcase_02 AC 39 ms
53,524 KB
testcase_03 AC 368 ms
76,980 KB
testcase_04 AC 362 ms
76,972 KB
testcase_05 AC 394 ms
76,972 KB
testcase_06 AC 363 ms
76,972 KB
testcase_07 AC 362 ms
76,976 KB
testcase_08 AC 368 ms
76,972 KB
testcase_09 AC 364 ms
76,972 KB
testcase_10 AC 370 ms
76,972 KB
testcase_11 AC 360 ms
76,972 KB
testcase_12 AC 361 ms
76,976 KB
testcase_13 TLE -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 TLE -
testcase_22 TLE -
testcase_23 TLE -
testcase_24 TLE -
testcase_25 TLE -
testcase_26 TLE -
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
testcase_30 TLE -
testcase_31 TLE -
testcase_32 TLE -
testcase_33 AC 121 ms
76,376 KB
testcase_34 AC 572 ms
77,460 KB
testcase_35 AC 1,213 ms
77,856 KB
testcase_36 AC 283 ms
76,716 KB
testcase_37 AC 102 ms
76,044 KB
testcase_38 AC 304 ms
76,812 KB
testcase_39 AC 276 ms
76,860 KB
testcase_40 AC 702 ms
77,540 KB
testcase_41 AC 80 ms
75,968 KB
testcase_42 AC 354 ms
76,832 KB
testcase_43 AC 1,560 ms
78,140 KB
testcase_44 AC 1,872 ms
78,464 KB
testcase_45 AC 266 ms
76,836 KB
testcase_46 AC 435 ms
76,812 KB
testcase_47 AC 1,819 ms
78,492 KB
testcase_48 AC 509 ms
77,384 KB
testcase_49 AC 825 ms
77,428 KB
testcase_50 AC 975 ms
77,556 KB
testcase_51 AC 113 ms
76,336 KB
testcase_52 AC 639 ms
77,516 KB
testcase_53 AC 55 ms
66,632 KB
testcase_54 AC 55 ms
66,632 KB
testcase_55 AC 55 ms
66,632 KB
testcase_56 AC 55 ms
66,632 KB
testcase_57 AC 55 ms
66,632 KB
testcase_58 WA -
testcase_59 AC 55 ms
66,632 KB
testcase_60 WA -
testcase_61 AC 55 ms
66,632 KB
testcase_62 AC 56 ms
66,632 KB
testcase_63 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import product
h,w = map(int,input().split())
a = [[0]*(w+3)]+[[0]+list(map(int,input().split()))+[0,0] for _ in range(h)]+[[0]*(w+3),[0]*(w+3)]
s = []; ans = 0
for x in range(h+2):
    for dx in range(-1,2):
        px = x+dx; py = 1; t = set()
        while a[px][py]: t.add((px,py)); px += dx; py += 1
        s.append(t)
for y in range(w+2):
    for dy in range(-1,2):
        px = 1; py = y+dy; t = set()
        while a[px][py]: t.add((px,py)); px += 1; py += dy
        s.append(t)
for si in s:
    for sj in s:
        ans = max(ans,sum(a[x][y] for x,y in si|sj))
print(ans)
0