会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
AC_Phoenix
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
5
6
7
8
9
2015年2月10日
CodeForce 18D - Seller Bob 一题写残了的 大数
摘要: //CodeForce18D - Seller Bob 1 #include"iostream" 2 #include"cstdio" 3 #include"cstring" 4 #include"algorithm" 5 using namespace std; 6 int num[2010][7...
阅读全文
posted @ 2015-02-10 18:21 AC_Phoenix
阅读(149)
评论(0)
推荐(0)
2015年2月8日
CodeForces 132C dp
摘要: //CodeForces 132C之前 wa 在 test 16 上的写法今天突发奇想改了改竟然过了......也就是说我这么找的状态也是可以的?!!! 1 #include"iostream" 2 #include"cstdio" 3 #include"cstring" 4 #include"al...
阅读全文
posted @ 2015-02-08 16:16 AC_Phoenix
阅读(219)
评论(0)
推荐(0)
2015年2月6日
CodeForces 264B 一道做法不像 dp 的 dp 题
摘要: //CodeForces 264B//分析:在数列上的 dp,选取前缀集合的大小作为下标很容易构造出一个 O(n^2) 的 dp,i > j,if(ans[i]与ans[j]之间具有相同的素因子) dp[i] = max(dp[j]+1),不过 n 有100000那么大,于是继续优化,dp[i]表示...
阅读全文
posted @ 2015-02-06 15:36 AC_Phoenix
阅读(181)
评论(0)
推荐(0)
2015年2月5日
CodeForces 132C 一道简单 dp
摘要: //CodeForces 132C 1 #include"iostream" 2 #include"cstdio" 3 #include"cstring" 4 #include"algorithm" 5 using namespace std; //状态可达dp,其实 bool dp[110]...
阅读全文
posted @ 2015-02-05 18:51 AC_Phoenix
阅读(348)
评论(0)
推荐(1)
2015年2月4日
一题简单数学 + CodeForces 24A 一题简单dfs
摘要: //CodeChef RRMATRIX//分析:(x-1)*m+y == (y-1)*n+x ==> (x-1)*(m-1) == (y-1)*(n-1) ==> (x-1) == (y-1)*(n-1)/(m-1);(n-1)/(m-1)约分后分母还剩余一个(m-1)/gcd(n-1,m-1),(...
阅读全文
posted @ 2015-02-04 16:58 AC_Phoenix
阅读(215)
评论(0)
推荐(0)
2015年2月2日
poj 3666 Making the Grade & zoj 3512 Financial Fraud 左偏树 or dp
摘要: //poj 3666//分析:只是在2005年集训队论文黄源河提到的题目上略微有一点点变化 1 #include"iostream" 2 #include"cstdio" 3 using namespace std; 4 const int maxn = 2100; 5 int v[maxn],l[...
阅读全文
posted @ 2015-02-02 21:47 AC_Phoenix
阅读(351)
评论(0)
推荐(0)
2015年2月1日
poj 3016 K-Monotonic 左偏树 + 贪心 + dp
摘要: //poj 3016 K-Monotonic//分析:与2005年集训队论文黄源河提到的题目类似,给定序列a,求一序列b,b不减,且sigma(abs(ai-bi))最小。//思路:去除左偏树(大根堆)一半的节点(向上取整),让左偏树的根节点上存放中位数;每个左偏树的根节点表示一个等值区间//在本题...
阅读全文
posted @ 2015-02-01 21:31 AC_Phoenix
阅读(573)
评论(1)
推荐(0)
2015年1月31日
种类并查集 + 离散化
摘要: //http://acm.timus.ru/problem.aspx?space=1&num=1003//分析:树和递归最常用的思想是分治;并查集是一种合并树的数据结构;合并树或加入树节点时,我们只在意新建立的树边上相邻的两个树节点之间的关系,实际上树边只在意相邻两个树节点之间的关系//思路:可以讲...
阅读全文
posted @ 2015-01-31 21:31 AC_Phoenix
阅读(493)
评论(0)
推荐(0)
上一页
1
···
5
6
7
8
9
公告