結果

問題 No.2393 Bit Grid Connected Component
ユーザー 👑 kakel-sankakel-san
提出日時 2023-07-28 21:47:39
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 696 bytes
コンパイル時間 2,165 ms
コンパイル使用メモリ 105,088 KB
実行使用メモリ 24,448 KB
最終ジャッジ日時 2024-04-16 05:40:31
合計ジャッジ時間 5,802 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
24,448 KB
testcase_01 AC 28 ms
19,072 KB
testcase_02 AC 29 ms
19,200 KB
testcase_03 AC 29 ms
19,200 KB
testcase_04 AC 28 ms
19,328 KB
testcase_05 AC 28 ms
19,072 KB
testcase_06 AC 29 ms
19,072 KB
testcase_07 AC 29 ms
19,072 KB
testcase_08 AC 29 ms
19,328 KB
testcase_09 AC 28 ms
19,328 KB
testcase_10 WA -
testcase_11 AC 30 ms
19,200 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 35 ms
21,248 KB
testcase_15 AC 39 ms
21,996 KB
testcase_16 TLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 long[] NList => ReadLine().Split().Select(long.Parse).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var t = NN;
        var ans = new long[t];
        for (var u = 0; u < t; ++u)
        {
            var c = NList;
            var (x, y) = (c[0], (int)c[1]);
            var max = y;
            while ((x & (1 << max + 1)) != 0) ++max;
            ans[u] = (1 << max + 1) - 1;
        }
        WriteLine(string.Join("\n", ans));
    }
}
0