結果
問題 | No.570 3人兄弟(その1) |
ユーザー |
|
提出日時 | 2017-10-14 11:17:55 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 32 ms / 2,000 ms |
コード長 | 1,177 bytes |
コンパイル時間 | 3,649 ms |
コンパイル使用メモリ | 114,596 KB |
実行使用メモリ | 26,884 KB |
最終ジャッジ日時 | 2024-11-17 14:03:32 |
合計ジャッジ時間 | 3,379 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;using System.Collections.Generic;using System.Linq;public class Program {public static List<int> NumbersFromString(string input, char delimitor = ' ') {return input.Split( delimitor ).ToList<string>().ConvertAll<int>( int.Parse );}private static List<int> NumbersFromConsole(char delimitor = ' ') {return NumbersFromString( Console.ReadLine() );}private struct Bro {public string Name { get; set; }public int Height { get; set; }}private static void Main() {var Bros = new List<Bro>(){new Bro(){Name = "A",Height = int.Parse( s: Console.ReadLine())},new Bro(){Name = "B",Height=int.Parse( s: Console.ReadLine())},new Bro(){Name = "C",Height=int.Parse( s: Console.ReadLine())}};var BrosSorted = Bros.OrderByDescending( x => x.Height );foreach (var i in BrosSorted) {Console.WriteLine(i.Name);}}}