|Online Judge||Problem Set||Authors||Online Contests||User|
Fatigued by the endless toils of farming, Farmer John has decided to try his hand in the MP3 player market with the new iCow. It is an MP3 player that stores N songs (1 ≤ N ≤ 1,000) indexed 1 through N that plays songs in a "shuffled" order, as determined by Farmer John's own algorithm:
Determine the first T songs (1 ≤ T ≤ 1000) that are played by the iCow.
* Line 1: Two space-separated integers: N and T
* Lines 1..T: Line i contains a single integer that is the i-th song that the iCow plays.
3 4 10 8 11
3 1 2 3
[Submit] [Go Back] [Status] [Discuss]
Home Page Go Back To top
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator