結果

問題 No.2537 多重含意
ユーザー mattu34mattu34
提出日時 2023-11-19 11:10:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 708 bytes
コンパイル時間 199 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 90,236 KB
最終ジャッジ日時 2023-11-19 11:10:57
合計ジャッジ時間 4,527 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
55,732 KB
testcase_01 AC 46 ms
55,732 KB
testcase_02 AC 46 ms
55,732 KB
testcase_03 AC 46 ms
55,732 KB
testcase_04 AC 46 ms
55,732 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 46 ms
55,732 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 46 ms
55,732 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 45 ms
55,732 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 #

from collections import *
import sys
import heapq
import bisect
import itertools
from functools import lru_cache
import math


dxdy1 = ((0, 1), (0, -1), (1, 0), (-1, 0))
dxdy2 = ((0, 1), (0, -1), (1, 0), (-1, 0), (1, 1), (-1, -1), (1, -1), (-1, 1))
dxdy3 = ((0, 1), (1, 0))
dxdy4 = ((1, 1), (1, -1), (-1, 1), (-1, -1))
INF = float("inf")
MOD = 998244353
mod = 998244353
MOD2 = 10**9 + 7
mod2 = 10**9 + 7
# memo : len([a,b,...,z])==26

input = lambda: sys.stdin.readline().rstrip()
mi = lambda: map(int, input().split())
li = lambda: list(mi())

N, B = mi()
A = li()
for r in range(1, N + 1):
    ans = (pow(2, r, B) - 1) * pow(2, N - r, B)
    if A[0] == A[r-1] and r!=1:
        ans += 1
    print(ans % B)
0