HBC236067[SHOI2013]阶乘字符串,状压dp,动态规划Sandpile on Clique题解

一点都不欢乐 算法基础篇 33 0
全网最全C++题库,助您快速提升编程技能!题库丰富多样,涵盖各个领域,让您在练习中不断成长!
computer science, and mathematics, both for its beautiful algebraic structure and for its relevance to applications like load balancing and derandomization of models like internal diffusion-limited aggregation. The sandpile model is related to many other models and physical phenomena, like the rotor-routing model, avalanche models.In the sandpile model, we are given an undirected graph. i initially. Each turn we will pick an arbitrary vertex. v is not smaller than the number of edges connecting. chips. This process is called firing or toppling. Firing will keep happening until no vertex. It can be proven that the order of firing doesn't affect the result. Meanwhile, it is also possible that the firing will never terminate. This instance is described as "recurrent". Now you are given a clique and the initial number of chips. Determine whether this instance is a recurrent one. If not, please output the final number of chips for each node respectively.A clique is a graph where every two vertices are connected with an edge.

TheAbelian Sandpile Modelis a famous dynamical system displaying self-organized criticality. It has been studied for decades since it was introduced by Per Bak, Chao Tang and Kurt Wiesenfeld in a 1987 paper. The sandpile prediction is of wide interest in physics, computer science, and mathematics, both for its beautiful algebraic structure and for its relevance to applications like load balancing and derandomization of models like internal diffusion-limited aggregation. The sandpile model is related to many other models and physical phenomena, like the rotor-routing model, avalanche models. In the sandpile model, we are given an undirected graph G G whose vertices are indexed from 1 1 to n n. We're also given n n integers a_1, a_2, cdots, a_n a 1 ​ ,a 2 ​ ,⋯,a n ​ where a_i a i ​ indicates that there are a_i a i ​ chips placed on vertex i i initially. Each turn we will pick an arbitrary vertex v v such that the number of chips on v v is not smaller than the number of edges connecting v v, denoted as d_v d v ​ . For each neighbor of v v, it will receive one chip from v v. Therefore, v v will lost d_v d v ​ chips. This process is called firing or toppling. Firing will keep happening until no vertex v v has at least d_v d v ​ chips. It can be proven that the order of firing doesn't affect the result. Meanwhile, it is also possible that the firing will never terminate. This instance is described as "recurrent". Now you are given a clique and the initial number of chips. Determine whether this instance is a recurrent one. If not, please output the final number of chips for each node respectively. A clique (also called a complete graph) is a graph where every two vertices are connected with an edge.

HBC236067[SHOI2013]阶乘字符串,状压dp,动态规划Sandpile on Clique题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
想要在职场中立于不败之地?那就来试试全网最全C++题库,让您在练习中快速提升技能。

标签: HBC236067[SHOI2013]阶乘字符串 状压dp 动态规划Sandpile on Clique题解