結果
| 問題 | No.607 開通777年記念 |
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2018-06-18 03:18:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 512 bytes |
| 記録 | |
| コンパイル時間 | 190 ms |
| コンパイル使用メモリ | 82,416 KB |
| 実行使用メモリ | 86,148 KB |
| 最終ジャッジ日時 | 2024-06-30 16:45:27 |
| 合計ジャッジ時間 | 4,655 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 1 WA * 3 TLE * 1 -- * 5 |
ソースコード
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')
💕💖💞