結果

問題 No.2056 非力なレッド
ユーザー 👑 kakel-sankakel-san
提出日時 2022-08-26 21:27:44
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 145 ms / 2,000 ms
コード長 1,056 bytes
コンパイル時間 1,643 ms
コンパイル使用メモリ 63,824 KB
実行使用メモリ 43,808 KB
最終ジャッジ日時 2023-08-04 00:49:26
合計ジャッジ時間 7,830 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
23,924 KB
testcase_01 AC 55 ms
21,836 KB
testcase_02 AC 55 ms
21,908 KB
testcase_03 AC 56 ms
21,896 KB
testcase_04 AC 56 ms
23,808 KB
testcase_05 AC 57 ms
23,800 KB
testcase_06 AC 57 ms
21,812 KB
testcase_07 AC 56 ms
21,884 KB
testcase_08 AC 56 ms
21,868 KB
testcase_09 AC 55 ms
21,844 KB
testcase_10 AC 55 ms
21,752 KB
testcase_11 AC 55 ms
21,920 KB
testcase_12 AC 56 ms
21,808 KB
testcase_13 AC 118 ms
39,396 KB
testcase_14 AC 115 ms
35,228 KB
testcase_15 AC 116 ms
35,124 KB
testcase_16 AC 68 ms
22,724 KB
testcase_17 AC 98 ms
28,920 KB
testcase_18 AC 65 ms
24,300 KB
testcase_19 AC 69 ms
22,796 KB
testcase_20 AC 128 ms
39,164 KB
testcase_21 AC 76 ms
25,268 KB
testcase_22 AC 117 ms
39,284 KB
testcase_23 AC 110 ms
36,196 KB
testcase_24 AC 86 ms
28,848 KB
testcase_25 AC 131 ms
41,544 KB
testcase_26 AC 134 ms
40,084 KB
testcase_27 AC 131 ms
39,596 KB
testcase_28 AC 144 ms
43,732 KB
testcase_29 AC 144 ms
43,808 KB
testcase_30 AC 143 ms
41,808 KB
testcase_31 AC 144 ms
41,796 KB
testcase_32 AC 144 ms
43,672 KB
testcase_33 AC 144 ms
43,788 KB
testcase_34 AC 143 ms
41,676 KB
testcase_35 AC 145 ms
41,732 KB
testcase_36 AC 143 ms
41,812 KB
testcase_37 AC 143 ms
41,728 KB
testcase_38 AC 56 ms
21,820 KB
testcase_39 AC 56 ms
19,836 KB
testcase_40 AC 56 ms
21,880 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()
    {
        var c = NList;
        var (n, x, m) = (c[0], c[1], c[2]);
        var a = NList;
        while (true)
        {
            var pos = -1;
            for (var i = n - 1; i >= 0; --i)
            {
                if (a[i] >= x)
                {
                    pos = i;
                    break;
                }
            }
            if (pos >= 0)
            {
                if (pos + 1 > m)
                {
                    WriteLine("No");
                    return;
                }
                for (var i = 0; i <= pos; ++i)
                {
                    a[i] /= 2;
                }
                m -= pos + 1;
            }
            else
            {
                WriteLine("Yes");
                return;
            }
        }
    }
}
0