結果

問題 No.1971 Easy Sudoku
ユーザー NONODOKANONODOKA
提出日時 2022-06-10 22:20:34
言語 C#
(.NET 7.0.402)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 1,132 bytes
コンパイル時間 7,575 ms
コンパイル使用メモリ 158,832 KB
実行使用メモリ 179,096 KB
最終ジャッジ日時 2023-10-21 05:22:25
合計ジャッジ時間 9,368 ms
ジャッジサーバーID
(参考情報)
judge15 / judge10
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
32,748 KB
testcase_01 AC 82 ms
32,796 KB
testcase_02 AC 82 ms
32,924 KB
testcase_03 AC 82 ms
32,892 KB
testcase_04 AC 82 ms
32,948 KB
testcase_05 AC 82 ms
32,768 KB
testcase_06 AC 82 ms
32,752 KB
testcase_07 AC 84 ms
33,148 KB
testcase_08 AC 83 ms
32,760 KB
testcase_09 AC 82 ms
32,780 KB
testcase_10 AC 82 ms
32,888 KB
testcase_11 AC 82 ms
32,744 KB
testcase_12 AC 83 ms
32,744 KB
testcase_13 AC 84 ms
179,096 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (102 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    internal static void Main() => new Program().Solve();

    void Solve()
    {
        //code
        int n = IO.Read<int>();
        var linklist = new LinkedList<int>();
        for (int i = 1; i <= n; i++)
        {
            linklist.AddLast(i);
        }
        for (int i = 0; i < n; i++)
        {
            IO.WriteEnum<int>(linklist);
            LinkedListNode<int> node = linklist.First;
            linklist.RemoveFirst();
            linklist.AddLast(node);
        }
    }

}

static class IO
{
    static readonly Queue<string> que = new Queue<string>();
    public static T Read<T>() { if (!que.Any()) foreach (var s in Console.ReadLine().Split()) que.Enqueue(s); return (T)Convert.ChangeType(que.Dequeue(), typeof(T)); }
    public static IEnumerable<T> ReadEnum<T>(long n) { for (long i = 0; i < n; i++) yield return Read<T>(); }
    public static void Write<T>(T item) => Console.WriteLine(item);
    public static void WriteEnum<T>(IEnumerable<T> items, string separetor = " ") => Write(string.Join(separetor, items));
}
0