F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

who is the best?

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1314    Accepted Submission(s): 766


Problem Description
There are N people want to choose the best person. Each person select the best person $a_i$, .John wants to know that who received the most number of votes.
 

Input
The first line contains a single integer $T(1 \leq T \leq 50)$,indicating the number of test cases.
Each test case begins with an integer $N(1 \leq N \leq 100)$,indicating the number of person.
Next N lines contains an integer $a_i(1 \leq a_i \leq N)$.
 

Output
For each case, output an integer means who is the best person. If there are multiple answers, print the minimum index.
 

Sample Input
2 10 1 2 3 4 5 6 7 8 9 10 5 3 3 3 3 3
 

Sample Output
1 3
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 04:37:54, Gzip enabled