結果

問題 No.3481 495
コンテスト
ユーザー tobisatis
提出日時 2026-03-27 21:20:52
言語 C#
(.NET 10.0.102)
コンパイル:
dotnet_c
実行:
/usr/bin/dotnet_wrap
結果
AC  
実行時間 57 ms / 2,000 ms
コード長 479 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 15,996 ms
コンパイル使用メモリ 173,144 KB
実行使用メモリ 198,056 KB
最終ジャッジ日時 2026-03-27 21:21:37
合計ジャッジ時間 16,961 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (82 ミリ秒)。
/home/judge/data/code/Main.cs(12,12): warning CS8321: ローカル関数 'Range' は宣言されていますが、一度も使用されていません [/home/judge/data/code/main.csproj]
  main -> /home/judge/data/code/bin/Release/net10.0/main.dll
  main -> /home/judge/data/code/bin/Release/net10.0/publish/

ソースコード

diff #
raw source code

#nullable enable

#region
var (_input, _iter) = (Array.Empty<string>(), 0);
T I<T>() where T : IParsable<T>
{
    while (_iter >= _input.Length) (_input, _iter) = (Console.ReadLine()!.Trim().Split(' '), 0);
    return T.Parse(_input[_iter++], null);
}
#endregion

static T[] Range<T>(int n, Func<T> F) => Enumerable.Range(0, n).Select(_ => F()).ToArray();

var n = I<string>().Select(c => c - '0').ToArray();
var ans = n[0] + n[2] == n[1];
Console.WriteLine(ans ? "Yes" : "No");
0