01 2014 档案

摘要:DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponentiation by a non-negative integer is defined in the normal way: a^0 = " 阅读全文
posted @ 2014-01-31 17:56 Oyking 阅读(1778) 评论(0) 推荐(1)
摘要:The “U.S. Robots” HQ has just received a rather alarming anonymous letter. It states that the agent from the competing «Robots Unlimited» has infiltrated into “U.S. Robotics”. «U.S. Robots» security service would have already started an undercover operation to establish the agent 阅读全文
posted @ 2014-01-29 23:08 Oyking 阅读(346) 评论(0) 推荐(0)
摘要:Given a string, we need to find the total number of its distinct substrings.InputT- number of test cases. T 2 #include 3 #include 4 #include 5 using namespace std; 6 typedef long long LL; 7 8 const int MAXN = 50010; 9 10 int sa[MAXN], c[MAXN], rank[MAXN], height[MAXN], tmp[MAXN];11 char s[MAXN];... 阅读全文
posted @ 2014-01-29 21:28 Oyking 阅读(386) 评论(0) 推荐(0)
摘要: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 阅读(224) 评论(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 阅读(260) 评论(0) 推荐(0)
摘要:DescriptionThe funny stone game is coming. There arenpiles of stones, numbered with0, 1, 2,...,n- 1. Two persons pick stones in turn. In every turn, each person selects three piles of stones numberedi,j,k(i 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const int MAXN = 23; 8 9 int... 阅读全文
posted @ 2014-01-25 19:39 Oyking 阅读(661) 评论(0) 推荐(0)

点击右上角即可分享
微信分享提示