結果

問題 No.138 化石のバージョン
コンテスト
ユーザー 大谷祐翔
提出日時 2025-11-11 14:50:30
言語 C#
(.NET 8.0.404)
結果
RE  
実行時間 -
コード長 972 bytes
コンパイル時間 7,771 ms
コンパイル使用メモリ 170,664 KB
実行使用メモリ 195,428 KB
最終ジャッジ日時 2025-11-11 14:50:46
合計ジャッジ時間 14,939 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 RE * 1
other AC * 15 WA * 3 RE * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (139 ミリ秒)。
  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;
            }
        }
        versionList.Add(int.Parse(version));
    }
}
0