結果

問題 No.504 ゲーム大会(ランキング)
ユーザー fjafjafja
提出日時 2017-08-23 00:39:55
言語 Java
(openjdk 23)
結果
AC  
実行時間 1,279 ms / 2,000 ms
コード長 408 bytes
コンパイル時間 3,297 ms
コンパイル使用メモリ 74,296 KB
実行使用メモリ 61,604 KB
最終ジャッジ日時 2024-10-15 04:30:05
合計ジャッジ時間 15,207 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class N504
{
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		long a[]=new long[N];
		int ans[]=new int[N];
		a[0]=sc.nextLong();
		ans[0]=1;
		for(int i=1;i<N;i++)
		{
			a[i]=sc.nextLong();
			ans[i]=(a[0]>=a[i])?(ans[i-1]):(ans[i-1]+1);
		}
		for(int i:ans)
		{
			System.out.println(i);
		}
	}
}
0