結果

問題 No.2056 非力なレッド
ユーザー 👑 kakel-sankakel-san
提出日時 2022-08-26 21:27:44
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 1,056 bytes
コンパイル時間 1,070 ms
コンパイル使用メモリ 105,600 KB
実行使用メモリ 38,912 KB
最終ジャッジ日時 2024-04-21 23:24:22
合計ジャッジ時間 5,939 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
18,816 KB
testcase_01 AC 31 ms
18,688 KB
testcase_02 AC 31 ms
18,944 KB
testcase_03 AC 31 ms
18,816 KB
testcase_04 AC 34 ms
18,944 KB
testcase_05 AC 33 ms
18,560 KB
testcase_06 AC 31 ms
18,688 KB
testcase_07 AC 32 ms
18,816 KB
testcase_08 AC 32 ms
18,688 KB
testcase_09 AC 31 ms
18,816 KB
testcase_10 AC 32 ms
18,688 KB
testcase_11 AC 31 ms
18,816 KB
testcase_12 AC 32 ms
18,816 KB
testcase_13 AC 103 ms
34,816 KB
testcase_14 AC 102 ms
34,688 KB
testcase_15 AC 97 ms
34,816 KB
testcase_16 AC 38 ms
20,480 KB
testcase_17 AC 73 ms
27,520 KB
testcase_18 AC 36 ms
19,968 KB
testcase_19 AC 40 ms
20,992 KB
testcase_20 AC 112 ms
36,096 KB
testcase_21 AC 49 ms
21,800 KB
testcase_22 AC 102 ms
34,688 KB
testcase_23 AC 95 ms
33,408 KB
testcase_24 AC 64 ms
24,192 KB
testcase_25 AC 118 ms
36,608 KB
testcase_26 AC 122 ms
36,992 KB
testcase_27 AC 117 ms
36,736 KB
testcase_28 AC 133 ms
38,784 KB
testcase_29 AC 131 ms
38,656 KB
testcase_30 AC 135 ms
38,656 KB
testcase_31 AC 134 ms
38,784 KB
testcase_32 AC 132 ms
38,656 KB
testcase_33 AC 135 ms
38,528 KB
testcase_34 AC 133 ms
38,912 KB
testcase_35 AC 132 ms
38,656 KB
testcase_36 AC 130 ms
38,784 KB
testcase_37 AC 133 ms
38,400 KB
testcase_38 AC 31 ms
18,944 KB
testcase_39 AC 31 ms
18,816 KB
testcase_40 AC 31 ms
18,816 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

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