最新 最热

Prime Path (POJ - 3126 )(BFS)

题意:就是给你一个n,让你每次可以改变n的位数上的一个数,每次操作完必须是素数,要求最小次数的改变到达m。

2023-03-09
1

Dungeon Master (POJ - 2251)【 三维 BFS 】

题解:三维的bfs,一开始不怎么理解,就找各种题解,首先要懂的在二维平面上的bfs,bfs一般用来求能够到达某一点使经过的图上的点的值尽可能的小或者是给你两个值x,y,问x能否经过x=2*x或者x+=1这两种操作来变成y (Catch That Cow)...

2023-03-09
2

Catch That Cow (POJ - 3278)(简单BFS)

题解:给你x、y,x可以加1、减1、或者变成2*x,问通过最少的次数来让x等于y,这是最基础的bfs,就是把x通过一次的+1、-1、*2得到的数都放到队列里面,再把这些通过一次操作得到的数进行相同的操作+1、-1、*2,因为用个结构体来存放...

2023-03-09
1

Friend-Graph (HDU 6152)2017中国大学生程序设计竞赛 - 网络选拔赛

It is well known that small groups are not conducive of the development of a team. Therefore, there shouldn’t be any small groups in a good team. In a team wit...

2023-03-09
5

Scarily interesting! (URAL - 2021)

This year at Monsters University it is decided to arrange Scare Games. At the Games all campus gathers at the stadium stands, and the Scare program students div...

2023-03-09
1

Density of Power Network(ZOJ 3708)

The vast power system is the most complicated man-made system and the greatest engineering innovation in the 20th century. The following diagram shows a typical...

2023-03-09
2

Simple Problem with Integers(POJ 3486)

You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a give...

2023-03-09
1

H-Fashion in Berland

According to rules of the Berland fashion, a jacket should be fastened by all the buttons except only one, but not necessarily it should be the last one. Also i...

2023-03-09
1

K - Highway Project  ZOJ - 3946 【 SPFA 求最小时间下最小距离】

Edward, the emperor of the Marjar Empire, wants to build some bidirectional highways so that he can reach other cities from the capital as fast as possible. Thu...

2023-03-09
2

K - Wand FZU - 2282 【 组合数 + 错排 】

N wizards are attending a meeting. Everyone has his own magic wand. N magic wands was put in a line, numbered from 1 to n(Wand_i owned by wizard_i). After the m...

2023-03-09
1