HBC52024Kera'slinesegment,数据结构,线段树,树状数组,思维Garbage Classification题解

2拍不死你 算法基础篇 66 0
不断提升技能,才能在职场中立于不败之地!全网最全C++题库,助您成为编程领域的佼佼者。
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题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断学习,不断挑战,才能在编程领域中脱颖而出!全网最全C++题库,助您成为编程高手!

标签: HBC52024Kera'slinesegment 数据结构 线段树 树状数组 思维Garbage Classification题解