結果
| 問題 | No.1066 #いろいろな色 / Red and Blue and more various colors (Easy) |
| コンテスト | |
| ユーザー |
Kiri8128
|
| 提出日時 | 2020-05-30 00:30:13 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 306 bytes |
| 記録 | |
| コンパイル時間 | 356 ms |
| コンパイル使用メモリ | 84,860 KB |
| 実行使用メモリ | 1,338,384 KB |
| 最終ジャッジ日時 | 2026-05-06 13:23:16 |
| 合計ジャッジ時間 | 3,503 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 5 MLE * 2 -- * 17 |
ソースコード
N, Q = map(int, input().split())
A = [int(a) - 1 for a in input().split()]
X = [[0] * (i+1) for i in range(N+1)]
X[0][0] = 1
for i in range(N):
for j in range(i+1):
X[i+1][j] += X[i][j] * A[i]
X[i+1][j+1] += X[i][j]
B = [int(a) for a in input().split()]
for a in B:
print(X[-1][a])
Kiri8128