結果

問題 No.504 ゲーム大会(ランキング)
ユーザー fjafjafjafjafjafja
提出日時 2017-08-23 00:33:03
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 408 bytes
コンパイル時間 3,402 ms
コンパイル使用メモリ 74,152 KB
実行使用メモリ 70,088 KB
最終ジャッジ日時 2024-04-23 04:51:09
合計ジャッジ時間 15,376 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 134 ms
53,964 KB
testcase_02 WA -
testcase_03 AC 138 ms
54,152 KB
testcase_04 AC 137 ms
54,272 KB
testcase_05 AC 138 ms
54,148 KB
testcase_06 AC 136 ms
53,884 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 1,153 ms
59,688 KB
testcase_14 WA -
権限があれば一括ダウンロードができます

ソースコード

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[1]>=a[i])?(ans[i-1]):(ans[i-1]+1);
		}
		for(int i:ans)
		{
			System.out.println(i);
		}
	}
}
0