ZOJ-1203 Swordfish---最小生成树】的更多相关文章

主题链接:problemId=203" target="_blank">ZOJ 1203 Swordfish 旗鱼 Swordfish Time Limit: 2 Seconds      Memory Limit: 65536 KB There exists a world within our world A world beneath what we call cyberspace. A world protected by firewalls, password…
题目: There exists a world within our world A world beneath what we call cyberspace. A world protected by firewalls, passwords and the most advanced security systems. In this world we hide our deepest secrets, our most incriminating information, and of…
题目: There exists a world within our world A world beneath what we call cyberspace. A world protected by firewalls, passwords and the most advanced security systems. In this world we hide our deepest secrets, our most incriminating information, and of…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1203 大意: 给出一些点,求MST 把这几天的MST一口气发上来. kruskal #include<cstdio> #include<cmath> #include<algorithm> using namespace std; const int MAXN=101; const int INF=9999999; int fa[MAXN]; s…
#include "stdio.h". #include <iostream> #include<math.h> using namespace std; double dis[105][105]; double p[105][2];//点的坐标 double ans;//最短距离 int n; void makedis()//算出两个点之间的距离 { int i, j; double r; for (i = 0; i < n; i++) for (j =…
A是水题,此处略去题解 B - PreSuffix ZOJ - 3995 (fail树+LCA) 给定多个字符串,每次询问查询两个字符串的一个后缀,该后缀必须是所有字符串中某个字符串的前缀,问该后缀最长时,是多少个字符串的前缀. 思路:对所有串构造ac自动机,根据fail指针的性质,a节点的fail指针指向b时,b一定是a的某个后缀.所以每次询问对两个字符串对应的节点在fail树上求一下LCA,插入时经过了LCA节点的字符串的个数便是答案. #include<bits/stdc++.h> us…
acm之pku题目分类 对ACM有兴趣的同学们可以看看 DP:  1011   NTA                 简单题  1013   Great Equipment     简单题  1024   Calendar Game       简单题  1027   Human Gene Functions   简单题  1037   Gridland            简单题  1052   Algernon s Noxious Emissions 简单题  1409   Commun…
以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight Moves1101 Gamblers1204 Additive equations 1221 Risk1230 Legendary Pokemon1249 Pushing Boxes 1364 Machine Schedule1368 BOAT1406 Jungle Roads1411 Annive…
题目连接:problemId=542" target="_blank">ZOJ 1542 POJ 1861 Network 网络 Network Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge Andrew is working as system administrator and is planning to establish a new network in his com…
Connect them ZOJ - 3204 You have n computers numbered from 1 to n and you want to connect them to make a small local area network (LAN). All connections are two-way (that is connecting computers i and j is the same as connecting computers j and i). T…