結果
問題 | No.490 yukiソート |
ユーザー | mencotton |
提出日時 | 2018-03-19 20:19:56 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 720 bytes |
コンパイル時間 | 2,069 ms |
コンパイル使用メモリ | 102,476 KB |
実行使用メモリ | 24,084 KB |
最終ジャッジ日時 | 2023-09-02 01:09:24 |
合計ジャッジ時間 | 6,203 ms |
ジャッジサーバーID (参考情報) |
judge16 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 59 ms
21,616 KB |
testcase_01 | WA | - |
testcase_02 | AC | 59 ms
23,684 KB |
testcase_03 | AC | 58 ms
21,596 KB |
testcase_04 | AC | 65 ms
21,656 KB |
testcase_05 | AC | 67 ms
21,852 KB |
testcase_06 | AC | 63 ms
21,716 KB |
testcase_07 | AC | 61 ms
19,812 KB |
testcase_08 | AC | 65 ms
21,840 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | AC | 59 ms
21,748 KB |
testcase_25 | AC | 59 ms
21,812 KB |
testcase_26 | AC | 59 ms
21,632 KB |
testcase_27 | AC | 57 ms
21,740 KB |
testcase_28 | AC | 60 ms
23,760 KB |
testcase_29 | AC | 59 ms
23,680 KB |
testcase_30 | AC | 58 ms
23,736 KB |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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 <= Math.Min(i,n - 1); p++) { int q = i - p; if (p >= q) break; if (q < n && x[p] > x[q]) { int a = x[p]; x[p] = x[q]; x[q] = a; } } } Console.WriteLine(string.Join(" ",x)); } } }