結果

問題 No.504 ゲーム大会(ランキング)
コンテスト
ユーザー kohaku_kohaku
提出日時 2017-04-21 22:27:47
言語 Java
(openjdk 26.0.2.1)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
AC  
実行時間 642 ms / 2,000 ms
+ 795µs
コード長 397 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,301 ms
コンパイル使用メモリ 83,660 KB
実行使用メモリ 57,384 KB
最終ジャッジ日時 2026-08-19 13:54:36
合計ジャッジ時間 8,384 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A = sc.nextInt();
        int rank = 1;
        System.out.println(1);
        for(int i=1; i<N; i++){
            int tmp = sc.nextInt();
            if(tmp>A)rank++;
            System.out.println(rank);
        }
    }
}
0