A. Contest Ranking (contest)

内存限制:256 MiB 时间限制:1000 ms 标准输入输出
题目类型:传统 评测方式:文本比较

题目描述

Teacher John likes to let students take exams. There are students in total, and everyone has a score before the exam. John believes that the ranking value of each student should be =1 + the number of students with higher scores than his (her). Due to the large number of students, now I will help Teacher John calculate the ranking value of all students after the exam.

输入格式

The first line is a positive integer , indicating the number of data groups; in each group of data, the first line is a positive integer , and the second line is fractions separated by spaces .

输出格式

For each set of data, output the ranking score after this test, still in the order of input.

样例

输入样例
2
3 
1 3 3
5
3 5 3 4 5
输出样例
3 1 1
4 1 4 3 1

数据范围与提示

题目描述
John老师喜欢让学生考试,一共有 名学生,考试前每个人有一个分数 。John认为每个学生的排名值应该是 =1+比他(她)分数高的学生数。由于学生较多,现在帮助John老师计算一下,考试后所有学生的排名值。

输入格式
第一行为正整数 ,表示数据组数;每组数据中,第一行为正整数
第二行为以空格隔开的 个分数

输出格式
对于每组数据,输出这场考试之后的排名分值,仍然按照输入顺序。