結果
| 問題 |
No.1971 Easy Sudoku
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-10 22:17:46 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,131 bytes |
| コンパイル時間 | 3,089 ms |
| コンパイル使用メモリ | 114,940 KB |
| 実行使用メモリ | 28,592 KB |
| 最終ジャッジ日時 | 2024-09-21 06:28:49 |
| 合計ジャッジ時間 | 5,793 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 13 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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 = 0; 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));
}