結果

問題 No.138 化石のバージョン
コンテスト
ユーザー 大谷祐翔
提出日時 2025-11-11 14:44:17
言語 C#
(.NET 8.0.404)
結果
WA  
実行時間 -
コード長 927 bytes
コンパイル時間 8,007 ms
コンパイル使用メモリ 168,604 KB
実行使用メモリ 188,632 KB
最終ジャッジ日時 2025-11-11 14:44:28
合計ジャッジ時間 11,493 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 27 WA * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (97 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

class Program
{
    static void Main(string[] args)
    {
        string inputTop = Console.ReadLine()!;
        string inputBottom = Console.ReadLine()!;
        List<int> oldList = new List<int>();
        List<int> myList = new List<int>();

        NumChangeFunc(inputTop, oldList);
        NumChangeFunc(inputBottom, myList);

        for (int i = 0; i < oldList.Count; i++)
        {
            if (oldList[i] <= myList[i])
            {
                Console.WriteLine("NO");
                return;
            }
        }
        Console.WriteLine("YES");
    }

    public static void NumChangeFunc(string input, List<int> versionList)
    {
        string version = "";
        foreach (char c in input)
        {
            if (c == '.')
            {
                versionList.Add(int.Parse(version));
            }
            else
            {
                version += c;
            }
        }
    }
}
0