結果

問題 No.3042 本棚
ユーザー bluemeganebluemegane
提出日時 2019-04-02 07:38:13
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 557 bytes
コンパイル時間 2,319 ms
コンパイル使用メモリ 105,300 KB
実行使用メモリ 24,836 KB
最終ジャッジ日時 2023-09-10 10:31:29
合計ジャッジ時間 5,866 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
22,876 KB
testcase_01 AC 87 ms
20,712 KB
testcase_02 AC 86 ms
22,568 KB
testcase_03 AC 87 ms
20,688 KB
testcase_04 AC 87 ms
22,752 KB
testcase_05 AC 87 ms
22,588 KB
testcase_06 AC 87 ms
24,836 KB
testcase_07 AC 87 ms
22,684 KB
testcase_08 AC 87 ms
22,852 KB
testcase_09 AC 87 ms
22,932 KB
testcase_10 AC 86 ms
20,592 KB
testcase_11 AC 88 ms
22,680 KB
testcase_12 AC 87 ms
22,768 KB
testcase_13 AC 87 ms
22,680 KB
testcase_14 AC 87 ms
22,780 KB
testcase_15 AC 88 ms
24,672 KB
testcase_16 AC 87 ms
22,592 KB
testcase_17 AC 88 ms
20,688 KB
testcase_18 AC 88 ms
22,684 KB
testcase_19 AC 88 ms
24,740 KB
testcase_20 AC 88 ms
24,768 KB
testcase_21 AC 86 ms
22,584 KB
testcase_22 AC 86 ms
22,676 KB
testcase_23 AC 87 ms
24,800 KB
testcase_24 AC 86 ms
22,740 KB
testcase_25 AC 87 ms
22,788 KB
testcase_26 AC 86 ms
24,760 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System.Linq;
using System;

public class P
{
    public string a { get; set; }
    public string b { get; set; }
}

public class Hello
{
    static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        var ps = new P[n];
        for (int i = 0; i < n; i++)
        {
            string[] line = Console.ReadLine().Trim().Split(' ');
            ps[i] = new P { a = line[0], b = line[1] };
        }
        foreach (var x in ps.OrderBy(x => x.a).ThenBy(x => x.b))
            Console.WriteLine("{0} {1}", x.a, x.b);
    }
}

0