摘要:
"http://uoj.ac/problem/35" 以前做后缀数组的题直接粘模板。。。现在重新写一下模板 注意用来基数排序的数组一定要开到N。 c++ include include include using namespace std; const int N = 100003; int t1 阅读全文
摘要:
"http://acm.hdu.edu.cn/showproblem.php?pid=3037" Lucas定理模板。 现在才写,noip滚粗前兆QAQ c++ include include include using namespace std; typedef long long ll; in 阅读全文
摘要:
"http://www.lydsy.com/JudgeOnline/problem.php?id=4582" 排好序后用两个指针直接$O(n)$扫,貌似这个东西学名"two pointers"? c++ include include include include using namespace 阅读全文
摘要:
"http://www.lydsy.com/JudgeOnline/problem.php?id=4579" 把时间倒过来,只是加点,并查集维护连通块。 c++ include include include using namespace std; const int N = 200003; st 阅读全文
摘要:
"http://www.lydsy.com/JudgeOnline/problem.php?id=4580" 区间dp,f(i,j)表示区间[i,j]全部合成一个数,这个数是多少。 可以归纳证明[i,j]如果可以合成一个数,那么只能合成这一个数 c++ include include include 阅读全文
摘要:
"http://www.51nod.com/onlineJudge/questionCode.html !problemId=1501" dp求出环状不连续的前缀和,剩下东西都可以算出来,比较繁琐。 时间复杂度$O(n+m)$。 c++ include include include using n 阅读全文