上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要: 题目:http://poj.org/problem?id=1789大意:每个卡车都有自己的编号,由七位字母组成d(to,td) is the distance of the types指t0 和 td卡车编号字母不同的个数,即点t0和点td的权最好得衍生方案是是的总权值最小,即最小生成树用的primView Code #include <iostream>#include<cstdio>#include<cstring>#define inf 0x7fffffffusing namespace std;char str[2005][7];int map[20 阅读全文
posted @ 2012-12-03 20:46 琳&leen 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 1049 1050 1057 1062 1063 1064 1070 1073 1075 1082 1083 1084 1088 1106 1107 1113 1117 1119 1128 1129 1144 1148 1157 1161 1170 1172 1177 1197 1200 1201 1202 1205 1209 1212(大数取模) 1216(链表)1218 1219 1225 1228 阅读全文
posted @ 2012-10-25 17:48 琳&leen 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1058st[i]=min{st[a]*2,st[b]*3,st[c]*5,st[d]*7}View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 using namespace std; 5 int main() 6 { 7 long int n; 8 long int st[5850]; 9 long int a=1,b=1,c=1,d=1,small,i;10 st[1]=1 阅读全文
posted @ 2012-10-25 17:43 琳&leen 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1051View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 using namespace std; 6 typedef struct node 7 { 8 int x,y; 9 int flag;10 }sut;11 bool cmp(sut a,sut b)12 {13 if(a.x!=b.x)14 return a. 阅读全文
posted @ 2012-10-25 16:46 琳&leen 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1025View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #define maxn 500010 5 using namespace std; 6 int a[maxn]; 7 int b[maxn];//存储序列长度为len的第i小的数中最小的数 8 int dp[maxn]; 9 int chazhao(int x,int l,int r)//查找第i-1的长度序列中,结 阅读全文
posted @ 2012-10-19 21:13 琳&leen 阅读(119) 评论(0) 推荐(0) 编辑
摘要: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1756View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 #include<stdlib.h> 6 using namespace std; 7 char str[100010][101 阅读全文
posted @ 2012-09-05 20:18 琳&leen 阅读(133) 评论(0) 推荐(0) 编辑
摘要: http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2371View Code 1 #include <iostream> 2 #include<cstdio> 3 using namespace std; 4 long int a[1005][1005]; 5 int main() 6 { 7 int n,flag,i,j; 8 while(~scanf("%d",&n)) 9 {10 if(n==0)11 break;12 fo... 阅读全文
posted @ 2012-08-28 23:06 琳&leen 阅读(146) 评论(0) 推荐(0) 编辑
摘要: http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2427View Code 1 #include <iostream> 2 #include <cstring> 3 #include <algorithm> 4 #include <cstdio> 5 #define MAX 20001 6 using namespace std; 7 8 struct node 9 { 10 int li; 11 int num; 12 }st[MAX*4];/ 阅读全文
posted @ 2012-08-27 22:14 琳&leen 阅读(126) 评论(0) 推荐(0) 编辑
摘要: http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2430题意:大概是有n个柱子,每个的长度是1到h[i]任意一个整数,用一根绳子把这些柱子的顶端都连起来,使得绳子长度最长。View Code 1 #include <iostream> 2 #include<math.h> 3 #include<cstdio> 4 #include<cstring> 5 using namespace std; 6 int main() 7 { 8 double 阅读全文
posted @ 2012-08-27 19:46 琳&leen 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2420代码:View Code 1 #include<stdio.h> 2 struct node 3 { 4 int x; 5 int l1;//记录i点左面1的数目 6 int l2;//记录i点左面2的数目 7 }a[30010]; 8 int main() 9 {10 int i,n,max,sum;11 scanf("%d",&n);12 a[0].l1=0;13 a[0].l2... 阅读全文
posted @ 2012-08-22 21:10 琳&leen 阅读(137) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页