結果

問題 No.2393 Bit Grid Connected Component
ユーザー 👑 kakel-sankakel-san
提出日時 2023-07-28 21:49:23
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 186 ms / 2,000 ms
コード長 698 bytes
コンパイル時間 2,321 ms
コンパイル使用メモリ 112,348 KB
実行使用メモリ 39,304 KB
最終ジャッジ日時 2024-04-16 05:42:22
合計ジャッジ時間 4,566 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
25,320 KB
testcase_01 AC 29 ms
25,264 KB
testcase_02 AC 29 ms
25,128 KB
testcase_03 AC 30 ms
25,324 KB
testcase_04 AC 30 ms
25,196 KB
testcase_05 AC 30 ms
25,184 KB
testcase_06 AC 30 ms
25,516 KB
testcase_07 AC 30 ms
25,192 KB
testcase_08 AC 31 ms
27,136 KB
testcase_09 AC 30 ms
25,516 KB
testcase_10 AC 31 ms
27,180 KB
testcase_11 AC 30 ms
25,256 KB
testcase_12 AC 30 ms
25,132 KB
testcase_13 AC 30 ms
25,060 KB
testcase_14 AC 35 ms
25,264 KB
testcase_15 AC 38 ms
27,468 KB
testcase_16 AC 78 ms
32,788 KB
testcase_17 AC 179 ms
35,768 KB
testcase_18 AC 180 ms
33,728 KB
testcase_19 AC 186 ms
39,304 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 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 & (1L << max + 1)) != 0) ++max;
            ans[u] = (1L << max + 1) - 1;
        }
        WriteLine(string.Join("\n", ans));
    }
}
0