結果
問題 |
No.3211 NAND Oracle
|
ユーザー |
|
提出日時 | 2025-08-14 21:37:08 |
言語 | C# (.NET 8.0.404) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,363 bytes |
コンパイル時間 | 7,842 ms |
コンパイル使用メモリ | 169,744 KB |
実行使用メモリ | 194,680 KB |
最終ジャッジ日時 | 2025-08-14 21:37:22 |
合計ジャッジ時間 | 13,469 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 3 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (116 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
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 < 4) return null; if (k == 4) { return new List<string> { "1 2", "2 3", "1 4", "1 4", "5 6" }; } for (var i = 5; i < q; ++i) ans.Add("6 7"); } return ans.Take(q).ToList(); } }