摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 typedef struct minheap *Heap; 8 struct minheap 9 { 10 int last,max; 11 int data[60001]; 12 char str[60001][100]; 13 int para[6001]; 14 }Minheap; 15 16 void HeapInset(int x,Heap H,char s[],int pa) 17 { ... 阅读全文
posted @ 2013-12-23 21:30 陈泽泽 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Task:1、背包问题2、DP问题3、搜索问题From:2013-12-21 22:54:05 阅读全文
posted @ 2013-12-21 22:54 陈泽泽 阅读(178) 评论(0) 推荐(0) 编辑
摘要: find your present (2)Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/1024 K (Java/Others) Total Submission(s): 13802 Accepted Submission(s): 5194 Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, 阅读全文
posted @ 2013-12-20 22:48 陈泽泽 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 int func(int n,int k) 3 { 4 int a,b=0; 5 a=n; 6 while(a!=0) 7 { 8 b+=a%k; 9 a=a/k;10 }11 return b;12 }13 int main()14 {15 int a,b,n;16 while(scanf("%d",&n)!=EOF&&n)17 {18 int x1,x2,x3,x4;19 x1=func(n,10);20 ... 阅读全文
posted @ 2013-12-20 22:10 陈泽泽 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Train Problem ITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 17589 Accepted Submission(s): 6571 Problem DescriptionAs the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(bec 阅读全文
posted @ 2013-12-19 16:28 陈泽泽 阅读(279) 评论(0) 推荐(0) 编辑
摘要: Description Input Output Sample Input Sample Output 模拟栈算法: 阅读全文
posted @ 2013-12-19 15:28 陈泽泽 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 98523032013-12-18 11:47:01Accepted13010MS264K1117 BC++泽泽Jungle RoadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3835 Accepted Submission(s): 2797 Problem DescriptionThe Head Elder of the tropical island of Lagrishan has a problem. A burst of 阅读全文
posted @ 2013-12-18 11:49 陈泽泽 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 还是畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 21620 Accepted Submission(s): 9631 Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input测试输入包含若干测试用例。每 阅读全文
posted @ 2013-12-18 11:07 陈泽泽 阅读(260) 评论(0) 推荐(0) 编辑
摘要: HDOJ 题目分类//分类不是绝对的//"*" 表示好题,需要多次回味//"?"表示结论是正确的,但还停留在模块阶 段,需要理解,证明。//简单题看到就可以敲的1000: 入门用;1001: 用高斯求和公式要防溢出1004:1012:1013: 对9取余好了1017:1021:1027: 用STL中的next_permutation()1029:1032:1037:1039:1040:1056:1064:1065:1076: 闰年1084:1085:1089,1090,1091,1092,1093,1094, 1095, 1096:全是A+B1108:1 阅读全文
posted @ 2013-12-17 20:21 陈泽泽 阅读(957) 评论(0) 推荐(0) 编辑
摘要: 畅通工程再续Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 11783 Accepted Submission(s): 3596 Problem Description相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛 阅读全文
posted @ 2013-12-17 19:48 陈泽泽 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 最短路Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 24454 Accepted Submission(s): 10531 Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行是两个整数N、M(N 2 #i 阅读全文
posted @ 2013-12-17 19:10 陈泽泽 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 畅通工程续Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 22100 Accepted Submission(s): 7701 Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。Input本题 阅读全文
posted @ 2013-12-17 18:08 陈泽泽 阅读(261) 评论(0) 推荐(0) 编辑
摘要: Bus SystemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5709 Accepted Submission(s): 1449 Problem DescriptionBecause of the huge population of China, public transportation is very important. Bus is an important transportation method in traditio 阅读全文
posted @ 2013-12-17 17:20 陈泽泽 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Eddy's pictureTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5797 Accepted Submission(s): 2913 Problem DescriptionEddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his 阅读全文
posted @ 2013-12-17 15:55 陈泽泽 阅读(501) 评论(0) 推荐(0) 编辑
摘要: Constructing RoadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 11894 Accepted Submission(s): 4496 Problem DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect 阅读全文
posted @ 2013-12-17 15:30 陈泽泽 阅读(289) 评论(0) 推荐(0) 编辑