結果

問題 No.607 開通777年記念
ユーザー Kozuma
提出日時 2018-01-18 23:24:48
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,888 KB
最終ジャッジ日時 2024-12-24 07:57:02
合計ジャッジ時間 5,221 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 8 WA * 1 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

def densya():
	N, M = map(int, input().split())
	n = [0 for i in range(M)]

	ans = False

	for i in range(M):
		add = list(map(int, input().split()))
		n = [n[i] + add[i] for i in range(M)]

		for j in range(M):
			sum = 0
			count = 0
			while sum < 777:
				if j + count >= M:
					break
				sum += n[j + count]
				count += 1

				if sum == 777:
					ans = True

	return ans

if densya():
	print("YES")
else:
	print("NO")

0