摘要: #include #include #define MN 100000 using namespace std; #define O(a) freopen(a".in","r",stdin);freopen(a".out","w",stdout); #define ct register int #define f(c) for(ct i=1;i'9';c=getchar())if... 阅读全文
posted @ 2017-10-27 11:30 yodel 阅读(180) 评论(0) 推荐(0)
摘要: #include #include #define init(a) freopen(a".in","r",stdin);freopen(a".out","w",stdout); using namespace std; int T,n,m;char s[30010],t[30010]; int main(){init("string"); int i,j,k,l,u;scanf(... 阅读全文
posted @ 2017-10-22 22:30 yodel 阅读(171) 评论(0) 推荐(0)
摘要: 关于前向星 前向星是一种特殊的边集数组,我们把边集数组中的每一条边按照起点从小到大排序,如果起点相同就按照终点从小到大排序, 并记录下以某个点为起点的所有边在数组中的起始位置和存储长度,那么前向星就构造好了. 用len[i]来记录所有以i为起点的边在数组中的存储长度. 用head[i]记录以i为边集 阅读全文
posted @ 2017-10-22 17:52 yodel 阅读(209) 评论(0) 推荐(0)
摘要: 介绍 高精度运算,是指参与运算的数(加数,减数,因子……)范围大大超出了标准数据类型(整型,实型)能表示的范围的运算。例如,求两个200位的数的和。这时,就要用到高精度算法了。 思想 就是将要参与运算的数以字符串的形式输入,将其倒着存入数组(即个位存在1位),然后用小学二年级数学的列式计算思想算出答 阅读全文
posted @ 2017-10-21 18:36 yodel 阅读(255) 评论(0) 推荐(0)
摘要: 背景: 思路: 通过前缀和后缀的思路列出一张《部分匹配表》(Partial Match Table) 使用《部分匹配表》提高字符串匹配的效率 一个简单的想法: 一般人匹配字符串都是一位一位匹配的,怎么说呢,就是从主串的第一个位置开始,将主串与子串长度相同的每一位进行比较,若有一位不同,就跳到主串的第 阅读全文
posted @ 2017-10-08 16:58 yodel 阅读(401) 评论(0) 推荐(1)
摘要: well the code is the best language. I think my explain is quite understandable ,if you can't understand ,you can contact me. 阅读全文
posted @ 2017-10-06 12:01 yodel 阅读(238) 评论(0) 推荐(0)
摘要: well,the code is the best language well,the code is the best language well ,the code is the best language 阅读全文
posted @ 2017-10-05 13:30 yodel 阅读(198) 评论(1) 推荐(0)
摘要: #include #define INF 0x3f3f3f3f #define init(a) freopen(a".in","r",stdin);freopen(a".out","w",stdout); #define mm(a,b) memset(a,b,sizeof(a)) #define fr(i,a,b) for(int i=a;i'9';c=getchar())if... 阅读全文
posted @ 2017-10-02 13:35 yodel 阅读(187) 评论(0) 推荐(0)
摘要: well,the code is the best language. well,the code is the best language well,the code is the best language. 阅读全文
posted @ 2017-10-02 13:32 yodel 阅读(165) 评论(0) 推荐(0)
摘要: 题目背景 在双人对决的竞技性比赛,如乒乓球、羽毛球、国际象棋中,最常见的赛制是淘汰赛和循环赛。前者的特点是比赛场数少,每场都紧张刺激,但偶然性较高。后者的特点是较为公平,偶然性较低,但比赛过程往往十分冗长。 本题中介绍的瑞士轮赛制,因最早使用于1895年在瑞士举办的国际象棋比赛而得名。它可以看作是淘 阅读全文
posted @ 2017-10-01 22:15 yodel 阅读(466) 评论(0) 推荐(1)