結果
| 問題 | No.1066 #いろいろな色 / Red and Blue and more various colors (Easy) |
| コンテスト | |
| ユーザー |
c-yan
|
| 提出日時 | 2020-05-29 22:14:16 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 356 bytes |
| 記録 | |
| コンパイル時間 | 158 ms |
| コンパイル使用メモリ | 85,104 KB |
| 実行使用メモリ | 136,084 KB |
| 最終ジャッジ日時 | 2026-05-06 07:09:02 |
| 合計ジャッジ時間 | 4,339 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 MLE * 1 |
| other | AC * 5 TLE * 1 -- * 18 |
ソースコード
from itertools import combinations
N, Q = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
for b in B:
result = 0
for c in combinations(A, N - b):
t = 1
for i in c:
t *= i - 1
t %= 998244353
result += t
result %= 998244353
print(result)
c-yan