上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 42 下一页
摘要: View Code 1 #include<stdio.h> 2 #include<string.h> 3 const int maxn = 105; 4 int vis[ maxn ]; 5 int a[ maxn ]; 6 int b[ maxn ]; 7 8 void dfs( int s,int t,int pos ){ 9 if( pos==t ){10 for( int i=0;i<t;i++ )11 printf("%d ",b[ i ]);12 printf("\n");13 return ;14... 阅读全文
posted @ 2013-04-11 20:59 xxx0624 阅读(209) 评论(2) 推荐(0) 编辑
摘要: 多项式积分。注意化简和符号即可。降幂!!!View Code 1 /* 2 多项式积分 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue> 10 #include<vector> 11 #include<map> 12 #include<math.h> 13 typedef long l 阅读全文
posted @ 2013-04-10 15:46 xxx0624 阅读(262) 评论(2) 推荐(0) 编辑
摘要: 题意:求a到b的数中,共有多少个1先可以预处理出一位,两位。。等这些数的1的个数,即 sum。然后对于某个特定的 n 位数,假设第一位是1 然后求出有多少种可能的情况(即有多少种可能的数),,然后再枚举第二位,第三位。。。。View Code 1 /* 2 找规律 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue> 10 阅读全文
posted @ 2013-04-10 14:07 xxx0624 阅读(361) 评论(0) 推荐(0) 编辑
摘要: 水~View Code 1 /* 2 a转化为二进制 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue>10 #include<vector>11 #include<map>12 #include<math.h>13 typedef long long ll;14 //typedef _ 阅读全文
posted @ 2013-04-08 21:59 xxx0624 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 字典树;这里字典树用于存储dis这些数。。。然后对于某个数x来说,要使得它变大,就要找到一个与它能“合适”与它异或的数。View Code 1 /* 2 字典树+异或 3 a^b = (a^c)^(b^c) 4 */ 5 #include<stdio.h> 6 #include<string.h> 7 #include<stdlib.h> 8 const int maxn = 100005; 9 const int maxm = 31; 10 int tree[ maxn*maxm ][ 2 ]; 11 int dis[ maxn ],vis[ maxn ] 阅读全文
posted @ 2013-04-04 18:07 xxx0624 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 简单的字典树View Code 1 /* 2 字典树 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue>10 #include<map>11 #include<vector>12 #include<math.h>13 using namespace std;14 typedef long 阅读全文
posted @ 2013-04-04 15:05 xxx0624 阅读(212) 评论(0) 推荐(0) 编辑
摘要: View Code 1 /* 2 水~~~ 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue>10 #include<map>11 #include<vector>12 #include<math.h>13 using namespace std;14 typedef long long 阅读全文
posted @ 2013-04-04 14:07 xxx0624 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 为什么暴力bfs搜索都不行,样例都不过????wa的代码。View Code 1 /* 2 bfs 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue>10 #include<map>11 #include<vector>12 #include<math.h>13 using namesp 阅读全文
posted @ 2013-04-04 13:53 xxx0624 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 简单的优先队列。。。View Code 1 /* 2 优先队列 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue>10 #include<map>11 #include<vector>12 #include<math.h>13 using namespace std;14 typedef 阅读全文
posted @ 2013-04-04 10:53 xxx0624 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 对于斜率优化的dp还不是很懂。。。。。。。。。View Code 1 /* 2 dp+斜率优化 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue>10 #include<math.h>11 using namespace std;12 const int maxn = 1000005;13 const int 阅读全文
posted @ 2013-04-03 21:33 xxx0624 阅读(279) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 42 下一页