結果

問題 No.1307 Rotate and Accumulate
ユーザー %20%20
提出日時 2020-12-04 02:25:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 443 ms / 5,000 ms
コード長 137 bytes
コンパイル時間 1,092 ms
コンパイル使用メモリ 10,648 KB
実行使用メモリ 64,440 KB
最終ジャッジ日時 2023-10-12 14:16:48
合計ジャッジ時間 9,232 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
29,544 KB
testcase_01 AC 128 ms
29,548 KB
testcase_02 AC 127 ms
29,592 KB
testcase_03 AC 129 ms
29,736 KB
testcase_04 AC 127 ms
29,616 KB
testcase_05 AC 127 ms
29,572 KB
testcase_06 AC 127 ms
29,516 KB
testcase_07 AC 127 ms
29,592 KB
testcase_08 AC 348 ms
50,208 KB
testcase_09 AC 361 ms
52,448 KB
testcase_10 AC 308 ms
52,820 KB
testcase_11 AC 294 ms
39,360 KB
testcase_12 AC 327 ms
51,468 KB
testcase_13 AC 181 ms
39,332 KB
testcase_14 AC 231 ms
40,804 KB
testcase_15 AC 442 ms
64,176 KB
testcase_16 AC 440 ms
64,228 KB
testcase_17 AC 443 ms
64,208 KB
testcase_18 AC 408 ms
45,548 KB
testcase_19 AC 438 ms
64,440 KB
testcase_20 AC 443 ms
64,324 KB
testcase_21 AC 128 ms
29,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from numpy.fft import*
n,_,*a=map(int,open(0).read().split())
b=[0]*n
for i in a[n:]:b[-i]+=1
print(*map(int,ifft(fft(a[:n])*fft(b))+.5))
0