結果
| 問題 | No.2561 みんな大好きmod 998 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-12-02 15:06:39 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 366 bytes |
| 記録 | |
| コンパイル時間 | 208 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 132,480 KB |
| 最終ジャッジ日時 | 2026-04-13 19:19:12 |
| 合計ジャッジ時間 | 8,162 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 43 |
ソースコード
n,k = map(int,input().split())
a = list(map(int,input().split()))
ans = 0
for i in range(2**n):
now = []
cnt = 0
for j in range(n):
if (i>>j & 1 == 1):
cnt += 1
now.append(a[j])
if len(now) != k:
continue
total = sum(now)
if total%998244353 <= total%998:
ans += 1
ans %= 998
print(ans)