Youtube
N students are bored in computer class so they watch funny video clips on YouTube. The site contains K popular clips, numbered 1 through K. When a video clip is watched, a list of similar video clips is displayed on the side. Every student picks a video clip from the main page and starts watching it. After exactly one minute every student gets bored of his or her video clip, so he opens the first video clip from the list of similar clips on the side (even if he already watched that clip). Write a program that determines for each student which video clip he will be watching during the M-th minute of the class.
video clip.
Input:
4 5 2
1 2 4 3
5 5 1 2 3 Output :
5 5 2 1Input:
2 6 5
1 6
2 3 4 1 4 5 Output:
1 2 Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.