結果
問題 |
No.607 開通777年記念
|
ユーザー |
![]() |
提出日時 | 2017-12-15 20:50:42 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 495 bytes |
コンパイル時間 | 301 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 21,504 KB |
最終ジャッジ日時 | 2024-12-14 15:59:53 |
合計ジャッジ時間 | 10,757 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 TLE * 3 |
ソースコード
import sys readline = sys.stdin.readline N, M = map(int, readline().split()) sums = [0 for _ in range(N)] nums = [0 for _ in range(N + 1)] done = False for _ in range(M): num = 0 nums[0] = 0 for i, n in enumerate(map(int, readline().split())): sums[i] += n nums[i + 1] = sums[i] + num num += sums[i] for j in range(0, i + 1): if nums[i + 1] - nums[j] == 777: done = True if done: print('YES') else: print('NO')