結果

問題 No.1307 Rotate and Accumulate
ユーザー NyaanNyaanNyaanNyaan
提出日時 2020-12-04 01:28:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 369 ms / 5,000 ms
コード長 167 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 50,144 KB
最終ジャッジ日時 2023-10-12 12:39:54
合計ジャッジ時間 7,359 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
29,168 KB
testcase_01 AC 128 ms
29,340 KB
testcase_02 AC 128 ms
29,240 KB
testcase_03 AC 127 ms
29,220 KB
testcase_04 AC 130 ms
29,268 KB
testcase_05 AC 128 ms
29,304 KB
testcase_06 AC 129 ms
29,344 KB
testcase_07 AC 128 ms
29,320 KB
testcase_08 AC 298 ms
48,780 KB
testcase_09 AC 301 ms
49,716 KB
testcase_10 AC 275 ms
43,436 KB
testcase_11 AC 237 ms
38,508 KB
testcase_12 AC 297 ms
44,516 KB
testcase_13 AC 175 ms
36,732 KB
testcase_14 AC 215 ms
37,632 KB
testcase_15 AC 369 ms
49,624 KB
testcase_16 AC 362 ms
49,656 KB
testcase_17 AC 366 ms
50,040 KB
testcase_18 AC 338 ms
44,092 KB
testcase_19 AC 359 ms
50,144 KB
testcase_20 AC 367 ms
49,532 KB
testcase_21 AC 128 ms
29,300 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