Huawei OD machine test real test Java implementation [Express delivery problem] [2023 B volume 100 points], with detailed problem-solving ideas

insert image description here

1. Topic description

There are N express stations identified by strings, and some stations are connected by roads. There are some packages to be transported at each site, and the packages between each site are not repeated. There are checkpoints on the road that will cause some goods to be impassable, and calculate which goods cannot be delivered normally.

2. Enter description

The first line inputs MN, M packages and N road information.

0<=M, N<=100, if there are multiple packages that are forbidden to pass through the checkpoint, separate them with spaces.

3. Output description

Output undeliverable package package2 package4, if all packages can be delivered, output none, and the output results are sorted in ascending order

4. Java algorithm source code

public 

Guess you like

Origin blog.csdn.net/guorui_java/article/details/131623240