摘要:1。Splay.题目链接2。树链剖分3。LCT
阅读全文
摘要:题目链接最后一题是Splay...还没有学会。。蒟蒻!!!A 1 /************************************************************************* 2 > File Name: A.cpp 3 > Author: S...
阅读全文
摘要:1 //poj3580 2 //#pragma comment(linker,"/STACK:102400000,102400000") 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include ...
阅读全文
摘要:题目链接Connections between citiesTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5037Accepted Submis...
阅读全文
摘要:题目链接In a rooted tree, thelowest common ancestor(or LCA for short) of two verticesuandvis defined as the lowest vertex that is ancestor of both that tw...
阅读全文
摘要:题目链接很遗憾。看到第五题的通过人数就不敢做了。待日后补上。A题求最长的连续子序列,使得他们满足gcd为1。如果有相邻的两个数的gcd为1,那么整个序列的gcd值也就是1,否则就是该序列不存在。 1 /*************************************************...
阅读全文
摘要:题目链接D. Fedor and Essaytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter you had helped Fedor...
阅读全文
摘要:比赛链接A题1 -- Enter your code here. Read input from STDIN. Print output to STDOUT2 main = do3 x [y]++[x]++acc) [] $ zip x yB题1 -- Enter your code he...
阅读全文
摘要:这套题目只做了几个相对简单的。其他的做起来比较吃力。A找下规律 1 /************************************************************************* 2 > File Name: A.cpp 3 > Author: ...
阅读全文
摘要:A题模拟 1 T = int(input()) 2 while T: 3 T -= 1 4 s = raw_input() 5 n = len(s) 6 res, pre = 0, 0 7 for i in xrange(1, n): 8 if...
阅读全文
摘要:题目链接Hdu4135Co-primeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1412Accepted Submission(s): 531...
阅读全文
摘要:题目链接Alice and BobTime Limit:6000/3000MS (Java/Others)Memory Limit:256000/128000KB (Java/Others)SubmitStatisticNext ProblemProblem DescriptionHere is A...
阅读全文
摘要:题目链接Yet another game from chef. Chef gives youNcards andMbags. Each of theNcards has an integer written on it. Now chef asks you to close your eyes an...
阅读全文
摘要:题目链接The kth numberTime Limit:12000/6000MS (Java/Others)Memory Limit:128000/64000KB (Java/Others)SubmitStatisticNext ProblemProblem DescriptionDo you s...
阅读全文
摘要:题目链接How far away ?Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5491Accepted Submission(s): 2090...
阅读全文
摘要:题目链接Earthquake in Bytetown! Situation is getting out of control!All buildings in Bytetown stand on straight line. The buildings are numbered0, 1, ...,...
阅读全文
摘要:题目链接Some scientists are working on protein recombination, and during their research, they have found a remarkable fact: there are 4 proteins in the pr...
阅读全文
摘要:A题简单模拟。 1 /************************************************************************* 2 > File Name: A.cpp 3 > Author: Stomach_ache 4 > Mai...
阅读全文