結果
問題 | No.1066 #いろいろな色 / Red and Blue and more various colors (Easy) |
ユーザー |
![]() |
提出日時 | 2020-05-30 00:30:13 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 306 bytes |
コンパイル時間 | 383 ms |
コンパイル使用メモリ | 82,180 KB |
実行使用メモリ | 902,432 KB |
最終ジャッジ日時 | 2024-11-06 09:54:47 |
合計ジャッジ時間 | 3,735 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 MLE * 1 |
other | WA * 5 MLE * 1 -- * 18 |
ソースコード
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] = 1for 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])