結果

問題 No.1307 Rotate and Accumulate
ユーザー trineutrontrineutron
提出日時 2020-12-04 00:37:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 402 ms / 5,000 ms
コード長 228 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 10,708 KB
実行使用メモリ 48,336 KB
最終ジャッジ日時 2023-10-12 11:22:28
合計ジャッジ時間 9,249 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
29,428 KB
testcase_01 AC 129 ms
29,444 KB
testcase_02 AC 130 ms
29,432 KB
testcase_03 AC 130 ms
29,440 KB
testcase_04 AC 128 ms
29,572 KB
testcase_05 AC 129 ms
29,584 KB
testcase_06 AC 129 ms
29,448 KB
testcase_07 AC 129 ms
29,536 KB
testcase_08 AC 299 ms
47,452 KB
testcase_09 AC 316 ms
48,336 KB
testcase_10 AC 304 ms
42,404 KB
testcase_11 AC 243 ms
37,680 KB
testcase_12 AC 325 ms
43,408 KB
testcase_13 AC 193 ms
36,428 KB
testcase_14 AC 229 ms
37,164 KB
testcase_15 AC 400 ms
45,812 KB
testcase_16 AC 401 ms
45,860 KB
testcase_17 AC 398 ms
45,952 KB
testcase_18 AC 369 ms
41,364 KB
testcase_19 AC 402 ms
46,692 KB
testcase_20 AC 390 ms
45,976 KB
testcase_21 AC 131 ms
29,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as p
n,q=map(int,input().split())
a=p.array(list(map(int,input().split())))
b=p.zeros(n)
for i in map(int,input().split()):b[-i%n]+=1
print(*p.array(p.round(p.real(p.fft.ifft(p.fft.fft(a)*p.fft.fft(b)))),dtype=int))
0