摘要: #include #include #include #include #include using namespace std; struct node { int x,y; }; node vex[1000];//存入的所有的点 node stackk[1000];//凸包中所有的点 int xx,yy; bool cmp1(node a,node b)//排序找第一个点 { ... 阅读全文
posted @ 2018-08-15 22:49 萌新上路 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 1、深搜(会爆栈,通过开全局栈模拟递归) 爆栈代码 d[0][0] = 1; d[0][h+1] = 1; d[w+1][0] = 1; d[w+1][h+1] = 1; 2、广搜(注意w,h输入顺序 先输入h后输入w) 阅读全文
posted @ 2018-08-15 20:28 萌新上路 阅读(94) 评论(0) 推荐(0) 编辑
摘要: # include # include # include # include # include #include using namespace std; int d[1001][1001]; int main() { int n,m,i,j; cin>>n; while(n--) { char s1[1001],s2[... 阅读全文
posted @ 2018-08-15 16:10 萌新上路 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1、广搜(从结点s开始 往外逐层搜索) 阅读全文
posted @ 2018-08-15 15:06 萌新上路 阅读(109) 评论(0) 推荐(0) 编辑
摘要: # include # include # include using namespace std; int d[1001][1001]; int main() { int n,m; cin>>n; while(n--) { string s1,s2; cin>>s1>>s2; int len1 ... 阅读全文
posted @ 2018-08-15 10:18 萌新上路 阅读(105) 评论(0) 推荐(0) 编辑