結果

問題 No.33 アメーバがたくさん
ユーザー xuzijian629xuzijian629
提出日時 2018-10-28 02:09:23
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
MLE  
実行時間 -
コード長 423 bytes
コンパイル時間 2,130 ms
コンパイル使用メモリ 205,420 KB
実行使用メモリ 674,188 KB
最終ジャッジ日時 2024-04-29 22:20:54
合計ジャッジ時間 8,822 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 MLE -
testcase_09 -- -
testcase_10 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
using vi = vector<i64>;
using vvi = vector<vi>;

int main() {
    unordered_set<i64> cnt;
    i64 n, d, t;
    cin >> n >> d >> t;
    for (int i = 0; i < n; i++) {
        i64 x;
        cin >> x;
        for (int i = 0; i <= t; i++) {
            cnt.insert(x + i * d);
            cnt.insert(x - i * d);
        }
    }
    cout << cnt.size() << endl;
}
0