上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 48 下一页
摘要: 题目链接:hdu_5777_domino 题意: 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 const int N=1e5+7; 5 int a[N],t,n,k; 6 int main(){ 7 scanf("%d",&t); 8 w 阅读全文
posted @ 2016-07-30 22:55 bin_gege 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 题目链接:hdu_5768_Lucky7 题意: 给你一个区间,问你这个区间内是7的倍数,并且满足%a[i]不等于w[i]的数的个数 乍一看以为是数位DP,仔细看看条件,发现要用中国剩余定理,然后容斥一下就出答案了,不过这里在中国剩余定理里面的乘法会有数据爆long long ,所有要写一个高精度乘 阅读全文
posted @ 2016-07-30 16:12 bin_gege 阅读(156) 评论(0) 推荐(0) 编辑
摘要: D. Road to Post Office time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output D. Road to Post Of 阅读全文
posted @ 2016-07-30 01:41 bin_gege 阅读(156) 评论(0) 推荐(0) 编辑
摘要: B. Powers of Two time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output B. Powers of Two time l 阅读全文
posted @ 2016-07-30 01:35 bin_gege 阅读(290) 评论(0) 推荐(0) 编辑
摘要: C. Cellular Network time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You are given n poin 阅读全文
posted @ 2016-07-30 01:17 bin_gege 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 题目链接:hdu_5773_The All-purpose Zero 题意: 给你一串数,让你求LIS,不过这里的0可以改变为任意数 题解: 官方题解讲的很清楚 1010 The All-purpose Zero 0可以转化成任意整数,包括负数,显然求LIS时尽量把0都放进去必定是正确的。因此我们可 阅读全文
posted @ 2016-07-29 15:21 bin_gege 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目链接:hdu_5775_Bubble Sort 题意: 让你找每一个数在冒泡排序中最右边和最左边的位置的差值 题解: 还是官方题解,讲的已经很清楚了 1012 Bubble Sort 考虑一个位置上的数字c在冒泡排序过程的变化情况。c会被其后面比c小的数字各交换一次,之后c就会只向前移动。数组从 阅读全文
posted @ 2016-07-29 11:08 bin_gege 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 题目链接:hdu_5763_Another Meaning 题意: 一个文本串A,一个模式串B,如果文本串含有模式串B,那么就能组合成多种意思,如下: In the first case, “ hehehe” can have 3 meaings: “*he”, “he*”, “hehehe”. I 阅读全文
posted @ 2016-07-28 18:50 bin_gege 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 题目链接:hdu_2243_考研路茫茫——单词情结 题意: 让你求包含这些模式串并且长度不小于L的单词种类 题解: 这题是poj2788的升级版,没做过的强烈建议先做那题。 我们用poj2778的方法可以求出不包含这些单词的,然后算出全部种类数,相减就是答案 全部种类数的公式为f[n]=1 + 26 阅读全文
posted @ 2016-07-27 15:47 bin_gege 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 题目链接:poj_2778_DNA Sequence 题意: 有m个模式串,然后给你一个长度n,问你n长度的DNA序列有多少种不包含这m个模式串 题解: 这题显然要用AC自动机,将模式串的AC自动机建好后,再构建矩阵,矩阵的含义是自动机中0~tot的节点走一步到0~tot的节点的方案数,然后要走n步 阅读全文
posted @ 2016-07-27 13:16 bin_gege 阅读(129) 评论(0) 推荐(0) 编辑
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 48 下一页