結果

問題 No.490 yukiソート
ユーザー mencottonmencotton
提出日時 2018-03-19 20:28:39
言語 C#(csc)
(csc 3.9.0)
結果
TLE  
実行時間 -
コード長 850 bytes
コンパイル時間 5,367 ms
コンパイル使用メモリ 97,080 KB
実行使用メモリ 17,832 KB
最終ジャッジ日時 2023-09-02 07:50:06
合計ジャッジ時間 10,458 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
15,660 KB
testcase_01 AC 62 ms
15,708 KB
testcase_02 AC 62 ms
15,604 KB
testcase_03 AC 61 ms
15,496 KB
testcase_04 AC 123 ms
15,812 KB
testcase_05 AC 123 ms
15,836 KB
testcase_06 AC 125 ms
15,748 KB
testcase_07 AC 125 ms
17,832 KB
testcase_08 AC 123 ms
15,696 KB
testcase_09 AC 124 ms
15,872 KB
testcase_10 AC 124 ms
15,844 KB
testcase_11 AC 124 ms
15,680 KB
testcase_12 AC 124 ms
15,788 KB
testcase_13 AC 124 ms
15,880 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;

namespace _490
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
            for (int i = 1; i < 2 * n - 3; i++)
            {
                for (int p = 0; p <= n - 1; p++)
                {
                    for (int q = p + 1; q <= n - 1; q++)
                    {
                        if (p + q == i)
                        {
                            if (x[p] > x[q])
                            {
                                int a = x[p]; x[p] = x[q]; x[q] = a;
                            }
                        }
                    }
                }
            }
            Console.WriteLine(string.Join(" ",x));
        }
    }
}
0