結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
29,288 KB
testcase_01 AC 127 ms
29,216 KB
testcase_02 AC 127 ms
29,220 KB
testcase_03 AC 128 ms
29,268 KB
testcase_04 AC 127 ms
29,268 KB
testcase_05 AC 128 ms
29,324 KB
testcase_06 AC 129 ms
29,344 KB
testcase_07 AC 127 ms
29,328 KB
testcase_08 AC 356 ms
48,848 KB
testcase_09 AC 369 ms
49,872 KB
testcase_10 AC 323 ms
43,532 KB
testcase_11 AC 300 ms
38,400 KB
testcase_12 AC 344 ms
44,520 KB
testcase_13 AC 184 ms
35,536 KB
testcase_14 AC 233 ms
37,700 KB
testcase_15 AC 466 ms
49,424 KB
testcase_16 AC 447 ms
49,616 KB
testcase_17 AC 466 ms
50,032 KB
testcase_18 AC 428 ms
44,128 KB
testcase_19 AC 455 ms
50,068 KB
testcase_20 AC 465 ms
49,724 KB
testcase_21 AC 128 ms
29,240 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(*map(int,F.ifft(F.fft(a)*F.fft(b))+.5))
0