結果

問題 No.490 yukiソート
ユーザー omi_UTomi_UT
提出日時 2017-03-10 22:38:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 159 ms / 2,000 ms
コード長 722 bytes
コンパイル時間 2,117 ms
コンパイル使用メモリ 75,196 KB
実行使用メモリ 54,112 KB
最終ジャッジ日時 2023-09-06 15:42:24
合計ジャッジ時間 7,054 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
50,564 KB
testcase_01 AC 63 ms
50,336 KB
testcase_02 AC 66 ms
50,388 KB
testcase_03 AC 65 ms
50,784 KB
testcase_04 AC 90 ms
52,216 KB
testcase_05 AC 90 ms
51,644 KB
testcase_06 AC 90 ms
52,328 KB
testcase_07 AC 99 ms
52,324 KB
testcase_08 AC 93 ms
54,112 KB
testcase_09 AC 101 ms
52,168 KB
testcase_10 AC 93 ms
52,604 KB
testcase_11 AC 92 ms
51,060 KB
testcase_12 AC 91 ms
51,232 KB
testcase_13 AC 91 ms
52,164 KB
testcase_14 AC 150 ms
53,524 KB
testcase_15 AC 149 ms
52,672 KB
testcase_16 AC 150 ms
52,512 KB
testcase_17 AC 152 ms
52,784 KB
testcase_18 AC 158 ms
52,504 KB
testcase_19 AC 158 ms
52,984 KB
testcase_20 AC 159 ms
52,732 KB
testcase_21 AC 159 ms
50,720 KB
testcase_22 AC 157 ms
52,556 KB
testcase_23 AC 157 ms
52,620 KB
testcase_24 AC 70 ms
50,436 KB
testcase_25 AC 70 ms
50,680 KB
testcase_26 AC 67 ms
50,288 KB
testcase_27 AC 67 ms
50,424 KB
testcase_28 AC 69 ms
50,448 KB
testcase_29 AC 69 ms
50,424 KB
testcase_30 AC 70 ms
50,508 KB
testcase_31 AC 66 ms
50,556 KB
testcase_32 AC 69 ms
50,600 KB
testcase_33 AC 66 ms
50,584 KB
testcase_34 AC 64 ms
50,772 KB
testcase_35 AC 66 ms
50,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args)throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(br.readLine());
		String line[] = br.readLine().split(" ");
		int[] a = new int [n];

		for (int i=0;i<n;i++){
			a[i] = Integer.parseInt(line[i]);
		}

		for(int i=0; i<2*n-3; i++){
			for(int p=0; 2*p<i; p++){
				if(i-p<n){
				if(a[p] > a[i-p]){
					int temp = a[p];
					a[p] = a[i-p];
					a[i-p] = temp;
				}}
			}
		}

		System.out.print(a[0]);
		for(int i=1; i<n; i++){
			System.out.print(" "+a[i]);
		}
		System.out.println();
	}
}
0