二分图最大点覆盖模型,因为对于一个点(x,y)显然只要选x或者y就好了,于是连边,跑最大匹配=最大点覆盖(不会证) #include<iostream> #include<cstdio> using namespace std; const int N=10005,inf=1e9; int n,m,h[N],cnt,con,lk[N],v[N],ti; struct qwe { int ne,to; }e[100005]; int read() { int r=0,f=1; cha…
1741: [Usaco2005 nov]Asteroids 穿越小行星群 Time Limit: 5 Sec Memory Limit: 64 MBSubmit: 231 Solved: 166[Submit][Status][Discuss] Description Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N…
Description Give a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v)=The min distance between node u and v. Give an integer k,for every pair (u,v) of vertices is called valid if and only if dist(u,v) not e…