結果
問題 | No.607 開通777年記念 |
ユーザー |
![]() |
提出日時 | 2018-06-18 03:52:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 909 ms / 2,000 ms |
コード長 | 401 bytes |
コンパイル時間 | 84 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 15,616 KB |
最終ジャッジ日時 | 2024-06-30 16:47:07 |
合計ジャッジ時間 | 2,937 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
import sysN, M = map(int, input().split())a = [0] * Nfor l in sys.stdin.readlines():a = [n+m for n, m in zip(a, map(int, l.split()))]+[0]i, j, total = 0, 1, a[0]while j <= N:if total == 777:print("YES")exit()if total < 777:total += a[j]j += 1else:total -= a[i]i += 1print("NO")