Loading

摘要: A. Buy the String 大意: 给定一个01字符串,$c_0$代表购买一个字符0的花费,$c_1$代表购买一个字符1的消费,h代表0和1转换的花费,问购买整个字符串花费最小值 思路: 贪心比较直接购买和转换的价格即可 #include<bits/stdc++.h> using names 阅读全文
posted @ 2020-11-23 15:13 dyhaohaoxuexi 阅读(113) 评论(0) 推荐(0) 编辑