P2969 [USACO09DEC] Music Notes S
Description
FJ is going to teach his cows how to play a song. The song consists of N (1
Input Format
\* Line 1: Two space-separated integers: N and Q
\* Lines 2..N+1: Line i+1 contains the single integer: B\_i
\* Lines N+2..N+Q+1: Line N+i+1 contains a single integer: T\_i
Output Format
\* Lines 1..Q: For each query, print a single integer that is the index of the note that the cows should be playing.