摘要: KMP C++ include include void get_next(char p,int next){ int pLen = strlen(p); next[0] = 1; int k = 1,j = 0; while(j 阅读全文
posted @ 2018-06-08 11:29 asakuras 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/contest/988/problem/D 题意:给n个互不相同的数,在里面选取一些数组成集合,满足集合内的数任意两两绝对值之差是2的幂,求这个集合能构成的最多元素个数并分别输出。 题解:可以证明这个集合最大是3。假设三个数a,b,c能构成这个集 阅读全文
posted @ 2018-06-08 11:00 asakuras 阅读(166) 评论(0) 推荐(0) 编辑