結果
問題 | No.490 yukiソート |
ユーザー |
![]() |
提出日時 | 2018-12-31 03:58:11 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 815 bytes |
コンパイル時間 | 918 ms |
コンパイル使用メモリ | 110,472 KB |
実行使用メモリ | 26,092 KB |
最終ジャッジ日時 | 2024-10-10 05:06:55 |
合計ジャッジ時間 | 2,985 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | AC * 2 RE * 32 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;class Program {static void Main(string[] args) {//入力uint n = uint.Parse(Console.ReadLine());string s = Console.ReadLine();string[] t = s.Split(' ');uint[] a = new uint[n];for (uint i = 0; i < n; i++) {a[i] = uint.Parse(t[i]);}//計算for (uint i = 1; i < 2 * n - 3; i++) {for (uint p = 0; p < Math.Min(n - i, i / 2) ; p++) {if (a[p] > a[i - p]) {//値の入れ替えuint kari = a[p];a[p] = a[i - p];a[i - p] = kari;}}}//出力for (uint i = 0; i < n; i++) {Console.Write(a[i].ToString() + " ");}}}