CF A. Feed with Candy (贪心算法模拟题)
摘要:http://codeforces.com/contest/436/problem/Atime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe h...
阅读全文
HDU1789 贪心
摘要:题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1789Doing Homework againTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4877Accepted Submission(s): 2852Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of
阅读全文
hdu—1009贪心算法
摘要:第一道贪心算法 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1009#include #include #include #include using namespace std;struct node{ double x,y; double rate;}f[100000];int cmp(node a,node b){ return a.rate>b.rate;}int main(){ int n,m; int i,k; //int j[1005],f[1005]; while(scanf("%d%d...
阅读全文