- 博客(6)
- 收藏
- 关注
原创 快速幂 矩阵快速幂模板
【快速幂】O(logn)时间复杂度int qpow(int base, int n){ int ans = 1; while(n) { if(n&1) ans*=base; base = base * base; n/=2; } return ans;}【矩阵快速幂】 该算法只适用于...
2018-09-18 16:54:45 1401
原创 Poor God Water (矩阵快速幂模板)
God Water likes to eat meat, fish and chocolate very much, but unfortunately, the doctor tells him that some sequence of eating will make them poisonous.Every hour, God Water will eat one kind of fo...
2018-09-18 16:49:57 431
原创 浅谈KMP(模板)
S 表示原字符串,T 表示目标串(模式串),我们要在S 中搜索T。令 S[0..m-1] = abcabcabdabba, T[0..n-1] = abcabd。1,Naive 算法字符串匹配的naive 算法时O(n^2) 的:2,Naive 算法的问题与进化naive 算法的最大问题是,当一轮匹配过后,模式串T 又从头开始,实际上这回造成很多不必要的比较。我们看下面的情况:...
2018-09-18 16:36:57 179
原创 Features Track (STL瞎搞)
Morgana is learning computer vision, and he likes cats, too. One day he wants to find the cat movement from a cat video. To do this, he extracts cat features in each frame. A cat feature is a two-dime...
2018-09-09 21:01:26 198
原创 Ryuji doesn't want to study (树状数组)
Ryuji doesn't want to studyRyuji is not a good student, and he doesn't want to study. But there are n books he should learn, each book has its knowledgea[i].Unfor...
2018-09-09 20:24:54 206
原创 A Path Plan(非降路径和Lindström–Gessel–Viennot定理)
A Path Plan 时间限制: 1 Sec 内存限制: 128 MB ...
2018-09-05 20:27:47 477
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人