![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心问题
love超1314的专栏
这个作者很懒,什么都没留下…
展开
-
nyoj236心急的c小加
#include#includestruct node{ int l; int w;}s[1005];int cmp(const void *a,const void *b){ if(((struct node *)a)->l!=((struct node *)b)->l) return (((struct node *)a)->l>((struct node *)b)->l原创 2014-08-05 21:26:17 · 547 阅读 · 0 评论 -
nyoj914 yougth最大化
#include#include#include#includeusing namespace std;struct node{ double x, y;}G[10005];double p[10005];int n, k;int Cot(double f){ memset(p, 0, sizeof(p)); int i; double sum = 0; for(i原创 2014-08-05 21:44:23 · 712 阅读 · 0 评论 -
nyoj586 疯牛
#include#include#define N 100005int a[N],n,c;int judge(int x){ int i,count=1,t=a[0]; for(i=1;i<n;i++) if(a[i]-t>=x) { count++;t=a[i]; if(count>=c)//可以放下C头牛 return 1; } re原创 2014-08-06 11:34:28 · 599 阅读 · 0 评论 -
nyoj448 寻找最大数
#include #include int main(){ int k,l,max,z; char s[105],ans[105]; scanf("%d",&z); while(z--) { scanf("%s%d",s,&k); l = strlen(s); for(int i=0,q=-1;i<l-k原创 2014-08-06 19:20:58 · 496 阅读 · 0 评论 -
nyoj 1036
nyoj1036 非洲小孩原创 2014-08-05 10:13:39 · 602 阅读 · 0 评论 -
nyoj14
会场安排问题原创 2014-08-04 22:00:46 · 670 阅读 · 0 评论