結果
| 問題 | No.607 開通777年記念 |
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-01-29 10:54:53 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 675 ms / 2,000 ms |
| + 591µs | |
| コード長 | 524 bytes |
| 記録 | |
| コンパイル時間 | 288 ms |
| コンパイル使用メモリ | 21,152 KB |
| 実行使用メモリ | 101,696 KB |
| 最終ジャッジ日時 | 2026-08-28 08:54:16 |
| 合計ジャッジ時間 | 10,594 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)
maspy