結果

問題 No.2196 Pair Bonus
ユーザー Maeda
提出日時 2025-04-16 15:12:03
言語 C#
(.NET 8.0.404)
結果
WA  
実行時間 -
コード長 1,118 bytes
コンパイル時間 7,477 ms
コンパイル使用メモリ 172,788 KB
実行使用メモリ 193,040 KB
最終ジャッジ日時 2025-04-16 15:12:20
合計ジャッジ時間 11,750 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 8 WA * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (101 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

    class Program
    {
        static void Main()
        {
            int n = int.Parse(Console.ReadLine());
            int[] pointA = Array.ConvertAll(Console.ReadLine().Split(' '), num => int.Parse(num.ToString()));
            int[] pointB = Array.ConvertAll(Console.ReadLine().Split(' '), num => int.Parse(num.ToString()));
            int[] bounsX = Array.ConvertAll(Console.ReadLine().Split(' '), num => int.Parse(num.ToString()));
            int[] bounsY = Array.ConvertAll(Console.ReadLine().Split(' '), num => int.Parse(num.ToString()));
            decimal total = 0;

            for(int i = 0; i < n; i++)
            {
                int[] pattern = new int[4];
                pattern[0] = pointA[2*i] + pointA[2 * i + 1] + bounsX[i];
                pattern[1] = pointB[2*i] + pointB[2 * i + 1] + bounsX[i];
                pattern[2] = pointA[2*i] + pointB[2 * i + 1] + bounsY[i];
                pattern[3] = pointB[2*i] + pointA[2 * i + 1] + bounsY[i];
                Array.Sort(pattern);
                total += pattern[3];
            }
            Console.WriteLine(total);
        }
    }
0