結果

問題 No.2537 多重含意
ユーザー ニックネームニックネーム
提出日時 2023-11-10 23:40:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 402 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 21,740 KB
最終ジャッジ日時 2023-11-10 23:40:42
合計ジャッジ時間 3,894 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
9,984 KB
testcase_01 AC 28 ms
9,984 KB
testcase_02 AC 29 ms
9,984 KB
testcase_03 AC 28 ms
9,984 KB
testcase_04 AC 27 ms
9,984 KB
testcase_05 AC 28 ms
9,984 KB
testcase_06 AC 27 ms
9,984 KB
testcase_07 AC 27 ms
9,984 KB
testcase_08 AC 31 ms
9,984 KB
testcase_09 AC 28 ms
9,984 KB
testcase_10 AC 28 ms
9,984 KB
testcase_11 AC 27 ms
9,984 KB
testcase_12 AC 27 ms
9,984 KB
testcase_13 AC 28 ms
9,984 KB
testcase_14 AC 27 ms
9,984 KB
testcase_15 AC 28 ms
9,984 KB
testcase_16 AC 29 ms
10,112 KB
testcase_17 AC 59 ms
11,776 KB
testcase_18 AC 402 ms
21,616 KB
testcase_19 AC 298 ms
21,740 KB
testcase_20 AC 300 ms
21,616 KB
testcase_21 AC 309 ms
21,616 KB
testcase_22 AC 326 ms
21,616 KB
testcase_23 AC 303 ms
21,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,b = map(int,input().split())
a = list(map(int,input().split()))
s = set(); c = n
for v in a:
    if v in s: print(pow(2,n,b))
    else: c -= 1; s.add(v); print((pow(2,n,b)-pow(2,c,b))%b)
0