摘要: 完全背包 难点:输出方案 wa点:m的范围在一次dp后,出现变化,导致re #include<cstdio> #include<cstdlib> using namespace std; int m,n; const int N=103,M=1000003; int a[N],b[N]; int f 阅读全文
posted @ 2019-11-02 15:09 心若笺诗 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 总觉得模拟题其实没有什么思路好写, 就收藏一下自己觉得好的题吧 #include<cstdio> #include<cstdlib> #include<algorithm> #define dd double using namespace std; int n,k,m; const int N=1 阅读全文
posted @ 2019-11-02 11:24 心若笺诗 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 记一次惨痛的刷题经历, bfs: 首先,我从1 -> [i,j] 推step, 看起来很理想,实际上无用状态一大...... 还忽略了3n+1数的奇妙轨迹问题...... 所以这种数列还是不要反着推了,,太玄学 正着打表: 问题同上,不停的超出i,j范围, 还因为re时不时出现负数 正解: 部分记忆 阅读全文
posted @ 2019-11-02 11:23 心若笺诗 阅读(149) 评论(0) 推荐(0) 编辑