結果

問題 No.1307 Rotate and Accumulate
ユーザー NyaanNyaanNyaanNyaan
提出日時 2020-12-04 01:32:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 384 ms / 5,000 ms
コード長 166 bytes
コンパイル時間 580 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 50,524 KB
最終ジャッジ日時 2023-10-12 12:47:36
合計ジャッジ時間 7,236 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
29,568 KB
testcase_01 AC 130 ms
29,664 KB
testcase_02 AC 131 ms
29,684 KB
testcase_03 AC 131 ms
29,616 KB
testcase_04 AC 130 ms
29,572 KB
testcase_05 AC 134 ms
29,708 KB
testcase_06 AC 132 ms
29,760 KB
testcase_07 AC 129 ms
29,676 KB
testcase_08 AC 292 ms
49,088 KB
testcase_09 AC 311 ms
50,108 KB
testcase_10 AC 282 ms
43,612 KB
testcase_11 AC 244 ms
38,644 KB
testcase_12 AC 298 ms
44,888 KB
testcase_13 AC 181 ms
36,812 KB
testcase_14 AC 212 ms
37,932 KB
testcase_15 AC 384 ms
49,800 KB
testcase_16 AC 378 ms
49,856 KB
testcase_17 AC 375 ms
50,336 KB
testcase_18 AC 343 ms
44,460 KB
testcase_19 AC 371 ms
50,524 KB
testcase_20 AC 370 ms
49,932 KB
testcase_21 AC 132 ms
29,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from numpy import fft as F
I=input
I()
a=list(map(int,I().split()))
b=[0]*len(a)
for i in I().split():b[-int(i)]+=1
print(*(F.ifft(F.fft(a)*F.fft(b))+.5).astype(int))
0