結果

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

ソースコード

diff #

import numpy as np

def densya():
	N, M = map(int, input().split())
	n = np.zeros(N)

	ans = False

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

		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