結果
問題 |
No.571 3人兄弟(その2)
|
ユーザー |
![]() |
提出日時 | 2018-09-10 19:19:12 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 37 ms / 2,000 ms |
コード長 | 636 bytes |
コンパイル時間 | 1,378 ms |
コンパイル使用メモリ | 113,044 KB |
実行使用メモリ | 19,456 KB |
最終ジャッジ日時 | 2024-12-30 19:32:47 |
合計ジャッジ時間 | 2,431 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System.Linq; using System; public class P { public char n { get; set; } public int h { get; set; } public int w { get; set; } } public class Hello { public static void Main() { var name = "ABC"; var ps = new P[3]; for (int i = 0; i < 3; i++) { string[] line = Console.ReadLine().Trim().Split(' '); var h = int.Parse(line[0]); var w = int.Parse(line[1]); ps[i] = new P { n = name[i], h = h, w = w }; } foreach (var x in ps.OrderByDescending(y => y.h).ThenBy(y => y.w)) Console.WriteLine(x.n); } }