結果
問題 | No.607 開通777年記念 |
ユーザー |
|
提出日時 | 2022-01-21 14:00:32 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 603 bytes |
コンパイル時間 | 88 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-11-25 08:57:59 |
合計ジャッジ時間 | 2,818 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 3 |
ソースコード
from collections import dequen,m=map(int,input().split())for i in range(m):if i==0:l=list(map(int,input().split()))else:tmp=list(map(int,input().split()))for i in range(n):l[i]+=tmp[i]if tmp[i]==777:print('YES')exit()q=deque()now=0for i in range(n):now+=l[i]q.append(l[i])while now>777 and q:out=q.popleft()now-=outif now==777:print('YES')exit()print('NO')