結果

問題 No.607 開通777年記念
ユーザー convexineqconvexineq
提出日時 2020-12-27 07:19:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 245 ms / 2,000 ms
コード長 273 bytes
コンパイル時間 2,001 ms
コンパイル使用メモリ 81,592 KB
実行使用メモリ 76,916 KB
最終ジャッジ日時 2023-10-26 02:53:37
合計ジャッジ時間 3,713 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,496 KB
testcase_01 AC 39 ms
53,496 KB
testcase_02 AC 39 ms
53,496 KB
testcase_03 AC 39 ms
53,496 KB
testcase_04 AC 39 ms
53,496 KB
testcase_05 AC 40 ms
53,496 KB
testcase_06 AC 39 ms
53,496 KB
testcase_07 AC 99 ms
75,884 KB
testcase_08 AC 39 ms
53,500 KB
testcase_09 AC 49 ms
61,968 KB
testcase_10 AC 49 ms
61,968 KB
testcase_11 AC 245 ms
76,916 KB
testcase_12 AC 232 ms
76,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
r = [0]*n
ok = 0
for _ in range(m):
    *a, = map(int,input().split())
    d = {0}
    c = 0
    for i in range(n):
        r[i] += a[i]
        c += r[i]
        if c-777 in d:
            ok = 1
        d.add(c)
print("YES" if ok else "NO")
0