On the CVBB planet, garbage classification hasbeengradually executed to help save resources and protect the environment. Nowadays people have to be equipped with knowledge of distinguishing differen
On the CVBB planet, garbage classification has been gradually executed to help save resources and protect the environment. Nowadays people have to be equipped with knowledge of distinguishing different types of garbage. Now, given the waste compositions of a discarded product, you are asked to determine which category it belongs to. The waste compositions are represented as a string s consisting of only lowercase letters, where each letter represents a waste composition and has an equal proportion. Each waste composition in that product is in one of the three situations, dry, wet or harmful. The product can be classified by the following rules: In case that at least 25% of its compositions is harmful, it is harmful garbage. In case that at most 10% of its compositions is harmful, it is recyclable garbage. In other cases, if the proportion of dry compositions in it is at least twice that of wet compositions, it is dry garbage, or otherwise, it is wet garbage.
标签: HBC52024Kera'slinesegment 数据结构 线段树 树状数组 思维Garbage Classification题解