結果

問題 No.607 開通777年記念
ユーザー Bioinfo_KBioinfo_K
提出日時 2017-12-07 21:11:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,479 ms / 2,000 ms
コード長 426 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 10,972 KB
実行使用メモリ 8,492 KB
最終ジャッジ日時 2023-08-19 12:20:31
合計ジャッジ時間 4,800 ms
ジャッジサーバーID
(参考情報)
judge14 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,144 KB
testcase_01 AC 16 ms
7,796 KB
testcase_02 AC 18 ms
8,108 KB
testcase_03 AC 18 ms
8,080 KB
testcase_04 AC 17 ms
7,764 KB
testcase_05 AC 17 ms
8,188 KB
testcase_06 AC 16 ms
8,076 KB
testcase_07 AC 703 ms
8,220 KB
testcase_08 AC 16 ms
7,796 KB
testcase_09 AC 31 ms
7,812 KB
testcase_10 AC 16 ms
8,212 KB
testcase_11 AC 1,340 ms
8,492 KB
testcase_12 AC 1,479 ms
8,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
def Is(): return [int(x) for x in sys.stdin.readline().split()]

n,m = Is()
a = [0]*n
for i in range(m):
    t = Is()
    for j in range(n):
        a[j] += t[j]
    l,r = 0,1
    for i in range(2*n):
        s = sum(a[l:r])
        if s == 777:
            print("YES")
            exit()
        elif s < 777:
            r += 1
        else:
            l += 1
        if r > n:
            continue
print("NO")
0