結果

問題 No.2092 Conjugation
ユーザー 👑 kakel-sankakel-san
提出日時 2022-10-07 21:26:00
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 625 bytes
コンパイル時間 2,361 ms
コンパイル使用メモリ 63,752 KB
実行使用メモリ 39,828 KB
最終ジャッジ日時 2023-09-02 23:50:58
合計ジャッジ時間 4,859 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
21,580 KB
testcase_01 AC 62 ms
19,544 KB
testcase_02 AC 61 ms
21,720 KB
testcase_03 AC 62 ms
21,596 KB
testcase_04 AC 62 ms
21,500 KB
testcase_05 AC 61 ms
19,540 KB
testcase_06 AC 62 ms
21,556 KB
testcase_07 AC 76 ms
24,296 KB
testcase_08 AC 113 ms
32,932 KB
testcase_09 AC 97 ms
29,076 KB
testcase_10 AC 102 ms
32,584 KB
testcase_11 AC 102 ms
30,936 KB
testcase_12 AC 98 ms
27,016 KB
testcase_13 AC 91 ms
25,964 KB
testcase_14 AC 90 ms
25,664 KB
testcase_15 AC 97 ms
27,012 KB
testcase_16 AC 123 ms
37,120 KB
testcase_17 AC 130 ms
39,828 KB
testcase_18 AC 127 ms
38,004 KB
testcase_19 AC 86 ms
23,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static int NN => int.Parse(ReadLine());
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var n = NN;
        var a = NList;
        var res = new int[a[0]];
        var pos = n - 1;
        for (var i = 0; i < res.Length; ++i)
        {
            while (a[pos] <= i) --pos;
            res[i] = pos + 1;
        }
        WriteLine(string.Join(" ", res));
    }
}
0