Luogu P2387 [NOI2014] magic forest solution

Luogu P2387 [NOI2014] magic forest solution Title Link: P2387 [NOI2014] magic forest Meaning: each side has edge right a , b a,b a. B two, please 1 ...

Added by gckmac on Fri, 25 Feb 2022 15:08:30 +0200

Luogu P2888 [USACO07NOV]Cow Hurdles S problem solution

Luogu P2888 [USACO07NOV]Cow Hurdles S problem solution Title Link: P2888 [USACO07NOV]Cow Hurdles S Farmer John wants her cows ready for the county jump race. Bessie and her partners are practicing hurdles. They are very tired, so they want to use the least energy to cross the hurdles. Obviously, it is easy for a cow to jump over several lo ...

Added by steonkeys on Thu, 03 Feb 2022 05:52:58 +0200

Summary of monotone queue and sliding window problem

Examples LeetCode 239. Sliding Window Maximum There may be no way to register, just Click here subject Give you an integer array nums, with a sliding window of \ (k \) moving from the leftmost side of the array to the rightmost side of the array. You can only see \ (k \) numbers in the sliding window. The sliding window moves only one bit to th ...

Added by La Parka on Wed, 26 Jan 2022 13:44:08 +0200

[20220117]P2569 [SCOI2010] stock trading

Problem surface Recently \ (\ text{lxhgww} \) became addicted to investing in stocks. After a period of observation and study, he summarized some rules of stock market. Through observation for a period of time, \ (\ text{lxhgww} \) predicted the trend of a stock in the next \ (T \) days. The buying price of the stock on the \ (I \) day was \ (A ...

Added by sotusotusotu on Wed, 26 Jan 2022 11:21:16 +0200

[learning notes] Min_25 sieve

Immortal min_ The magic sieve invented by the invention is used to sieve the prefix and of the product function. For the integrable function \ (f(x) \) to sieve the prefix sum, the specific requirements are that \ (f(p) \) is a simple polynomial, and \ (f(p^e) \) can be calculated quickly. Complexity is sub linear, but I won't prove it. Descrip ...

Added by sheckel on Fri, 21 Jan 2022 00:43:04 +0200

[oiclass1461] cable TV network: backpacking in trees

subject A pay cable television network plans to broadcast an important football game. Their relay network and user terminals form a tree structure. The root node of the tree is located at the scene of the football game, the leaves are each user terminal, and other transfer stations are the internal nodes of the tree. The signal transmission cos ...

Added by deras on Wed, 12 Jan 2022 04:51:43 +0200