結果

問題 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
コンパイル時間 87 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-05-01 01:57:38
合計ジャッジ時間 3,605 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,880 KB
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 30 ms
10,752 KB
testcase_03 AC 30 ms
10,880 KB
testcase_04 AC 30 ms
10,880 KB
testcase_05 WA -
testcase_06 AC 29 ms
10,752 KB
testcase_07 AC 65 ms
10,880 KB
testcase_08 AC 29 ms
10,752 KB
testcase_09 AC 39 ms
10,880 KB
testcase_10 AC 32 ms
10,752 KB
testcase_11 AC 897 ms
11,136 KB
testcase_12 AC 1,031 ms
11,136 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