結果

問題 No.607 開通777年記念
ユーザー 👑 H20H20
提出日時 2020-12-24 10:08:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 145 ms / 2,000 ms
コード長 381 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 81,736 KB
実行使用メモリ 76,368 KB
最終ジャッジ日時 2023-10-21 15:36:28
合計ジャッジ時間 2,193 ms
ジャッジサーバーID
(参考情報)
judge14 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,528 KB
testcase_01 AC 39 ms
53,528 KB
testcase_02 AC 38 ms
53,528 KB
testcase_03 AC 39 ms
53,528 KB
testcase_04 AC 40 ms
53,528 KB
testcase_05 AC 39 ms
53,528 KB
testcase_06 AC 39 ms
53,528 KB
testcase_07 AC 60 ms
73,272 KB
testcase_08 AC 39 ms
53,532 KB
testcase_09 AC 57 ms
66,800 KB
testcase_10 AC 39 ms
53,532 KB
testcase_11 AC 143 ms
76,348 KB
testcase_12 AC 145 ms
76,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int,input().split())
T = [0]*N
for i in range(M):
    L = list(map(int,input().split()))
    for i in range(N):
        T[i] += L[i]
    l,r = 0,0
    syaku = 0
    while l<N:
        while r<N and syaku<777:
            syaku += T[r]
            r+=1
        if syaku==777:
            print('YES')
            exit()
        syaku -= T[l]
        l+=1

    
print('NO')
0