結果

問題 No.1307 Rotate and Accumulate
ユーザー shotoyooshotoyoo
提出日時 2020-12-04 00:28:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 467 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 40,932 KB
最終ジャッジ日時 2023-10-12 11:06:48
合計ジャッジ時間 13,710 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
29,592 KB
testcase_01 AC 136 ms
29,612 KB
testcase_02 AC 133 ms
29,612 KB
testcase_03 AC 135 ms
29,556 KB
testcase_04 AC 135 ms
29,612 KB
testcase_05 AC 132 ms
29,576 KB
testcase_06 AC 133 ms
29,640 KB
testcase_07 AC 137 ms
29,648 KB
testcase_08 AC 4,870 ms
40,932 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")

import numpy as np
n,q = list(map(int, input().split()))
a = np.array(list(map(int, input().split())), dtype=np.int64)
# r = np.array(list(map(int, input().split())), dtype=np.int64)
r = list(map(int, input().split()))
b = np.zeros(n, dtype=np.int64)
for rr in r:
    b += np.roll(a,-rr)
write(" ".join(map(str, b.tolist())))
0