牛勒比海盗(洛谷P2910 [USACO08OPEN]Clear And Present Danger S)
题目描述FarmerJohnisonaboatseekingfabledtreasureononeoftheN(1<=N<=100)islandsconvenientlylabeled1..NintheCowribbeanSea.ThetreasuremaptellshimthathemusttravelthroughacertainsequenceA_1,A_2,...,A_MofM(2<=M<