結果
| 問題 | No.683 Two Operations No.3 |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2026-10-20 00:35:13 |
| 言語 | C# (.NET 10.0.403 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 38 ms / 2,000 ms |
| + 672µs | |
| コード長 | 712 bytes |
| 記録 | |
| コンパイル時間 | 11,572 ms |
| コンパイル使用メモリ | 168,964 KB |
| 実行使用メモリ | 32,512 KB |
| 最終ジャッジ日時 | 2026-10-20 00:35:40 |
| 合計ジャッジ時間 | 12,412 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge6_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (197 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
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()
{
var c = NList;
var (a, b) = (c[0], c[1]);
WriteLine(Rev(a, b) ? "Yes" : "No");
}
static bool Rev(long a, long b)
{
if (a == 0 || b == 0) return true;
if ((a & 1) == 0)
{
if (Rev(a >> 1, b - 1)) return true;
}
if ((b & 1) == 0)
{
if (Rev(a - 1, b >> 1)) return true;
}
return false;
}
}