結果

問題 No.3211 NAND Oracle
ユーザー kakel-san
提出日時 2025-08-14 21:34:02
言語 C#
(.NET 8.0.404)
結果
WA  
実行時間 -
コード長 1,230 bytes
コンパイル時間 11,059 ms
コンパイル使用メモリ 170,632 KB
実行使用メモリ 193,600 KB
最終ジャッジ日時 2025-08-14 21:34:20
合計ジャッジ時間 13,926 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (112 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static int NN => int.Parse(ReadLine());
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var c = NList;
        var (q, k) = (c[0], c[1]);
        var ans = Nand(q, k);
        if (ans == null)
        {
            WriteLine("No");
        }
        else
        {
            WriteLine("Yes");
            WriteLine(string.Join("\n", ans));
        }

    }
    static List<string> Nand(int q, int k)
    {
        var ans = new List<string> { "1 2", "2 3", "1 4", "1 5", "1 5" };
        if (q == 1)
        {
        }
        else if (q == 2)
        {
            if (k < 3) return null;
        }
        else if (q == 3)
        {
            if (k < 3) return null;
        }
        else if (q == 4)
        {
            if (k < 4) return null;
        }
        else
        {
            if (k < 5) return null;
            for (var i = 5; i < q; ++i) ans.Add("6 7");
        }
        return ans.Take(q).ToList();
    }
}
0