結果

問題 No.504 ゲーム大会(ランキング)
ユーザー fjafjafjafjafjafja
提出日時 2017-08-23 00:39:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,300 ms / 2,000 ms
コード長 408 bytes
コンパイル時間 3,366 ms
コンパイル使用メモリ 74,092 KB
実行使用メモリ 70,072 KB
最終ジャッジ日時 2024-04-23 04:51:54
合計ジャッジ時間 15,510 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
54,236 KB
testcase_01 AC 136 ms
54,096 KB
testcase_02 AC 136 ms
54,272 KB
testcase_03 AC 137 ms
54,052 KB
testcase_04 AC 134 ms
54,112 KB
testcase_05 AC 136 ms
54,412 KB
testcase_06 AC 135 ms
53,980 KB
testcase_07 AC 1,259 ms
69,920 KB
testcase_08 AC 1,300 ms
69,540 KB
testcase_09 AC 1,277 ms
69,960 KB
testcase_10 AC 1,261 ms
69,776 KB
testcase_11 AC 1,246 ms
69,956 KB
testcase_12 AC 1,126 ms
69,892 KB
testcase_13 AC 1,116 ms
69,440 KB
testcase_14 AC 1,252 ms
70,072 KB
権限があれば一括ダウンロードができます

ソースコード

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