上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: //分析:明显的树形关系,题目描述的是一棵高 n + 1的完全二叉树,则 dp[树层号][team号](规定最底层为 0 层,层数朝节点的方向依次递增),推一下就好了//稍微需要想一下的是比赛双方的选取,下面给出两种方法//#1 枚举起点划分team区间 1 #include "iostream" ... 阅读全文
posted @ 2015-02-17 18:58 AC_Phoenix 阅读(153) 评论(0) 推荐(0)
摘要: //dp[i][state]//状态转移方程的选取:题目的意思是,从点 i 优先考虑到达 i + A 点的情况,若不能到达 i + A 点,则考虑到达 i + A + 1 点的情况...以此类推,直到考虑完到达 i + B 点的情况。对于最坏的情况,每一个点都有 B - A + 1 个后继点,所以由... 阅读全文
posted @ 2015-02-17 16:52 AC_Phoenix 阅读(224) 评论(0) 推荐(0)
摘要: //下面是错误代码... 1 #include "iostream" 2 #include "cstdio" 3 #include "cstring" 4 #include "algorithm" 5 #include "cmath" 6 using namespace std; 7 const d... 阅读全文
posted @ 2015-02-13 23:05 AC_Phoenix 阅读(155) 评论(0) 推荐(0)
摘要: //poj 2151 概率dp 1 #include "iostream" 2 #include "cstdio" 3 #include "cstring" 4 #include "algorithm" 5 using namespace std; 6 double dp[33][33]; 7 i... 阅读全文
posted @ 2015-02-13 20:55 AC_Phoenix 阅读(136) 评论(0) 推荐(0)
摘要: //CodeForces 385C素数朴素筛法,穷尽数的素数因子 1 #include "iostream" 2 #include "cstdio" 3 #include "cstring" 4 #include "algorithm" 5 using namespace std; 6 const ... 阅读全文
posted @ 2015-02-12 18:49 AC_Phoenix 阅读(667) 评论(0) 推荐(0)
摘要: //CodeForces 234F 1 #include "iostream" 2 #include "cstdio" 3 #include "cstring" 4 #include "algorithm" 5 using namespace std; 6 const int INF = 0x3f3... 阅读全文
posted @ 2015-02-12 17:34 AC_Phoenix 阅读(243) 评论(0) 推荐(0)
摘要: //CodeForces 232B//原先 T 了的代码 1 #include "iostream" 2 #include "cstdio" 3 #include "cstring" 4 #include "algorithm" 5 using namespace std; 6 const int ... 阅读全文
posted @ 2015-02-11 18:43 AC_Phoenix 阅读(229) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2015-02-11 17:24 AC_Phoenix 阅读(10) 评论(0) 推荐(0)
摘要: //CodeForces314C//分析:相当于求给定序列的不降子序列的个数,从一个空序列开始将得到的不降子序列不断的延长是典型的做法,则dp[i]表示以第 i 个元素结尾的序列//思路:O(n^2) 的做法,dp[i] = sum(dp[j]]) (a[j] = 1; i -= lowbit(i)... 阅读全文
posted @ 2015-02-11 17:10 AC_Phoenix 阅读(182) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2015-02-10 23:15 AC_Phoenix 阅读(3) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 下一页