分治
兜率工
XJTU 硕士研究生在读
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
线性时间选择
参考算法设计与分析。 #include <bits/stdc++.h> using namespace std; inline int Random(int x,int y) { int ran=rand()%(y-x)+x; return ran; } int Partition(int a[],int p,int r,int k) { int i=p...原创 2018-03-31 21:29:00 · 534 阅读 · 0 评论 -
最接近点对问题
参考链接 #include <iostream> #include <stdio.h> #include <cmath> #include <algorithm> using namespace std; const int MAXN=100005; struct Point { double x; double y; }...原创 2018-04-01 10:12:29 · 1149 阅读 · 1 评论 -
循环赛日程表(分治)
参考链接 #include <iostream> #include <stdio.h> #include <cmath> #include <algorithm> using namespace std; int a[105][105]; int table(int m) { if(m>1) { ta...原创 2018-04-01 11:28:27 · 392 阅读 · 0 评论 -
棋盘覆盖(分治算法)
//tr棋盘左上角方格的行号 //tc棋盘左上角放歌的列号 //dr特殊方格所在的行号 //dc特殊方格所在的列号 #include<iostream> using namespace std; const int BN=4; int board[BN][BN]; int tile=1; void chessboard(int tr,int tc,int dr,int dc,...原创 2018-03-28 01:01:53 · 986 阅读 · 0 评论
分享