結果
| 問題 | No.607 開通777年記念 |
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2018-06-18 03:18:25 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 512 bytes |
| 記録 | |
| コンパイル時間 | 245 ms |
| コンパイル使用メモリ | 85,092 KB |
| 実行使用メモリ | 351,324 KB |
| 最終ジャッジ日時 | 2026-03-20 22:15:54 |
| 合計ジャッジ時間 | 10,908 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 WA * 3 TLE * 3 |
ソースコード
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')
💕💖💞