結果

問題 No.607 開通777年記念
ユーザー asaka189asaka189
提出日時 2018-02-03 22:33:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 478 bytes
コンパイル時間 380 ms
コンパイル使用メモリ 10,856 KB
実行使用メモリ 14,964 KB
最終ジャッジ日時 2023-09-03 17:05:49
合計ジャッジ時間 4,385 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,308 KB
testcase_01 WA -
testcase_02 AC 16 ms
7,852 KB
testcase_03 AC 16 ms
7,800 KB
testcase_04 WA -
testcase_05 AC 16 ms
7,784 KB
testcase_06 AC 16 ms
7,748 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
a = []
for i in range(m):
	temp = list(map(int,input().split()))
	a.append(temp)
train = [0 for i in range(n)]
check = False

for i in range(m):
	for k in range(n):
		train[k] += a[i][k]
	if sum(train) == 777:
		check = True
	e = 0
	while e<n:
		temptotal = 0
		f = 0
		while temptotal < 777 and (e+f)!= n:
			temptotal += train[e+f]
			f += 1
		if temptotal == 777:
			check = True
			break
		e += 1	
	
if check:
	print('YES')
else:
	print('No')
0