結果
| 問題 | 
                            No.607 開通777年記念
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-01-18 23:18:36 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 420 bytes | 
| コンパイル時間 | 245 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 88,512 KB | 
| 最終ジャッジ日時 | 2024-12-24 07:54:10 | 
| 合計ジャッジ時間 | 13,533 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | AC * 8 WA * 1 TLE * 1 | 
ソースコード
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")