結果

問題 No.632 穴埋め門松列
コンテスト
ユーザー aaa aa
提出日時 2025-12-07 21:34:24
言語 C#
(.NET 8.0.404)
結果
MLE  
実行時間 -
コード長 684 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 7,476 ms
コンパイル使用メモリ 169,152 KB
実行使用メモリ 187,192 KB
最終ジャッジ日時 2025-12-07 21:34:34
合計ジャッジ時間 8,690 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 MLE * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (104 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #
raw source code

using System;

class Program
{
    static void Main()
    {
        string[] s = Console.ReadLine()!.Split();
        int a = s[0] == "?" ? -1 : int.Parse(s[0]);
        int b = s[1] == "?" ? -1 : int.Parse(s[1]);
        int c = s[2] == "?" ? -1 : int.Parse(s[2]);

        string ans = "";

        foreach (int x in new int[] { 1, 4 })
        {
            int A = a == -1 ? x : a;
            int B = b == -1 ? x : b;
            int C = c == -1 ? x : c;

            if (A != B && B != C && A != C && (B == Math.Max(A, Math.Max(B, C)) || B == Math.Min(A, Math.Min(B, C))))
            {
                ans += x;
            }
        }

        Console.WriteLine(ans);
    }
}
0