結果

問題 No.1307 Rotate and Accumulate
ユーザー trineutrontrineutron
提出日時 2020-12-04 01:03:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 406 ms / 5,000 ms
コード長 195 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 50,236 KB
最終ジャッジ日時 2023-10-12 12:04:41
合計ジャッジ時間 9,540 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
29,544 KB
testcase_01 AC 135 ms
29,552 KB
testcase_02 AC 138 ms
29,568 KB
testcase_03 AC 138 ms
29,524 KB
testcase_04 AC 136 ms
29,664 KB
testcase_05 AC 136 ms
29,580 KB
testcase_06 AC 134 ms
29,556 KB
testcase_07 AC 136 ms
29,476 KB
testcase_08 AC 310 ms
48,992 KB
testcase_09 AC 320 ms
49,784 KB
testcase_10 AC 301 ms
43,620 KB
testcase_11 AC 257 ms
38,660 KB
testcase_12 AC 327 ms
44,708 KB
testcase_13 AC 196 ms
36,860 KB
testcase_14 AC 234 ms
37,928 KB
testcase_15 AC 403 ms
49,500 KB
testcase_16 AC 406 ms
49,388 KB
testcase_17 AC 404 ms
50,072 KB
testcase_18 AC 371 ms
44,220 KB
testcase_19 AC 394 ms
50,236 KB
testcase_20 AC 389 ms
49,736 KB
testcase_21 AC 135 ms
29,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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