結果

問題 No.365 ジェンガソート
ユーザー juger_jv
提出日時 2016-05-01 23:14:35
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 432 bytes
コンパイル時間 2,258 ms
コンパイル使用メモリ 74,708 KB
実行使用メモリ 62,152 KB
最終ジャッジ日時 2024-10-05 01:04:51
合計ジャッジ時間 8,094 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9 WA * 32
権限があれば一括ダウンロードができます

ソースコード

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=1;i<n;i++)if(a[i-1]>a[i])ans++;
	System.out.println(ans);
    }
}
0