随笔分类 -  贪心

区间调度问题 选择不相交的区间(最多)
摘要:1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 #define LL long long 5 6 using namespace std; 7 8 struct node{ 9 int x,y; 10 }; 11 n 阅读全文

posted @ 2016-04-18 11:44 青春的梦想付诸行动 阅读(220) 评论(0) 推荐(0)

Yougth的最大化
摘要:1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #include <cmath> 5 6 using namespace std; 7 8 #define N 10010 9 10 double w[N],v[N] 阅读全文

posted @ 2016-04-08 19:30 青春的梦想付诸行动 阅读(411) 评论(0) 推荐(0)

疯牛
摘要:1 #include<iostream> 2 #include<algorithm> 3 #include<cmath> 4 #include<cstdio> 5 using namespace std ; 6 typedef long long LL; 7 LL a[101000]; 8 int 阅读全文

posted @ 2016-04-08 11:18 青春的梦想付诸行动 阅读(137) 评论(0) 推荐(0)

阶乘之和
摘要:1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 using namespace std; 5 int s[11]; 6 bool visit[11]; 7 void ans() 8 { 9 for(int i=1; 阅读全文

posted @ 2016-04-07 15:55 青春的梦想付诸行动 阅读(148) 评论(0) 推荐(0)

NYOJ 12 喷水装置(二)
摘要:1 #include<stdio.h> 2 #include<string.h> 3 #include<math.h> 4 #include<algorithm> 5 using namespace std; 6 struct ps 7 { 8 double left;//**左交点**// 9 d 阅读全文

posted @ 2016-04-07 11:54 青春的梦想付诸行动 阅读(224) 评论(0) 推荐(0)

导航