結果

問題 No.2092 Conjugation
ユーザー kokatsukokatsu
提出日時 2022-10-12 01:18:15
言語 D
(dmd 2.106.1)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 283 bytes
コンパイル時間 2,639 ms
コンパイル使用メモリ 209,364 KB
実行使用メモリ 8,204 KB
最終ジャッジ日時 2023-09-04 18:33:49
合計ジャッジ時間 4,671 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 19 ms
4,384 KB
testcase_08 AC 36 ms
6,032 KB
testcase_09 AC 29 ms
4,488 KB
testcase_10 AC 30 ms
4,804 KB
testcase_11 AC 31 ms
4,868 KB
testcase_12 AC 29 ms
4,424 KB
testcase_13 AC 26 ms
4,380 KB
testcase_14 AC 25 ms
4,376 KB
testcase_15 AC 29 ms
4,380 KB
testcase_16 AC 39 ms
7,232 KB
testcase_17 AC 43 ms
8,204 KB
testcase_18 AC 40 ms
7,432 KB
testcase_19 AC 9 ms
6,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import std;

void main() {
    int N;
    readf("%d\n", N);

    auto A = readln.chomp.split.to!(int[]);

    auto res = new int[](A[0]+1);
    res[0] = N;
    foreach (a; A) --res[a];

    foreach (i; 0 .. A[0]) res[i+1] += res[i];

    res.popBack;

    writefln("%(%s %)", res);
}
0