P27221 [AtCoder] Vote
普及+
题目描述

Problem Description

In 20XX, Tokyo will host a major international sports event. Programming contests are enjoyed worldwide as a sport, and there is a possibility that they will be included as an event. After investigating the review committee responsible for deciding which events to include, the following information was discovered:

  • For the review committee, a list of $N$ candidate events was created, ordered from the most interesting to the least. The $i$-th event in the list is referred to as event $i$, and the cost required to host event $i$, $A_i$, is also listed.
  • The review committee consists of $M$ members, from member $1$ to member $M$. Each member $j$ has their own review criterion $B_j$ and voted for the most interesting event among those that require a cost of $B_j$ or less to host.
  • For each member's review criterion, at least one event has a cost that meets the criterion. Therefore, all members voted once.
  • Only one event received the most votes.

Given the list of events and the members' information, create a program to determine the number of the event that received the most votes.


Input Format

The input consists of $1 + N + M$ lines.

The first line contains two integers $N, M$ ($1 \leq N \leq 1,000$, $1 \leq M \leq 1,000$), representing the number of events and the number of members, respectively.

The next $N$ lines contain an integer $A_i$ ($1 \leq A_i \leq 1,000$) on each line, representing the cost required to host event $i$.

The following $M$ lines contain an integer $B_j$ ($1 \leq B_j \leq 1,000$) on each line, representing the review criterion of member $j$.

In the given input data, it is guaranteed that every member will vote once, and only one event will receive the most votes.

Output Format

Output the number of the event that received the most votes on a single line.


Sample Input and Output

Sample Input #1

4 3
5
3
1
4
4
3
2

Sample Output #1

2

Sample Input #2

6 6
3
1
4
1
5
9
2
6
5
3
5
9

Sample Output #2

1

Notes/Hints

Sample Explanation 1

In sample input #1, there are 4 events and 3 members. The costs for the 4 events are 5, 3, 1, and 4, respectively.
- Member 1's criterion is 4. The most interesting event among those costing 4 or less is event 2.
- Member 2's criterion is 3. The most interesting event among those costing 3 or less is event 2.
- Member 3's criterion is 2. The most interesting event among those costing 2 or less is event 3.
Thus, event 2 receives 2 votes, and event 3 receives 1 vote. Since event 2 received the most votes, output 2.


Sample Explanation 2

In sample input #2, event 1 receives 5 votes, and event 2 receives 1 vote. Since event 1 received the most votes, output 1.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

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