贪心问题
love超1314的专栏
这个作者很懒,什么都没留下…
展开
-
nyoj236心急的c小加
#include #include struct 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 · 541 阅读 · 0 评论 -
nyoj914 yougth最大化
#include #include #include #include using 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 · 706 阅读 · 0 评论 -
nyoj586 疯牛
#include #include #define N 100005 int 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 · 586 阅读 · 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 · 491 阅读 · 0 评论 -
nyoj 1036
nyoj1036 非洲小孩原创 2014-08-05 10:13:39 · 596 阅读 · 0 评论 -
nyoj14
会场安排问题原创 2014-08-04 22:00:46 · 665 阅读 · 0 评论