摘要: #includeusing namespace std;const int inf=0x7fffffff;int n,m,g[1024][1024],dist[1024];void prim(){ int ans,i,j,v,minx; for(i=0; i<n; i++... 阅读全文
posted @ 2015-09-02 20:19 xryz 阅读(483) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;long long inf=1e18;mapm;long long a[1200000],h;int main(){ int n,_,p,cnt; m.clear(); memset(a,0,sizeof(a)... 阅读全文
posted @ 2015-09-02 16:21 xryz 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 找到一条直线,与全部线段都相交。直线由线段中的两个端点组成,所以枚举一下就好了。#includeusing namespace std;const double eps=1e-8;struct point{ double x,y;} a[1024];double cross(p... 阅读全文
posted @ 2015-09-02 15:29 xryz 阅读(110) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int main(){ int n,m,u,v,w,i,j,k,t,num,ans,g[128][128]; while(~scanf("%d%d",&n,&m)) { for(i=1; in&&... 阅读全文
posted @ 2015-09-02 10:56 xryz 阅读(292) 评论(0) 推荐(0) 编辑