結果

問題 No.607 開通777年記念
コンテスト
ユーザー Fukumoto
提出日時 2020-06-08 22:32:50
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 393 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 61 ms
コンパイル使用メモリ 14,976 KB
実行使用メモリ 33,892 KB
最終ジャッジ日時 2026-10-08 08:21:42
合計ジャッジ時間 6,692 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
input = sys.stdin.readline
from collections import *
import numpy as np

N, M = list(map(int, input().split()))
A = np.zeros(N, dtype=np.int)

for i in range(M):
    a = list(map(int, input().split()))
    A += a
    S = np.cumsum(A)
    c = Counter()
    c[777] = 1
    for s in S:
        if c[s]: 
            print('YES')
            sys.exit()
        c[777+s] += 1
print('NO')
0