验一下模板。。。。#include <cstdio>#include <cstring>#include <cmath>#include <algorithm>using namespace std;const double eps = 1e-8;const double pi = acos(-1.0);struct Point { double x, y; Point operator - (const Point& t) const { Point tmp; tmp.x = x - t.x; tmp.y = y - t.y; ... Read More
有点恶心,线段完全在长方形内,也算相交。。。。还好热心网友发了数据 http://hi.baidu.com/lewutian/blog/item/9a8a38ece87cd52c62d09fb5.html#include<stdio.h>#include<math.h>const double eps = 1e-8;struct Point { double x, y; Point operator - (const Point& t) const { Point tmp; tmp.x = x - t.x; tmp.y = y - t.y;... Read More
//图的三连通的判断//在图中删去一个点,判断是否存在割点,以及判断图是否连通#include<stdio.h>#include<string.h>#include<vector>using namespace std;const int MAX = 1010;vector<int> edge[MAX];int low[MAX],dfn[MAX];int vis[MAX];int n,m,tdfn;bool flag=0;int root;inline int min(int a,int b){return a<b?a:b;}void df Read More