結果

問題 No.138 化石のバージョン
コンテスト
ユーザー 大谷祐翔
提出日時 2025-11-11 14:53:46
言語 C#
(.NET 8.0.404)
結果
WA  
実行時間 -
コード長 965 bytes
コンパイル時間 9,037 ms
コンパイル使用メモリ 170,692 KB
実行使用メモリ 187,968 KB
最終ジャッジ日時 2025-11-11 14:53:59
合計ジャッジ時間 11,377 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (157 ミリ秒)。
  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));
                version = "";
            }
            else
            {
                version += c;
            }
        }
        
    }
}
0