結果

問題 No.33 アメーバがたくさん
ユーザー szkhtsszkhts
提出日時 2023-02-26 08:20:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 396 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 21,740 KB
最終ジャッジ日時 2023-10-12 01:21:40
合計ジャッジ時間 7,024 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,784 KB
testcase_01 AC 16 ms
7,832 KB
testcase_02 AC 16 ms
7,848 KB
testcase_03 AC 14 ms
7,792 KB
testcase_04 AC 15 ms
7,852 KB
testcase_05 AC 15 ms
7,944 KB
testcase_06 AC 16 ms
7,856 KB
testcase_07 AC 17 ms
7,780 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n, d, t = map(int, input().split())
amebas = []
amebas.append(list(map(int, input().split())))

for i in range(t):
    ameba = []
    for a in amebas[i]:
        if (a - d) not in ameba:
            ameba.append(a - d)
        if (a) not in ameba:
            ameba.append(a)
        if (a + d) not in ameba:
            ameba.append(a + d)

    amebas.append(ameba)

print(len(set(amebas[-1])))
0