結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー ThetaTheta
提出日時 2022-10-20 11:09:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 342 bytes
コンパイル時間 993 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 40,176 KB
最終ジャッジ日時 2023-09-12 17:17:42
合計ジャッジ時間 10,073 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 135 ms
29,280 KB
testcase_02 AC 189 ms
36,468 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 142 ms
30,088 KB
testcase_06 WA -
testcase_07 AC 174 ms
34,460 KB
testcase_08 WA -
testcase_09 AC 176 ms
34,424 KB
testcase_10 AC 188 ms
35,824 KB
testcase_11 WA -
testcase_12 AC 176 ms
34,968 KB
testcase_13 WA -
testcase_14 AC 208 ms
38,676 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 137 ms
29,696 KB
testcase_18 WA -
testcase_19 AC 171 ms
34,156 KB
testcase_20 AC 166 ms
33,756 KB
testcase_21 AC 174 ms
35,032 KB
testcase_22 AC 135 ms
29,292 KB
testcase_23 WA -
testcase_24 AC 214 ms
40,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from numpy import diff


def main():
    N, D = map(int, input().split())
    others = list(map(int, input().split()))
    moved = [0]

    for person in others:
        if person - moved[-1] < D:
            moved.append(moved[-1] + D)
        else:
            moved.append(person)
    print(*moved)


if __name__ == "__main__":
    main()
0