A set of $n$ distinct integers (in arbitrary order) is given, then a target $k$. Print the 1-based position of $k$ in input order, or -1 if $k$ is not present.
Input
Line 1: $n$. Line 2: $n$ distinct integers. Line 3: the target $k$.
Output
Print the 1-based position of $k$, or -1.
Example 1
Input
8 5 2 15 1 11 3 9 7 11
Output
5
Example 2
Input
3 5 2 7 3
Output
-1
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.