結果
| 問題 |
No.2393 Bit Grid Connected Component
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-28 21:47:39 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 696 bytes |
| コンパイル時間 | 3,647 ms |
| コンパイル使用メモリ | 112,848 KB |
| 実行使用メモリ | 37,428 KB |
| 最終ジャッジ日時 | 2024-10-06 18:19:58 |
| 合計ジャッジ時間 | 5,918 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 13 WA * 3 TLE * 1 -- * 3 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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));
}
}