結果

問題 No.571 3人兄弟(その2)
ユーザー NoNo
提出日時 2018-01-20 23:49:56
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 66 ms / 2,000 ms
コード長 827 bytes
コンパイル時間 2,721 ms
コンパイル使用メモリ 108,000 KB
実行使用メモリ 23,936 KB
最終ジャッジ日時 2023-08-26 09:29:19
合計ジャッジ時間 4,220 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
21,824 KB
testcase_01 AC 65 ms
23,808 KB
testcase_02 AC 65 ms
21,768 KB
testcase_03 AC 65 ms
23,784 KB
testcase_04 AC 65 ms
23,876 KB
testcase_05 AC 65 ms
21,792 KB
testcase_06 AC 65 ms
23,836 KB
testcase_07 AC 65 ms
23,792 KB
testcase_08 AC 66 ms
23,788 KB
testcase_09 AC 65 ms
21,868 KB
testcase_10 AC 66 ms
23,936 KB
testcase_11 AC 65 ms
21,896 KB
testcase_12 AC 66 ms
23,788 KB
testcase_13 AC 65 ms
23,724 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.Collections.Generic;
using System.Linq;

namespace y
{
    class Program
    {
        static void Main(string[] args)
        {
            var a = new List<p>();
            for (int i = 0; i < 3; i++)
            {
                string[] ss = Console.ReadLine().Split();
                a.Add(new p(Convert.ToChar(('A' + i)).ToString(), int.Parse(ss[0]), int.Parse(ss[1])));
            }

            var f = a.OrderByDescending(x => x.h).ThenBy(x => x.w);

            foreach (var v in f)
            {
                Console.WriteLine(v.n);
            }
        }
    }

    class p
    {
        public p(string h1, int h2, int h3)
        {
            n = h1;
            h = h2;
            w = h3;
        }
        public string n;
        public int h;
        public int w;
    }
}
0