結果

問題 No.571 3人兄弟(その2)
ユーザー curryudon08curryudon08
提出日時 2020-07-05 00:19:46
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 817 bytes
コンパイル時間 1,092 ms
コンパイル使用メモリ 110,768 KB
実行使用メモリ 25,420 KB
最終ジャッジ日時 2023-10-19 21:04:04
合計ジャッジ時間 2,454 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
25,420 KB
testcase_01 AC 33 ms
25,420 KB
testcase_02 AC 32 ms
25,420 KB
testcase_03 AC 32 ms
25,420 KB
testcase_04 AC 32 ms
25,420 KB
testcase_05 AC 33 ms
25,420 KB
testcase_06 AC 32 ms
25,420 KB
testcase_07 AC 32 ms
25,420 KB
testcase_08 AC 34 ms
25,420 KB
testcase_09 AC 33 ms
25,420 KB
testcase_10 AC 33 ms
25,420 KB
testcase_11 AC 33 ms
25,420 KB
testcase_12 AC 32 ms
25,420 KB
testcase_13 AC 32 ms
25,420 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;

namespace _0571
{
    class Program
    {
        static void Main(string[] args)
        {
            var s = new Tuple<int,int,int>[3];

            for(var i = 0; i < 3; i++){
                var _ = Console.ReadLine().Split();
                var h = int.Parse(_[0]);
                var w = int.Parse(_[1]);
                s[i] = Tuple.Create(i,h,w);
            }
            
            var o = s.OrderByDescending(x => x.Item2).ThenBy(x => x.Item3).ToArray();
            foreach(var t in o){
                if(t.Item1 == 0){
                    Console.WriteLine("A");
                }else if(t.Item1 == 1){
                    Console.WriteLine("B");
                }else{
                    Console.WriteLine("C");
                }
            }
        }
    }
}
0