結果

問題 No.1412 Super Ryuo
ユーザー kou_kkk
提出日時 2025-07-05 19:44:59
言語 C#
(.NET 8.0.404)
結果
WA  
実行時間 -
コード長 553 bytes
コンパイル時間 7,292 ms
コンパイル使用メモリ 168,272 KB
実行使用メモリ 185,604 KB
最終ジャッジ日時 2025-07-05 19:45:11
合計ジャッジ時間 8,919 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (92 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;

class Program
{
    static void Main()
    {
        var arr = Console.ReadLine().Trim().Split(' ');
        int a = int.Parse(arr[0]);
        int b = int.Parse(arr[1]);
        int c = int.Parse(arr[2]);
        int d = int.Parse(arr[3]);
        
        int ans;
        if (a == c || b == d)
        {
            ans = 1;
        }
        else if (Math.Abs(a - c) + Math.Abs(b - d) <= 3)
        {
            ans = 1;
        }
        else
        {
            ans = 2;
        }
        
        Console.WriteLine(ans);
    }
}
0