結果
| 問題 | No.607 開通777年記念 | 
| コンテスト | |
| ユーザー |  maspy | 
| 提出日時 | 2020-01-29 10:54:53 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 813 ms / 2,000 ms | 
| コード長 | 524 bytes | 
| コンパイル時間 | 98 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 111,080 KB | 
| 最終ジャッジ日時 | 2024-09-16 00:44:50 | 
| 合計ジャッジ時間 | 10,592 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge6 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 | 
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np
N,M = map(int,readline().split())
As = np.array(read().split(),np.int64).reshape(M,N)
np.cumsum(As, out=As, axis=0)
def find_777(A):
    Acum = np.zeros(len(A) + 1)
    Acum[1:] = np.cumsum(A)
    x = np.searchsorted(Acum, Acum+777, 'right')
    x -= np.searchsorted(Acum, Acum+777, 'left')
    return np.any(x)
answer = 'YES' if any(find_777(A) for A in As) else 'NO'
print(answer)
            
            
            
        