結果

問題 No.1307 Rotate and Accumulate
ユーザー testestesttestestest
提出日時 2020-12-04 01:07:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 389 ms / 5,000 ms
コード長 182 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 50,596 KB
最終ジャッジ日時 2023-10-12 12:08:24
合計ジャッジ時間 7,775 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
29,568 KB
testcase_01 AC 130 ms
29,528 KB
testcase_02 AC 128 ms
29,548 KB
testcase_03 AC 127 ms
29,556 KB
testcase_04 AC 127 ms
29,668 KB
testcase_05 AC 127 ms
29,660 KB
testcase_06 AC 127 ms
29,632 KB
testcase_07 AC 127 ms
29,604 KB
testcase_08 AC 306 ms
49,632 KB
testcase_09 AC 311 ms
50,520 KB
testcase_10 AC 297 ms
44,920 KB
testcase_11 AC 246 ms
39,112 KB
testcase_12 AC 313 ms
44,640 KB
testcase_13 AC 187 ms
36,292 KB
testcase_14 AC 223 ms
37,808 KB
testcase_15 AC 386 ms
49,232 KB
testcase_16 AC 387 ms
49,244 KB
testcase_17 AC 389 ms
50,596 KB
testcase_18 AC 358 ms
44,332 KB
testcase_19 AC 381 ms
50,572 KB
testcase_20 AC 383 ms
49,200 KB
testcase_21 AC 125 ms
29,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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