結果
| 問題 | No.607 開通777年記念 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-09 14:43:46 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 97 ms / 2,000 ms |
| コード長 | 395 bytes |
| 記録 | |
| コンパイル時間 | 350 ms |
| コンパイル使用メモリ | 85,764 KB |
| 実行使用メモリ | 81,920 KB |
| 最終ジャッジ日時 | 2026-04-09 12:54:11 |
| 合計ジャッジ時間 | 2,014 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
N, M = map(int, input().split())
count = [0] * N
from collections import deque
for _ in range(M):
A = list(map(int, input().split()))
for i in range(N):
count[i] += A[i]
q = deque()
jokyaku = 0
for c in count:
q.append(c)
jokyaku += c
while q and jokyaku > 777:
t = q.popleft()
jokyaku -= t
if jokyaku == 777:
print("YES")
exit()
print("NO")