Submission #19708642


Source Code Expand

Copy
using System;
using System.Linq;
using CompLib.Util;
using System.Threading;
using System.IO;

public class Program
{
    int N;
    public void Solve()
    {
        var sc = new Scanner();
        N = sc.NextInt();

        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });

        for (int i = 1; i <= N; i++)
        {
            int a = i * 2;
            int b = i * 2 + 1;
            Console.WriteLine($"{(a <= N ? a : 1) } {(b <= N ? b : 1) }");
        }

        Console.Out.Flush();
    }

    public static void Main(string[] args) => new Program().Solve();
    // public static void Main(string[] args) => new Thread(new Program().Solve, 1 << 27).Start();
}

namespace CompLib.Util
{
    using System;
    using System.Linq;

    class Scanner
    {
        private string[] _line;
        private int _index;
        private const char Separator = ' ';

        public Scanner()
        {
            _line = new string[0];
            _index = 0;
        }

        public string Next()
        {
            if (_index >= _line.Length)
            {
                string s;
                do
                {
                    s = Console.ReadLine();
                } while (s.Length == 0);

                _line = s.Split(Separator);
                _index = 0;
            }

            return _line[_index++];
        }

        public string ReadLine()
        {
            _index = _line.Length;
            return Console.ReadLine();
        }

        public int NextInt() => int.Parse(Next());
        public long NextLong() => long.Parse(Next());
        public double NextDouble() => double.Parse(Next());
        public decimal NextDecimal() => decimal.Parse(Next());
        public char NextChar() => Next()[0];
        public char[] NextCharArray() => Next().ToCharArray();

        public string[] Array()
        {
            string s = Console.ReadLine();
            _line = s.Length == 0 ? new string[0] : s.Split(Separator);
            _index = _line.Length;
            return _line;
        }

        public int[] IntArray() => Array().Select(int.Parse).ToArray();
        public long[] LongArray() => Array().Select(long.Parse).ToArray();
        public double[] DoubleArray() => Array().Select(double.Parse).ToArray();
        public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray();
    }
}

Submission Info

Submission Time
Task A - AtCoder Jumper
User mban
Language C# (.NET Core 3.1.201)
Score 0
Code Size 2493 Byte
Status WA
Exec Time 88 ms
Memory 27452 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 500
Status
AC × 2
AC × 4
WA × 8
Set Name Test Cases
Sample example0.txt, example1.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, example0.txt, example1.txt
Case Name Status Exec Time Memory
000.txt AC 88 ms 27388 KB
001.txt WA 83 ms 27088 KB
002.txt WA 84 ms 27108 KB
003.txt WA 83 ms 27320 KB
004.txt WA 82 ms 27232 KB
005.txt WA 83 ms 27452 KB
006.txt WA 82 ms 27356 KB
007.txt AC 86 ms 27012 KB
008.txt WA 85 ms 27012 KB
009.txt WA 81 ms 27116 KB
example0.txt AC 78 ms 27012 KB
example1.txt AC 78 ms 27000 KB