"Noip Series--Graph theory" Freight transport

Source: Internet
Author: User
P1967 Lorry transport
  • Well, I'm going to write my ideas first, qwq.
  1. Obviously for each truck passing through the path, the edge of the smallest side of the larger, the answer is better--first to ask for a maximum spanning tree to ensure that the Bingban value on the tree as large as possible
  2. Because the maximum spanning tree is found, the path between the two points is unique----the method of calculating LCA can be obtained by multiplication to find the transportation path of the wagon, and update the minimum value of the upper right of the path is the answer QWQ
  3. It is possible that two points are not connected, and look for their father Qwq, output "1"
  4. Now, there's a little problem. Qaq, how to update the minimum value of the edge when multiplying ah ah ah ah ah Qaq
  5. Now we're going to eat, come back and take off! biu~~~//11.43

"Noip Series--Graph theory" Freight transport

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.