結果
| 問題 | No.250 atetubouのzetubou |
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-02-02 17:41:19 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 596 ms / 5,000 ms |
| コード長 | 527 bytes |
| 記録 | |
| コンパイル時間 | 70 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 119,364 KB |
| 最終ジャッジ日時 | 2024-09-18 21:18:24 |
| 合計ジャッジ時間 | 14,590 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np
Q = int(readline())
DXT = np.fromstring(read(), np.int64, sep=' ')
D = DXT[::3]
X = DXT[1::3]
T = DXT[2::3]
U = 3100
INF = 10 ** 16
comb = np.zeros((U,U),np.int64)
comb[0,0] = 1
for n in range(1,U):
comb[n,:n] += comb[n-1,:n]
comb[n,1:n+1] += comb[n-1,:n]
np.minimum(INF, comb[n], out=comb[n])
answer = np.where(comb[X+D-1,D-1] <= T, 'AC', 'ZETUBOU')
print('\n'.join(answer))
maspy