結果

問題 No.504 ゲーム大会(ランキング)
ユーザー sue_charosue_charo
提出日時 2017-04-21 22:26:42
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 269 ms / 2,000 ms
コード長 727 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 10,864 KB
実行使用メモリ 17,836 KB
最終ジャッジ日時 2023-09-27 11:14:38
合計ジャッジ時間 3,941 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
9,936 KB
testcase_01 AC 31 ms
10,016 KB
testcase_02 AC 34 ms
9,980 KB
testcase_03 AC 30 ms
9,800 KB
testcase_04 AC 31 ms
9,896 KB
testcase_05 AC 30 ms
9,872 KB
testcase_06 AC 30 ms
9,840 KB
testcase_07 AC 268 ms
16,432 KB
testcase_08 AC 266 ms
15,756 KB
testcase_09 AC 268 ms
16,392 KB
testcase_10 AC 263 ms
14,980 KB
testcase_11 AC 269 ms
17,192 KB
testcase_12 AC 267 ms
17,836 KB
testcase_13 AC 258 ms
14,840 KB
testcase_14 AC 266 ms
16,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
import array, bisect, collections, heapq, itertools, math, random, re, string, sys, time
sys.setrecursionlimit(10 ** 7)
INF = 10 ** 20
MOD = 10 ** 9 + 7
 
 
def II(): return int(input())
def ILI(): return list(map(int, input().split()))
def IAI(LINE): return [ILI() for __ in range(LINE)]
def IDI(): return {key: value for key, value in ILI()}
 
 
def solve(N, a):
    ans = [1]
    under = 1
    k_num = a[0]
    for i in range(1, N):
        if a[i] > k_num:
            under += 1
        ans.append(under)

    return ans
 
def main():
    N = II()
    a = []
    for __ in range(N):
        a.append(II())

    ans = solve(N, a)
    for i in ans:
        print(i)
 
 
if __name__ == "__main__":
    main()
0