上一页 1 ··· 14 15 16 17 18

2017年3月13日

poj3273 (二分穷举)

摘要: 这是一个二分穷举问题,通过二分寻找最小值,不断枚举,但一定要二分结束,否则只要找到m组就结束,不一定是最优解。 阅读全文

posted @ 2017-03-13 11:04 发牌员 阅读(173) 评论(0) 推荐(0)

2017年2月25日

uva10285

摘要: 简单的dfs加dp,搜索每个点的上下左右,然后寻找到每个点的最大长度,这里要注意的是每条路径的起始点和终点不同,所以每个最终点都要找一下最终长度,寻找最大的最终长度。 阅读全文

posted @ 2017-02-25 09:49 发牌员 阅读(207) 评论(0) 推荐(0)

2017年2月19日

uva10340

摘要: #include #include #include #include using namespace std; char str1[101],str2[101]; int set1[26],set2[26]; int main() { while(cin>>str1>>str2) { memset(set1,0,sizeof(set1)); memset... 阅读全文

posted @ 2017-02-19 12:20 发牌员 阅读(131) 评论(0) 推荐(0)

uva201

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h>int main(){ int n,m,t=0; int h[10][10],v[10][10]; while(~scanf("%d%d",&n,&m)) { getchar(); mem 阅读全文

posted @ 2017-02-19 11:55 发牌员 阅读(208) 评论(0) 推荐(0)

uva1587

摘要: #include <stdio.h>#include <stdlib.h> int main(){ int a[8][4],x=0,flag=0,b[20],y=0,z=0,c[20]; while(~scanf("%d%d",&a[x++][0],&a[x][1])) { if(a[0][0]== 阅读全文

posted @ 2017-02-19 11:35 发牌员 阅读(168) 评论(0) 推荐(0)

uva227

摘要: #include <stdio.h>#include <stdlib.h> int main(){ char a[6][7]; int flag=0; while(gets(a[0])) { if(a[0][0]=='Z') break; flag++; for(int i=1; i<5; i++) 阅读全文

posted @ 2017-02-19 11:33 发牌员 阅读(192) 评论(0) 推荐(0)

UVA232

摘要: #include #include #include int main() { char a[12][12],d[110][12]; int b[12][12]; int r,c,con=0; while(~scanf("%d",&r)) { memset(b,0,sizeof(b)); memset(d,0,size... 阅读全文

posted @ 2017-02-19 11:21 发牌员 阅读(132) 评论(0) 推荐(0)

上一页 1 ··· 14 15 16 17 18

导航