Analog Test 68

T1:

  Optimal rectangular area by the minimum width is the minimum length.

  All in accordance with the rectangle $ x $ in descending order, from top to bottom sweep, while the $ y $ put into the heap, not to sweep are deemed deleted.

  Every pop out a minimum, expressed delete this rectangle.

  Then multiply the minimum stack current $ x $ updated answer.

  Time complexity $ O (nlogn) $.

T2:

  The minimum set of points and each point is the path to a common lca.

  Then the query becomes the precursor successor problem.

  Chairman tree maintenance tree that each node point his father.

  You can then check on the President of the trees.

  Time complexity $ O (nlogn) $.

T3:

  It found that the relationship between the two numbers is determined by the highest bit different.

  It can then pretreated out how much each and every contribution is capable of producing 1/0 with trie tree.

  Violence case can not enumerate through all the test data.

  Consider dichotomous answers, a separation of the first two f (res), then separate the two res.

  But the test will still timeout.

  May meet in the mid, pretreatment of a front half and the rear half of all cases are sorted.

  Enumeration half ago, can upper_bound a half years after the number.

  Time complexity $ O (nklogn) $.

Guess you like

Origin www.cnblogs.com/hz-Rockstar/p/11670003.html