結果

問題 No.1307 Rotate and Accumulate
ユーザー NyaanNyaanNyaanNyaan
提出日時 2020-12-04 01:28:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 376 ms / 5,000 ms
コード長 166 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 10,680 KB
実行使用メモリ 50,436 KB
最終ジャッジ日時 2023-10-12 12:42:10
合計ジャッジ時間 8,406 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
29,572 KB
testcase_01 AC 130 ms
29,624 KB
testcase_02 AC 128 ms
29,572 KB
testcase_03 AC 131 ms
29,716 KB
testcase_04 AC 130 ms
29,532 KB
testcase_05 AC 130 ms
29,656 KB
testcase_06 AC 130 ms
29,640 KB
testcase_07 AC 131 ms
29,676 KB
testcase_08 AC 296 ms
49,156 KB
testcase_09 AC 314 ms
49,948 KB
testcase_10 AC 280 ms
43,720 KB
testcase_11 AC 244 ms
38,760 KB
testcase_12 AC 300 ms
44,796 KB
testcase_13 AC 179 ms
36,712 KB
testcase_14 AC 212 ms
37,948 KB
testcase_15 AC 369 ms
49,876 KB
testcase_16 AC 371 ms
49,648 KB
testcase_17 AC 376 ms
50,436 KB
testcase_18 AC 341 ms
44,292 KB
testcase_19 AC 367 ms
50,308 KB
testcase_20 AC 365 ms
49,624 KB
testcase_21 AC 130 ms
29,676 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