結果

問題 No.1307 Rotate and Accumulate
ユーザー testestesttestestest
提出日時 2020-12-04 01:18:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 360 ms / 5,000 ms
コード長 174 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 10,620 KB
実行使用メモリ 50,440 KB
最終ジャッジ日時 2023-10-12 12:24:24
合計ジャッジ時間 6,912 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
29,580 KB
testcase_01 AC 127 ms
29,392 KB
testcase_02 AC 128 ms
29,608 KB
testcase_03 AC 130 ms
29,488 KB
testcase_04 AC 129 ms
29,632 KB
testcase_05 AC 129 ms
29,408 KB
testcase_06 AC 129 ms
29,504 KB
testcase_07 AC 127 ms
29,572 KB
testcase_08 AC 286 ms
49,052 KB
testcase_09 AC 302 ms
49,960 KB
testcase_10 AC 269 ms
43,628 KB
testcase_11 AC 234 ms
38,652 KB
testcase_12 AC 289 ms
44,700 KB
testcase_13 AC 172 ms
36,368 KB
testcase_14 AC 206 ms
37,776 KB
testcase_15 AC 357 ms
50,400 KB
testcase_16 AC 351 ms
50,440 KB
testcase_17 AC 357 ms
50,328 KB
testcase_18 AC 329 ms
44,284 KB
testcase_19 AC 360 ms
50,400 KB
testcase_20 AC 352 ms
50,360 KB
testcase_21 AC 129 ms
29,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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