結果

問題 No.1307 Rotate and Accumulate
ユーザー NyaanNyaanNyaanNyaan
提出日時 2020-12-04 01:17:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 410 ms / 5,000 ms
コード長 175 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 50,648 KB
最終ジャッジ日時 2023-10-12 12:22:43
合計ジャッジ時間 9,036 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
29,672 KB
testcase_01 AC 124 ms
29,648 KB
testcase_02 AC 124 ms
29,616 KB
testcase_03 AC 129 ms
29,544 KB
testcase_04 AC 129 ms
29,656 KB
testcase_05 AC 127 ms
29,640 KB
testcase_06 AC 127 ms
29,620 KB
testcase_07 AC 128 ms
29,532 KB
testcase_08 AC 305 ms
49,588 KB
testcase_09 AC 314 ms
50,436 KB
testcase_10 AC 301 ms
44,860 KB
testcase_11 AC 246 ms
39,116 KB
testcase_12 AC 322 ms
44,708 KB
testcase_13 AC 192 ms
36,476 KB
testcase_14 AC 223 ms
37,816 KB
testcase_15 AC 404 ms
49,316 KB
testcase_16 AC 410 ms
49,264 KB
testcase_17 AC 404 ms
49,436 KB
testcase_18 AC 382 ms
44,248 KB
testcase_19 AC 396 ms
50,648 KB
testcase_20 AC 392 ms
49,176 KB
testcase_21 AC 126 ms
29,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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