結果

問題 No.607 開通777年記念
ユーザー shoooooshooooo
提出日時 2019-11-30 13:18:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 10,680 KB
実行使用メモリ 8,580 KB
最終ジャッジ日時 2023-08-13 08:17:25
合計ジャッジ時間 3,743 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,048 KB
testcase_01 AC 16 ms
7,856 KB
testcase_02 AC 16 ms
8,048 KB
testcase_03 AC 16 ms
8,172 KB
testcase_04 AC 17 ms
7,808 KB
testcase_05 WA -
testcase_06 AC 16 ms
8,192 KB
testcase_07 AC 56 ms
8,316 KB
testcase_08 AC 16 ms
7,956 KB
testcase_09 AC 25 ms
7,876 KB
testcase_10 AC 16 ms
8,220 KB
testcase_11 AC 849 ms
8,564 KB
testcase_12 AC 881 ms
8,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
N,M=map(int,input().split())
table=[0]*N
for k in range(M):
  V=0
  a=list(map(int,input().split()))
  j=0
  for i in range(N):
    table[i]+=a[i]
    V+=table[i]
    if V<777:
      pass
    elif V==777:
      print('YES')
      sys.exit()
    else:
      while j<i and V>777:
        V-=table[j]
        j+=1     
print('NO')
0