結果

問題 No.607 開通777年記念
ユーザー syunsukesyunsuke
提出日時 2018-07-29 17:30:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 590 bytes
コンパイル時間 537 ms
コンパイル使用メモリ 10,760 KB
実行使用メモリ 8,292 KB
最終ジャッジ日時 2023-09-25 07:03:55
合計ジャッジ時間 4,575 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,088 KB
testcase_01 AC 16 ms
7,956 KB
testcase_02 AC 15 ms
8,292 KB
testcase_03 AC 15 ms
8,144 KB
testcase_04 AC 15 ms
7,764 KB
testcase_05 WA -
testcase_06 AC 16 ms
8,076 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

NM=input()
NM=NM.rstrip().split(" ")
N=int(NM[0])
M=int(NM[1])

list1=[0 for i in range(N)]

for j in range(M):
    L=input()
    L=L.rstrip().split(" ")
    for k in range(N):
        list1[k]+=int(L[k])
        ans=0
        num=0
        NUM=0
        for l in range(1000000000000):
            if ans==777:
                print("YES")
                exit()
            elif num==N:
                break
            elif ans<777:
                ans=ans+list1[num]
                num+=1
            elif ans>777:
                ans=ans-list1[NUM]
                NUM-=1
print("NO")
0