結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-05 20:43:01 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 835 bytes |
| コンパイル時間 | 1,502 ms |
| コンパイル使用メモリ | 112,564 KB |
| 実行使用メモリ | 28,056 KB |
| 最終ジャッジ日時 | 2024-10-04 02:03:58 |
| 合計ジャッジ時間 | 3,807 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 32 WA * 1 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
public class Program {
public static void Main() {
int[] fossil = Array.ConvertAll<string, int>(Console.ReadLine().Split('.'), value => int.Parse(value));
int[] obj = Array.ConvertAll<string, int>(Console.ReadLine().Split('.'), value => int.Parse(value));
if (fossil[0] < obj[0]) {
Console.WriteLine("NO");
return;
} else if (fossil[0] > obj[0]) {
Console.WriteLine("YES");
return;
} else {
if (fossil[1] < obj[1]) {
Console.WriteLine("NO");
return;
} else if (fossil[1] > obj[1]) {
Console.WriteLine("YES");
return;
} else {
Console.WriteLine(fossil[2] <= obj[2] ? "YES" : "NO");
}
}
}
}