摘要: codeforces 893D Credit Card 题目大意: 有一张信用卡可以使用,每天白天都可以去给卡充钱。到了晚上,进入银行对卡的操作时间,操作有三种: 1.$a_i 0$ 银行会给卡充入$a_i$元 2.$a_i d$,那么说明通过充钱调节,将最大值回到$d$。最后输出去银行的次数。 代 阅读全文
posted @ 2017-11-26 23:05 lemonsbiscuit 阅读(422) 评论(0) 推荐(0) 编辑
摘要: hdoj 4325 Flowers 题目链接: [http://acm.hdu.edu.cn/showproblem.php?pid=4325][f9fc1a32] 思路: 直接线段树,按照花的开放区间的大小建树,要注意虽然花的周期数据可能会达到1e9,这样的话线段树开四倍时不可能的。但是我们可以看 阅读全文
posted @ 2017-11-26 16:15 lemonsbiscuit 阅读(266) 评论(0) 推荐(0) 编辑
摘要: poj 2528 Mayor's posters 题目链接: [http://poj.org/problem?id=2528][f011568f] 思路: 线段树+离散化技巧(这里的离散化需要注意一下啊,题目数据弱看不出来) 假设给出: 1~10 1~4 7 10 最后可以看见三张海报 如果离散化的 阅读全文
posted @ 2017-11-26 14:33 lemonsbiscuit 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 893C Rumor 思路: 前向星+DFS 代码: c++ include using namespace std; define _for(i,a,b) for(int i=(a); i n m; _rep(i,1,n) cin w[i]; _rep(i,1,m) { cin u v; add( 阅读全文
posted @ 2017-11-26 00:05 lemonsbiscuit 阅读(322) 评论(2) 推荐(0) 编辑
摘要: 893B Beautiful Divisors 思路: 打表 代码: 阅读全文
posted @ 2017-11-26 00:03 lemonsbiscuit 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 893A Chess For Three 思路: 直接模拟即可,第一盘永远是A与B开始 代码: c++ include using namespace std; define _for(i,a,b) for(int i=(a); i n; _rep(i,1,3) a[i]=i; _rep(i,1,n 阅读全文
posted @ 2017-11-26 00:01 lemonsbiscuit 阅读(191) 评论(0) 推荐(0) 编辑