結果
| 問題 |
No.571 3人兄弟(その2)
|
| コンテスト | |
| ユーザー |
No
|
| 提出日時 | 2018-01-20 23:49:56 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 2,000 ms |
| コード長 | 827 bytes |
| コンパイル時間 | 1,184 ms |
| コンパイル使用メモリ | 114,888 KB |
| 実行使用メモリ | 19,456 KB |
| 最終ジャッジ日時 | 2024-12-25 03:54:10 |
| 合計ジャッジ時間 | 2,505 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
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;
}
}
No