結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
bluemegane
|
| 提出日時 | 2018-10-23 18:58:22 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 742 bytes |
| コンパイル時間 | 4,256 ms |
| コンパイル使用メモリ | 111,840 KB |
| 実行使用メモリ | 27,308 KB |
| 最終ジャッジ日時 | 2024-11-19 04:33:14 |
| 合計ジャッジ時間 | 2,990 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 WA * 4 |
コンパイルメッセージ
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.Collections.Generic;
using System;
public class P
{
public int id { get; set; }
public int a { get; set; }
public int b { get; set; }
public int c { get; set; }
}
public class Hello
{
public static void Main()
{
var ps = new List<P>();
for (int i = 0; i < 2; i++)
{
string[] line = Console.ReadLine().Trim().Split('.');
var a = int.Parse(line[0]);
var b = int.Parse(line[1]);
var c = int.Parse(line[2]);
ps.Add(new P { a = a, b = b, c = c ,id = i});
}
var id = ps.OrderBy(x => x.a).ThenBy(x => x.b).ThenBy(x => x.c).First().id;
Console.WriteLine(id == 0? "NO":"YES");
}
}
bluemegane