![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
模板
Alberttttt
这个作者很懒,什么都没留下…
展开
-
hdu2544 最短路,dijstra(模板)
题目链接:点击打开链接#include #include#includeusing namespace std;const int INF=0x3f3f3f3f;int dis[110],vis[110],v[110][110];void Dijkstra(int n){ int i,j,pos; for(i=1; i<=n; i++) {原创 2017-08-21 12:01:10 · 233 阅读 · 0 评论 -
csu1120 Lics(模板)
题目链接:点击打开链接求最长递增公共子序列长度#include #include #include using namespace std;const int maxn=1e3+10;int n,m,a[maxn],b[maxn],dp[maxn][maxn];//a数组的长度n,b数组的长度为m,都是从1开始int LICS(){ int MAX,i,j;原创 2017-08-21 22:31:23 · 226 阅读 · 0 评论 -
hdu1232 并查集
题目链接:点击打开链接#include#include#include#include#include#includeusing namespace std;const int maxn=1e3+10;int pre[maxn],t[maxn];int Find(int x){ int r=x; while(r!=pre[r]) r=pre[原创 2017-08-22 21:21:07 · 189 阅读 · 0 评论 -
求两个多边形的交面积(模板)
别人的博客:http://blog.csdn.net/betwater/article/details/52423079/* * 多边形的交,多边形的边一定是要按逆时针方向给出 * 还要判断是凸包还是凹包,调用相应的函数 * 面积并,只要和面积减去交即可 */ #include using namespace std; const int maxn = //转载 2017-08-30 15:38:34 · 2890 阅读 · 0 评论