結果
問題 |
No.607 開通777年記念
|
ユーザー |
|
提出日時 | 2018-02-03 22:33:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 478 bytes |
コンパイル時間 | 167 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 19,868 KB |
最終ジャッジ日時 | 2024-06-12 22:42:26 |
合計ジャッジ時間 | 4,023 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 3 WA * 1 TLE * 1 -- * 5 |
ソースコード
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')