
acm—贪心
iwillsucceed555
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
最有转载问题!!
<br />#include<stdio.h><br />#include<algorithm> <br />using namespace std;<br />#define SIZE 100<br />struct cc{int num;int w;bool flag;}a[SIZE];<br />//w为每吨货物重量!!! <br />bool comp(cc x,cc y){return x.w<y.w;}<br />bool pare(cc x,cc y){return x.num<y.num;}原创 2010-08-10 19:05:00 · 332 阅读 · 0 评论 -
hdoj2037
<br />#include<iostream><br />#include<algorithm><br />using namespace std;<br />struct c{<br />int star;<br />int end;<br />}d[102]; <br />bool comp(c m,c n){<br /> return m.end<n.end;}<br />int main(){<br /> int n;<br /> while(scanf("%d",&n),n){<br /> i原创 2010-08-10 18:58:00 · 474 阅读 · 0 评论 -
部分背包问题模板
<br />#include<stdio.h><br />#include<algorithm><br />using namespace std;<br />#define SIZE 100<br />struct aa{<br /> double w;<br /> double v;<br /> // bool operator<(aa& B){return (this->v)/(this->w)<B.v/B.w;}<br /> }a[SIZE];<br /原创 2010-08-10 19:02:00 · 638 阅读 · 0 评论 -
joj1039
<br />#include<iostream><br />using namespace std;<br />int p[201];//四百个房间对应着200个走廊段;相对着的的两个房间共用一个走廊段!!!不可同时用;<br />int main(){<br /> int t;<br /> while(cin>>t){<br /> int s,e;<br /> while(t--){<br /> int n; int i;<br /> while(n--){<br /> memset(p,原创 2010-08-10 18:57:00 · 362 阅读 · 0 评论 -
poj2376
<br />#include<stdio.h><br />#include<algorithm><br />using namespace std;<br />struct cow{<br />int star;<br />int end;}a[25002];<br />bool comp(cow a,cow b){<br /> return a.star<b.star;<br />}<br />int main(){<br /> <br /> int n,t;<br /> while(scanf(原创 2010-08-10 18:59:00 · 429 阅读 · 0 评论