symons

___________每一天都是幸福的!!

  博客园  ::  :: 新随笔  ::  :: 订阅 订阅  :: 管理
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 22 下一页

2013年5月16日

摘要: http://hi.baidu.com/cangshulou/item/2b688dce7b86fd24a1b50a5a用完搞定了。 阅读全文
posted @ 2013-05-16 18:02 symons 阅读(177) 评论(0) 推荐(0)

2013年5月14日

摘要: 由于前几天看的SPFA,然后我一看题,想都没想就拿SPFA来写了,果断超时,不对。应该可以的,还是我没学到家。不对。 然后我知道这样不行,不能一求最短路啥的就想都不想就那SPFA来写,就今天上午系统的看了下dijkstra,kruskal,prim,spfa,flyod,把这几个都看了,系统的了解了一下,然后我中午用的dijkstra写的,果断又wa!!!!!一翻disscuss,有人说%f,%lf要注意,我把%lf改成了%f,然后果断过了。微艰难。 这题目松弛的时候就是 dist[u]<=dist[k]&&gird[u][k]<dist[k]. //dist表示从 阅读全文
posted @ 2013-05-14 14:11 symons 阅读(248) 评论(0) 推荐(0)

2013年5月11日

摘要: 卡了好几天终于过了,就是有个地方,卡限制等级的,然后就可以枚举区间SPFA,这个区间必须包涵酋长的等级,维护一个最小值,也看了别人的代码,揣测了好久,终于懂了,然后来写一次就A了,加个油。 1 #include <iostream> 2 #include <queue> 3 #include <stdio.h> 4 #include <string.h> 5 #include <algorithm> 6 #include <cmath> 7 #define INF 0xffffff 8 #define maxn 120 9 阅读全文
posted @ 2013-05-11 19:27 symons 阅读(209) 评论(0) 推荐(0)

摘要: 1 本文转载:http://helloklzs.iteye.com/blog/1139993 2 3 安装: 4 sudo apt-get install rar 5 6 这样就可以安装了 7 8 删除是以下语句 9 10 sudo apt-get install unrar 11 12 13 14 用法: rar <命令> -<选项 1> -<选项 N> <压缩档案> <文件...> 15 <@文件列表...> <解压缩路径\> 16 17 <命令> 18 a 添加文件到压缩档案 19 ... 阅读全文
posted @ 2013-05-11 18:51 symons 阅读(500) 评论(0) 推荐(0)

2013年5月8日

摘要: 学习SPFA,正好是裸的SPFA,然后我就学习了一下。 1 #include <iostream> 2 #include <stdio.h> 3 #include <math.h> 4 #include <queue> 5 #include <string.h> 6 #define maxn 600 7 #define INF 0x7fffffff 8 using namespace std; 9 struct node { 10 int to; 11 int weight; 12 node* next; 13 }; 14 node* 阅读全文
posted @ 2013-05-08 19:00 symons 阅读(146) 评论(0) 推荐(0)

2013年4月27日

摘要: 就是看相邻一定位置的两个char组成的字符串是不是出现过。 1 #include <iostream> 2 #include <map> 3 using namespace std; 4 string str; 5 map<string,int>haha; 6 bool check(int n) 7 { 8 haha.clear(); 9 int l=str.length();10 int i,j;11 string t="11";12 for(i=0;i<l-n-1;++i)13 {14 t[0]=str[i];15 ... 阅读全文
posted @ 2013-04-27 01:21 symons 阅读(132) 评论(0) 推荐(0)

摘要: 1 /* 2 * algorithm : math 3 * 4 * Memory 392K Time 0MS Language G++ 5 * 6 * code by : zhyu 7 */ 8 #include <cstdio> 9 10 const int N = 31;11 12 int c[N][N],pow2[N];13 bool bin[N];14 15 inline void init(void)16 {17 for(int i=0;i<N;i++) c[i][0]=c[i][i]=1,pow2[i]=(1<<i);18 for(i... 阅读全文
posted @ 2013-04-27 00:23 symons 阅读(186) 评论(0) 推荐(0)

2013年4月18日

摘要: 1 #include <stdio.h> 2 #include <iostream> 3 #include <iostream> 4 using namespace std; 5 char gird[50][50]; 6 void init() 7 { 8 int i,j; 9 for(i=0;i<17;++i) 10 { 11 12 for(j=0;j<33;++j) 13 { 14 gird[i][j]='~'; 15 if(i%2==0&&j%4=... 阅读全文
posted @ 2013-04-18 18:27 symons 阅读(180) 评论(0) 推荐(0)

2013年4月15日

摘要: 需要注意的是,逆序数的变量要设为long long。 1 #include <iostream> 2 #include <stdio.h> 3 #include <algorithm> 4 #include <string.h> 5 #define maxn 500000+100 6 #define _cp(a,b) ((a)<=(b)) 7 using namespace std; 8 typedef int elem_t; 9 int num[maxn];10 elem_t _tmp[maxn];11 12 long long inv( 阅读全文
posted @ 2013-04-15 23:38 symons 阅读(184) 评论(0) 推荐(0)

2013年4月12日

摘要: 1 /* poj2996 2 * id: symons 3 * memory 700k 4 * time 0ms 5 */ 6 #include <iostream> 7 #include <string> 8 #include <algorithm> 9 #include <stdio.h>10 using namespace std;11 12 string gird[17];13 14 void output_white(char aim)15 {16 int l=gird[0].length();17 18 for(int i... 阅读全文
posted @ 2013-04-12 02:02 symons 阅读(169) 评论(0) 推荐(0)

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 22 下一页