結果

問題 No.504 ゲーム大会(ランキング)
ユーザー tsunabittsunabit
提出日時 2019-06-12 21:23:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,106 ms / 2,000 ms
コード長 524 bytes
コンパイル時間 3,291 ms
コンパイル使用メモリ 74,772 KB
実行使用メモリ 69,816 KB
最終ジャッジ日時 2024-04-20 02:08:44
合計ジャッジ時間 12,895 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
54,268 KB
testcase_01 AC 111 ms
54,144 KB
testcase_02 AC 109 ms
53,636 KB
testcase_03 AC 100 ms
53,044 KB
testcase_04 AC 100 ms
52,952 KB
testcase_05 AC 109 ms
54,236 KB
testcase_06 AC 108 ms
54,116 KB
testcase_07 AC 1,082 ms
69,776 KB
testcase_08 AC 1,106 ms
69,796 KB
testcase_09 AC 1,083 ms
69,560 KB
testcase_10 AC 1,050 ms
69,816 KB
testcase_11 AC 1,088 ms
69,716 KB
testcase_12 AC 948 ms
69,688 KB
testcase_13 AC 955 ms
69,616 KB
testcase_14 AC 1,052 ms
69,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

public class No504 {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	int[] a = new int[n];
    	int s = sc.nextInt();
    	int[] r = new int[n];
    	r[0] = 1;
    	
    	for(int i = 1; i < n; i++) {
    		if(s < sc.nextInt()) {
    			r[i] = r[i - 1] + 1;
    		}else {
    			r[i] = r[i - 1];
    		}
    	}
    	for(int v : r) {
    		System.out.println(v);
    	}
    	
    	
    	
    }
}
0