当前位置:网站首页>Joint examination of six provinces 2017
Joint examination of six provinces 2017
2022-07-03 23:59:00 【hungry1234】
Sushi restaurant
Maximum weighted closed subgraph
Because the weight of each point is calculated only once , Consider transforming it into a graph
Map each section [l,r] towards [l+1,r] And [l,r-1] Even the edge , The point weight is the interval delicious value , Every interval [i,i] The point weight is the interval delicious value -c, Finally, each kind of sushi is connected to the point representing this kind of sushi , The point is m*id^2
In this picture , Selected a point , We must choose the successor of this point , Maximize point weight
Is the maximal weighted closed subgraph
Connect the punctual weight node with S Connecting edges means selecting this point , Negative point weight node and T Edge building means that this point is not selected , In order to meet the conditions, we need to let S,T Disconnected , The minimum cut is enough
final exam
Maintain the prefix and number of students at a certain time , Greater than the prefix sum of a certain time , Less than the prefix sum of a certain time , Enumeration is enough
Combinatorial number problem

all ik+r stay modk Congruence in the sense of , Therefore, it is considered that f[i][j] Express election i Items in modk The remainder is j The answer
Every time you choose or not , so ![f[i][j]=f[i-1][(j-1)%k]+f[i-1][j]](http://img.inotgo.com/imagesLocal/202202/14/202202142034430821_4.gif)
Matrix optimization times recursion can
Meeting is greeting
1. Extend Euler's theorem

The establishment condition is k>m
2. Power of light speed
In index a And modulus mod In the same case , Let the maximum modulus be b, Preprocessing a Of 1-√b Result of the power , In pretreatment k*√b(k<=√b) Result , You can find it directly every time
seek 
You know , The maximum number of changes per location √mod Time , Because after that mod=1 The following result is 0, Save this √mod The second answer
It is found that the base number is c, But the modulus will change , But the number of modules is very small , Preprocess the power of light speed of each module , You can query directly every time
Segment tree is used to maintain interval and , Every time you make a change, make a violent change to every point , Because there will be no edge after a certain number of modifications
Break up is a wish
probability dp, Find the best pull x This state can represent all situations of playing , Order dp[x] Indicates the optimal pull x After the second pull
Yes
, It means if you choose the right , The minimum number of times is x-1, otherwise x+1
Make x=n, Yes ![dp[n]=dp[n-1]+1](http://img.inotgo.com/imagesLocal/202202/14/202202142034430821_0.gif)
Therefore, the difference between the two maintenance items is found , Make del[i]=dp[i]-dp[i-1]
![dp[x]=\frac{x}{n}(dp[x]-del[x])+\frac{n-x}{n}(dp[x]+del[x+1])+1](http://img.inotgo.com/imagesLocal/202202/14/202202142034430821_2.gif)
And found that del You can deduce
So because dp[k]=k,dp It can also be deduced
边栏推荐
- Gossip about redis source code 78
- Is user authentication really simple
- Introducing Software Testing
- Fudan 961 review
- [Mongodb] 2. Use mongodb --------- use compass
- Minimum commission for stock account opening. Stock account opening is free. Is online account opening safe
- Kubedl hostnetwork: accelerating the efficiency of distributed training communication
- 股票开户佣金最低的券商有哪些大家推荐一下,手机上开户安全吗
- 2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) simulated examination and Guangdong Provincial Safety Officer a certificate third batch (main person in charg
- NLP Chinese corpus project: large scale Chinese natural language processing corpus
猜你喜欢

It is forbidden to splice SQL in code

Correlation analysis summary

Zipper table in data warehouse (compressed storage)

Alibaba cloud container service differentiation SLO hybrid technology practice

Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?

A treasure open source software, cross platform terminal artifact tabby

NLP pre training technology development

Analysis on the scale of China's smart health industry and prediction report on the investment trend of the 14th five year plan 2022-2028 Edition

It is the most difficult to teach AI to play iron fist frame by frame. Now arcade game lovers have something

Idea a method for starting multiple instances of a service
随机推荐
How can I get the Commission discount of stock trading account opening? Is it safe to open an account online
Gossip about redis source code 77
Solve the problem that the kaggle account registration does not display the verification code
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
P1629 postman delivering letter
Selenium library 4.5.0 keyword explanation (4)
Alibaba cloud container service differentiation SLO hybrid technology practice
How to make recv have a little temper?
It is forbidden to splice SQL in code
Zipper table in data warehouse (compressed storage)
Gossip about redis source code 76
[PHP basics] cookie basics, application case code and attack and defense
Pandaoxi's video
Op amp related - link
D25:sequence search (sequence search, translation + problem solving)
Gossip about redis source code 82
Idea a method for starting multiple instances of a service
Fluent learning (5) GridView
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?