摘要: DescriptionFarmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered that although he can't predict the quality of milk from one day to the next, there are some regular patterns in the daily milk quality.To perform a rigoro 阅读全文
posted @ 2014-01-27 22:31 Oyking 阅读(219) 评论(0) 推荐(0) 编辑
摘要: DescriptionA musical melody is represented as a sequence of N (1 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const int MAXN = 20010; 8 int s[MAXN]; 9 int n, sa[MAXN], height[MAXN], rank[MAXN], tmp[MAXN], c[MAXN];10 11 void makesa(int m) {12 memset(c, 0, sizeof(c));13 for(... 阅读全文
posted @ 2014-01-27 19:55 Oyking 阅读(259) 评论(0) 推荐(0) 编辑