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"