上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页
摘要: A 略B 主要是一定是“YES”的 这个可能有点卡,其次就是尽量对称即可C一直都是从前往后考虑,所以浪费了很多时间 ,后来换个思路,从后面往前考虑 这是破点可以保证if(visit[j]!=-1) j 到 i 这个区间一定是没有被访问过的#include #incl... 阅读全文
posted @ 2018-05-11 19:01 LandingGuys 阅读(89) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=47061. 这题可以暴力直接printf2. 把printBlank 独立起来可以使代码简洁#include using namespace std;void printBlan... 阅读全文
posted @ 2018-05-08 15:45 LandingGuys 阅读(64) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6029hdu 6029 1.有两个选择(1) Add edges between this vertex and all the previous vertices (i.e. fr... 阅读全文
posted @ 2018-05-07 17:21 LandingGuys 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 模板 转自https://blog.csdn.net/starstar1992/article/details/54913261注意 对于cal_next 中 k=next[k] 我的解释:要比较的是0~k+1 和 p-k~ p 前缀和后缀是否相等(这也是next数... 阅读全文
posted @ 2018-05-05 21:02 LandingGuys 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 模板 转自https://blog.csdn.net/nothi/article/details/7739741#include #include #include #include #include using namespace std;const int max... 阅读全文
posted @ 2018-05-04 21:24 LandingGuys 阅读(216) 评论(0) 推荐(0) 编辑
摘要: A. An interesting gameZhouzhou and Dazhongfeng are playing an interesting game. They havesome cards with numbers on them, and all the ... 阅读全文
posted @ 2018-05-03 19:35 LandingGuys 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 本题使用字符串的Hash来解决。将一个字符串看成是一个P进制的数字(可以联想10进制数),那么可以知道每一个字符串都可以被唯一表示(P> 256, 并不考虑高精度)。可是由于字符串的长度比较大,那么我们无法保存如此大的数字。于是使用Hash mod2^64来作为Has... 阅读全文
posted @ 2018-05-01 16:19 LandingGuys 阅读(115) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/u013486414/article/details/42616073 阅读全文
posted @ 2018-04-30 20:54 LandingGuys 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 讲解https://blog.csdn.net/thundermrbird/article/details/52231639代码https://blog.csdn.net/pi9nc/article/details/12250247int n;int weight[M... 阅读全文
posted @ 2018-04-30 18:17 LandingGuys 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 计数排序void Sort(int a[],int& b[],int k){ int c[k]; for(int i=0;i=0;j--) { b[c[a[j]]]=a[j]; c[a[j]]--; }}桶排序用于 数据范围小,... 阅读全文
posted @ 2018-04-29 16:00 LandingGuys 阅读(91) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页