結果

問題 No.138 化石のバージョン
コンテスト
ユーザー 大谷祐翔
提出日時 2025-11-11 14:47:11
言語 C#
(.NET 8.0.404)
結果
WA  
実行時間 -
コード長 926 bytes
コンパイル時間 7,794 ms
コンパイル使用メモリ 168,740 KB
実行使用メモリ 188,044 KB
最終ジャッジ日時 2025-11-11 14:47:24
合計ジャッジ時間 11,235 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (100 ミリ秒)。
  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