Under construction

Still being built. Things may change

Marathon Race

Interview

Time limit2sMemory limit1024 MB

Summary
Given N race times, output for each student the count of students with a strictly smaller time, plus one.
Level

Easy1 of 10

Topics
Array, Brute force
Solved
No attempts yet

Problem

JOI 高校には N 人の生徒がおり,1 から N までの番号が付けられている.

先月 JOI 高校ではマラソン大会が開催され,生徒全員がこれに参加した.生徒 i (1 ≦ i ≦ N) の記録は Ai 分であった.

マラソン大会における各生徒の順位を求めよ.ただし,生徒 i (1 ≦ i ≦ N) の順位は,(記録が Ai 分未満の生徒の人数) + 1 で計算される.

Input

入力は以下の形式で与えられる.

N
A1 A2 … AN

Output

N 行出力せよ.i 行目 (1 ≦ i ≦ N) には,生徒 i の順位を出力せよ.

Constraints

  • 1 ≦ N ≦ 100.
  • 1 ≦ Ai ≦ 1 000 (1 ≦ i ≦ N).
  • 入力される値はすべて整数である.

Examples3

  1. Example 1

    Input
    3
    44 42 69
    
    Expected output
    2
    1
    3
    
  2. Example 2

    Input
    4
    40 60 40 60
    
    Expected output
    1
    3
    1
    3
    
  3. Example 3

    Input
    10
    766 152 595 926 663 509 368 595 175 622
    
    Expected output
    9
    1
    5
    10
    8
    4
    3
    5
    2
    7