結果

問題 No.607 開通777年記念
ユーザー 💕💖💞💕💖💞
提出日時 2018-06-18 03:18:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 512 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 87,000 KB
実行使用メモリ 71,992 KB
最終ジャッジ日時 2023-09-13 06:37:49
合計ジャッジ時間 6,077 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
71,724 KB
testcase_01 AC 84 ms
71,672 KB
testcase_02 AC 83 ms
71,796 KB
testcase_03 WA -
testcase_04 AC 80 ms
71,780 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split(' '))

xss = []
for i in range(M):
  xs = list(map(int, input().split(' ')) )
  xss.append( xs )
import copy
sums = set()
xsn = []
state = xss[0]
xsn.append( copy.copy(state) )
for xs in xss[1:]:
  state = [s+x for s, x in zip(state, xs) ]
  for s in range(0, N):
    for e in range(s, N+1):
      sum_ = sum( state[s:e] )
      sums.add( sum_ )
      #print(s, e, sum_)
  xsn.append( copy.copy(state) )  
#print(xsn)
#print(sums)
if 777 in sums:
  print('YES')
else:
  print('NO')
0