結果

問題 No.2537 多重含意
ユーザー ニックネームニックネーム
提出日時 2023-11-10 23:21:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 227 bytes
コンパイル時間 255 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 21,564 KB
最終ジャッジ日時 2023-11-10 23:21:47
合計ジャッジ時間 2,954 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
9,984 KB
testcase_01 AC 28 ms
9,984 KB
testcase_02 AC 28 ms
9,984 KB
testcase_03 AC 29 ms
9,984 KB
testcase_04 AC 28 ms
9,984 KB
testcase_05 AC 30 ms
9,984 KB
testcase_06 AC 28 ms
9,984 KB
testcase_07 AC 29 ms
9,984 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 28 ms
9,984 KB
testcase_11 AC 29 ms
9,984 KB
testcase_12 AC 28 ms
9,984 KB
testcase_13 AC 28 ms
9,984 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,b = map(int,input().split())
a = list(map(int,input().split()))
s = set(); c = n; r = [1]*(n+1)
for i in range(n): r[i+1] = r[i]*2%b
for v in a:
    if v in s: c = -1
    else: c -= 1; s.add(v)
    print((r[n]-(c>=0)*r[c])%b)
0