
贪心
Accept_1
这个作者很懒,什么都没留下…
展开
-
CSU2026- Daydreaming Stockbroker(贪心)
题目链接:http://acm.csu.edu.cn/csuoj/problemset/problem?pid=2026题意: 题意就是一个炒股票的过程,给你连续几天的 每一股的价格,你最开始有100块钱,你最多可以买十万份股票,你每一天可以既可以买股票也可以卖股票,求最后最多的钱。思路: 注意longlong就行,简单贪心。代码:#include <iostream&...原创 2018-04-01 23:57:50 · 346 阅读 · 0 评论 -
Cooking Time Gym - 101498F (思维+贪心+优先队列)
题目链接:https://vjudge.net/problem/Gym-101498F题目: While cooking your dinner, you will need n ingredients. Initially, all ingredients are in the refrigerator.You are not allowed to keep more than k i...原创 2018-04-27 21:03:49 · 383 阅读 · 0 评论 -
ZOJ 4028 LIS(贪心)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4028借鉴了一位大佬的博客:https://blog.youkuaiyun.com/V5ZSQ/article/details/80205592Description有一个长度为n的序列a1,…,an,以fi表示以ai结尾的最长严格上升子序列长度,先给出fi和ai的...原创 2018-05-07 21:19:48 · 395 阅读 · 0 评论 -
hdu6438Buy and Resell(贪心+优先队列)
借鉴了两位大佬的博客:https://blog.youkuaiyun.com/liufengwei1/article/details/82054532 https://blog.youkuaiyun.com/xiang_6/article/details/82054463题目链接:http://acm.hdu.edu.cn...原创 2018-08-27 10:21:13 · 216 阅读 · 0 评论