結果
| 問題 |
No.3211 NAND Oracle
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-08-14 21:43:26 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,373 bytes |
| コンパイル時間 | 7,826 ms |
| コンパイル使用メモリ | 170,668 KB |
| 実行使用メモリ | 194,648 KB |
| 最終ジャッジ日時 | 2025-08-14 21:43:41 |
| 合計ジャッジ時間 | 13,832 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 WA * 3 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (107 ミリ秒)。 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 (q == 5 && 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();
}
}