UESTC Winter Training #10 "Northeastern Europe 2009"

Source: Internet
Author: User

UESTC Winter Training #10

Northeastern Europe 2009

Recent training is not in the state Ah, well, the morning has been practicing cars, the game is also just Eat lunch, the state is not inevitable, the next race to eat a break in advance.

The first card in the B, later found that test instructions understand wrong, did not see above, is not able to return to the original point, WA 5 hair is also enough pity.

Successfully after the G problem, stuck on the C question, to t into Doge T T.

A-   Asteroids

Three-dimensional convex hull, and so on after the calculation of the geometry and then write

B-   Business Center

There is a tall building, there are countless layers, and there is no negative layer, you are now on the No. 0 floor, gave M (m<=2000) elevator, each elevator only two keys, one is to walk up the U-layer, one is down the D-layer (u,d<=1000), from the beginning to select an elevator, midway can not change the elevator, Q Press N (n<=1,000,000) button, lowest to the first layer (not including the 0th floor)

Initially wanted to do it with greed, but tle, later found that it could be adjusted by adjusting the formula .

Obviously each elevator to the lowest possible number of layers, and then pick out the smallest can.

So specific for an elevator, a walk up the U-layer, a down D-level, false with X-times up, y times down, answer ans should meet ans=ux-dy, transform the formula ans= ux-d (n-x) = (u+d) X–dn, so that ans is only related to x value, Ans is the smallest positive integer, so x can be determined, so the answer can be obtained.

C-   Database

Poke here jump

G-   headshot

"Water" simply statistics can be

UESTC Winter Training #10 "Northeastern Europe 2009"

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.