POI title random selection

MOR-Tales of seafaring

Consider parity paths between two nodes. The split into two points of a point running bfs, and a bunch if. Note that Japanese sentence start point, end point and the point at which the same communication block size is 1.

LUK-Triumphal arch

First-half \ (K \) , and DP, \ (DP [u] \) represents a u-tree needs staining all child how many nodes, metastasis: \ (DP [u] = \ max (\ SUM DP [V ] + son [u] -mid, 0) \)

LOG

solution

HOT-Hotels

To enumerate the root.
When dfs, the current sub-tree node where the contributions ++ (depth / 2) level ancestor of the current node, and on the concrete realization of forward StarRam together. Then swept to its ancestors when the statistical answer. Do :: vector with std.

TET-Tetris 3D

Segment tree cover tree line, do not use pushdown, use markers to perpetuate

TET-Tetris Attack

Sweep again, if the number the first time, added to the stack; otherwise delete the number, the rank of all the elements on the number of positions in the stack where all -1, then calculate the contribution, with Fenwick tree maintain.

KUP-Plot purchase

I hate monotonous stack.
For each element in the matrix \ (the X-\) , if \ (the X-> 2K \) , it is dead pixels; if \ (k \ the X-Le \ Le 2K \) , direct output; otherwise it is a good point.
Then we find a good point of maximum rectangles, so that it does not cover any dead pixels, apparently monotonous stack maintenance.
After it, we consider progressive, set the current line weights and \ (= the y-\) , if \ (the y-> 2K \) , in the row from left to right to delete elements one by one, until qualified; if \ ( k \ the y-Le \ Le 2K \) , direct output; otherwise delete this line.

MAG-Warehouse

Rotating 45 °, the cutting transformed Chebyshev distance is the Manhattan distance, x and y answer section may be independently bipartite determined, then to ensure that the answers that are integers, check all \ ((x ± 1, y ± 1) \) .

Guess you like

Origin www.cnblogs.com/BlogOfchc1234567890/p/11616164.html