結果

問題 No.1307 Rotate and Accumulate
ユーザー Kiri8128Kiri8128
提出日時 2020-12-04 02:11:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 351 bytes
コンパイル時間 2,054 ms
コンパイル使用メモリ 86,548 KB
実行使用メモリ 130,300 KB
最終ジャッジ日時 2023-10-12 13:58:35
合計ジャッジ時間 24,979 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
70,920 KB
testcase_01 AC 71 ms
70,816 KB
testcase_02 AC 72 ms
70,960 KB
testcase_03 AC 72 ms
71,016 KB
testcase_04 AC 73 ms
70,804 KB
testcase_05 AC 72 ms
70,756 KB
testcase_06 AC 72 ms
71,140 KB
testcase_07 AC 73 ms
70,568 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 73 ms
71,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

K = 20
f = lambda L: int("".join([bin(a + (1 << K))[3:] for a in L]), 2)
N, Q = map(int, input().split())
A = [int(a) for a in input().split()]
R = [int(a) for a in input().split()]
C = [0] * N
for r in R:
    C[r] += 1
S = bin(f(A) * f(C[::-1]) % ((1 << K * N) - 1) + (1 << K * N))[3:]
print(" ".join([str(int(S[i*K:(i+1)*K], 2)) for i in range(N)]))
0