結果

問題 No.365 ジェンガソート
ユーザー juger_jv
提出日時 2016-05-01 23:23:02
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 521 bytes
コンパイル時間 2,375 ms
コンパイル使用メモリ 73,688 KB
実行使用メモリ 49,320 KB
最終ジャッジ日時 2024-10-05 01:09:31
合計ジャッジ時間 11,787 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 30 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
class prob365
{
    public static void main(String args[])throws IOException
    {
	BufferedReader sc=new BufferedReader(new InputStreamReader(System.in));
	int n=Integer.parseInt(sc.readLine());
	String s[]=sc.readLine().split(" ");
	int a[]=new int[n];
	for(int i=0;i<n;i++)a[i]=Integer.parseInt(s[i]);
	int ans=0;
	for(int i=0;i<n;i++)
	    {
		for(int j=i;j<n;j++)
		    {
			if(a[i]>a[j])
			    {
				ans++;
				break;
			    }
		    }
	    }
	System.out.println(ans);
    }
}
0