上一页 1 2 3 4 5 6 7 8 ··· 18 下一页
摘要: 题目大意:给定两个4位的质数a和b,从a开始每次只能改变a的一个数字,并且改完后的a还是质数,求a最少经过几次变换能得到b.....典型的最快求解问题#include#include#includeusing namespace std;bool v[10001];bool p[10001];int... 阅读全文
posted @ 2015-04-13 20:24 _一千零一夜 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 题意 : 给定一个n求只包括0与1的数 能被n整除 任意一个答案就可以#include#include#include#include using namespace std; #define CLR(arr,val) memset(arr,val,sizeof(arr)) typedef lo... 阅读全文
posted @ 2015-04-13 20:14 _一千零一夜 阅读(109) 评论(0) 推荐(0) 编辑
摘要: DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000... 阅读全文
posted @ 2015-04-13 18:54 _一千零一夜 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 题目大意:这题是一个三维的迷宫题目,其中用'.'表示空地,'#'表示障碍物,'S'表示起点,'E'表示终点,求从起点到终点的最小移动次数,解法和二维的类似,只是在行动时除了东南西北移动外还多了上下。对于题目给出数据的含义就是输入l,r,c,分别代表迷宫有l层,每层长宽分别是c,r。对于数据以可以这样... 阅读全文
posted @ 2015-04-13 18:44 _一千零一夜 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 思路:有点枚举的意思 基本的分支限界#include#includeusing namespace std;int a[11];char map[11][11];int n,k;int sum;void dfs(int t,int x)// 行号 需要放置的皇后数{ int i,j; i... 阅读全文
posted @ 2015-04-13 18:34 _一千零一夜 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题意:1给区间染色 2问区间有多少颜色#includeusing namespace std;struct Node{ int x;//区间覆盖颜色 int end; int L,R; Node *Right,*Left;};Node Tree[1200100];int... 阅读全文
posted @ 2015-03-19 20:51 _一千零一夜 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 题意 两种操作 1:区间更新c 2:问区间的和 经典区间线段树#include #includeusing namespace std;const int N=100011;struct Node{ int l,r; __int64 s,sum;}Tree[N*4]... 阅读全文
posted @ 2015-03-19 20:30 _一千零一夜 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 题意: 给这个形状,与一些点的坐标,问那个空间里分别有多少个点。知识点 :计算几何+二分查找#include#includeusing namespace std;struct Point{ int x,y;}a;struct Line{ Point a,b;}l[5005];int s... 阅读全文
posted @ 2015-02-28 10:51 _一千零一夜 阅读(167) 评论(0) 推荐(0) 编辑
摘要: This is Page1This is some text. 阅读全文
posted @ 2014-11-27 17:09 _一千零一夜 阅读(114) 评论(0) 推荐(0) 编辑
摘要: #include"stdafx.h"#include#include#includeusing namespace std;void ThreadFunc1(PVOID param){int *p=(int *)param;cout<<"参数为:"<<*p<<endl;Sleep(1111);cou... 阅读全文
posted @ 2014-11-21 11:17 _一千零一夜 阅读(241) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 18 下一页