結果

問題 No.2561 みんな大好きmod 998
ユーザー MasKoaTSMasKoaTS
提出日時 2024-01-03 13:37:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,773 ms / 4,000 ms
コード長 348 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 76,200 KB
最終ジャッジ日時 2024-01-03 13:37:43
合計ジャッジ時間 24,387 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 131 ms
75,684 KB
testcase_02 AC 37 ms
53,460 KB
testcase_03 AC 1,684 ms
75,684 KB
testcase_04 AC 1,773 ms
75,680 KB
testcase_05 AC 1,738 ms
75,552 KB
testcase_06 AC 1,721 ms
75,688 KB
testcase_07 AC 42 ms
58,824 KB
testcase_08 AC 37 ms
53,460 KB
testcase_09 AC 67 ms
75,700 KB
testcase_10 AC 37 ms
53,460 KB
testcase_11 AC 311 ms
75,680 KB
testcase_12 AC 38 ms
53,460 KB
testcase_13 AC 39 ms
53,460 KB
testcase_14 AC 41 ms
58,824 KB
testcase_15 AC 1,697 ms
76,200 KB
testcase_16 AC 42 ms
58,824 KB
testcase_17 AC 38 ms
53,460 KB
testcase_18 AC 48 ms
61,348 KB
testcase_19 AC 1,237 ms
76,072 KB
testcase_20 AC 57 ms
68,612 KB
testcase_21 AC 38 ms
53,460 KB
testcase_22 AC 38 ms
53,460 KB
testcase_23 AC 48 ms
61,348 KB
testcase_24 AC 37 ms
53,460 KB
testcase_25 AC 36 ms
53,460 KB
testcase_26 AC 391 ms
75,680 KB
testcase_27 AC 1,655 ms
75,688 KB
testcase_28 AC 546 ms
75,680 KB
testcase_29 AC 192 ms
75,680 KB
testcase_30 AC 454 ms
75,688 KB
testcase_31 AC 896 ms
75,688 KB
testcase_32 AC 256 ms
75,680 KB
testcase_33 AC 190 ms
75,680 KB
testcase_34 AC 1,711 ms
75,688 KB
testcase_35 AC 172 ms
75,680 KB
testcase_36 AC 180 ms
75,680 KB
testcase_37 AC 116 ms
75,680 KB
testcase_38 AC 312 ms
75,680 KB
testcase_39 AC 472 ms
75,688 KB
testcase_40 AC 445 ms
75,688 KB
testcase_41 AC 310 ms
75,680 KB
testcase_42 AC 551 ms
75,680 KB
testcase_43 AC 123 ms
75,680 KB
testcase_44 AC 244 ms
75,680 KB
testcase_45 AC 1,271 ms
75,688 KB
testcase_46 AC 211 ms
75,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import combinations
mod = 998
MOD = 998244353

n, m = map(int, input().split())
a = list(map(int, input().split()))

b = [x % mod for x in a]
c = [x % MOD for x in a]
ans = 0
for tup in combinations([*range(n)], m):
	s1 = sum([b[k] for k in tup]) % mod
	s2 = sum([c[k] for k in tup]) % MOD
	if(s1 >= s2):
		ans += 1
print(ans % mod)
0