• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






渣渣的学习之路

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2015年7月28日

HDU 1452 Happy 2004
摘要: 题目意思:求2004^x的所有正因数的和对29求余解析: 我们用s(x)表示x的因子和: 2的因子为1,2,s(2)=3; 3的因子为1,3,s(3)=4; 6的因子为1,2,3,6,s(6)=12; 可以发现:s(6)=s(2)*s(3)=3*4=12; 4的因子为1,2,4,,s(4... 阅读全文
posted @ 2015-07-28 22:05 xxxxy 阅读(145) 评论(0) 推荐(0)
 

2015年3月27日

邻接表的数组实现
摘要: int n,m;int first[maxn];int u[maxn],v[maxn],w[maxn],next[maxn];void read_graph(){ scanf("%d%d",&n,&m); for(int i=0;i<n;i++)first[i]=-1; for(i... 阅读全文
posted @ 2015-03-27 23:52 xxxxy 阅读(122) 评论(0) 推荐(0)
 
HDU 1233 还是畅通工程
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1233裸的最小生成树,刚学。用的是Kruskal算法#include #include #include const int MAXN=11000;using namespace std;int u[MA... 阅读全文
posted @ 2015-03-27 15:38 xxxxy 阅读(123) 评论(0) 推荐(0)
 

2015年3月26日

HDU 1061 Rightmost Digit
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1061刚刚在百度学的快速幂,学自这里:http://wenku.baidu.com/view/2384ecc02cc58bd63186bdf6.html#include using namespace s... 阅读全文
posted @ 2015-03-26 22:39 xxxxy 阅读(109) 评论(0) 推荐(0)
 

2015年3月24日

HDU 3555 Bomb
摘要: 题目大意:给出一个数n,求0-n之间含有49的数题目链接http://acm.hdu.edu.cn/showproblem.php?pid=3555这是我学的第二道数位dp题了,继续努力向大牛师兄们靠近。。。思路:dp[i][k],i表示一共有i位dp[len][0]表示长度为len时不含49的方案... 阅读全文
posted @ 2015-03-24 17:19 xxxxy 阅读(165) 评论(0) 推荐(0)
 

2015年3月18日

HDU 2089 不要62
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2089排位赛补题的时候遇到数位dp根本不会,先找道简单的写写orz,过了都不知道怎么过的,反正先传上来orzdp[i][j]表示位数为i,最高位为j时不含4和62的数的个数,学自百度文库:http://w... 阅读全文
posted @ 2015-03-18 11:17 xxxxy 阅读(164) 评论(0) 推荐(0)
 

2015年2月16日

HDU 1002 A + B Problem II
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1002简单的高精度加法,没什么说的。#include #include #include #include #include using namespace std;char s1[1000],s2[10... 阅读全文
posted @ 2015-02-16 12:46 xxxxy 阅读(126) 评论(0) 推荐(0)
 

2015年2月13日

HDU 1997 汉诺塔VII
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1997Problem Descriptionn个盘子的汉诺塔问题的最少移动次数是2^n-1,即在移动过程中会产生2^n个系列。由于发生错移产生的系列就增加了,这种错误是放错了柱子,并不会把大盘放到小盘上,... 阅读全文
posted @ 2015-02-13 21:45 xxxxy 阅读(338) 评论(0) 推荐(0)
 
HDU 1443 joseph
摘要: Problem DescriptionThe Joseph\\\\\\\'s problem is notoriously known. For those who are not familiar with the original problem: from among n people, nu... 阅读全文
posted @ 2015-02-13 09:23 xxxxy 阅读(152) 评论(0) 推荐(0)
 
HDU 1568 Fibonacci
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1568思路:用取对数的方法得到小数部分,再取前四位#include #include #include #include using namespace std;int main(){ int fi... 阅读全文
posted @ 2015-02-13 08:40 xxxxy 阅读(128) 评论(0) 推荐(0)
 
下一页