結果

問題 No.607 開通777年記念
ユーザー MaboyMaboy
提出日時 2018-03-07 03:58:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 337 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 11,804 KB
実行使用メモリ 18,572 KB
最終ジャッジ日時 2023-10-23 20:42:34
合計ジャッジ時間 4,751 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
14,436 KB
testcase_01 AC 27 ms
10,068 KB
testcase_02 AC 27 ms
10,068 KB
testcase_03 AC 26 ms
10,068 KB
testcase_04 AC 27 ms
10,068 KB
testcase_05 AC 27 ms
10,068 KB
testcase_06 AC 27 ms
10,068 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
a=[list(map(int,input().split())) for i in'.'*m]

b=[[0]*n for i in'.'*m]
b[0]=[x for x in a[0]]
for i in range(1,m):
  for j in range(n):
    b[i][j]=b[i-1][j]+a[i][j]
v='NO'
for l in b:
  for i in range(n):
    for j in range(len(l)-i):
      if sum(l[i:1+i+j])==777:
        v='YES'
        break
print(v)
0