
图论
文章平均质量分 80
ljw0925
这个作者很懒,什么都没留下…
展开
-
Network POJ - 1861kruskal最小生成树
Network POJ - 1861Andrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the company, they can be connected to each other using cables. Since each worker of the company must have access原创 2021-03-04 19:28:30 · 234 阅读 · 1 评论 -
2021牛客寒假算法基础集训营2
链接:链接来源:牛客网题目描述算数基本定理,又称唯一分解定理,算术基本定理可表述为:任何一个大于1的自然数 N,如果N不为质数,那么N可以唯一分解成有限个质数的乘积。即N=p_1^{e_1}\cdot p_2{e_2}…p_m{e_m}(p_1 < p_2< … p_m)N=p1e1 ⋅p2e2 …pmem (p1 牛牛最近对于质因数分解产生了浓厚的兴趣。牛牛定义了一个函数F(x),它表示将x做质因数分解后得到的数字从小到大升序排列原创 2021-02-03 18:03:06 · 519 阅读 · 1 评论 -
Window Pains POJ - 2585 AOV拓扑排序
Boudreaux likes to multitask, especially when it comes to using his computer. Never satisfied with just running one application at a time, he usually runs nine applications, each in its own window. Due to limited screen real estate, he overlaps these windo原创 2021-01-27 23:08:37 · 165 阅读 · 1 评论 -
Basic Wall Maze POJ - 2935简单bfs
In this problem you have to solve a very simple maze consisting of:a 6 by 6 grid of unit squares3 walls of length between 1 and 6 which are placed either horizontally or vertically to separate squaresone start and one end markerA maze may look like thi原创 2021-01-24 14:50:34 · 105 阅读 · 0 评论 -
ZOJ1008 Gnome Tetravex 暴力/DFS
Hart is engaged in playing an interesting game, Gnome Tetravex, these days. In the game, at the beginning, the player is given nn squares. Each square is divided into four triangles marked four numbers (range from 0 to 9). In a square, the triangles are th原创 2020-11-24 11:03:25 · 193 阅读 · 1 评论 -
zoj2412 Farm Irrigation 简单的DFS
Farm IrrigationBenny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes are placed in these squares. Different square has a different type of pipe. There are 11 types of pipes, which原创 2020-11-23 22:35:42 · 120 阅读 · 0 评论 -
havel-hakimi模板题 Frogs‘ Neighborhood POJ - 1659
未名湖附近共有N个大小湖泊L1, L2, …, Ln(其中包括未名湖),每个湖泊Li里住着一只青蛙Fi(1 ≤ i ≤ N)。如果湖泊Li和Lj之间有水路相连,则青蛙Fi和Fj互称为邻居。现在已知每只青蛙的邻居数目x1, x2, …, xn,请你给出每两个湖泊之间的相连关系。Input第一行是测试数据的组数T(0 ≤ T ≤ 20)。每组数据包括两行,第一行是整数N(2 < N < 10),第二行是N个整数,x1, x2,…, xn(0 ≤ xi ≤ N)。Output对输入的每组测试数原创 2020-11-22 23:38:30 · 179 阅读 · 0 评论