Home Resume Mood Amusement About
百度之星2020---1001.Discount
2020-07-26 |

Problem Description 学皇来到了一个餐馆吃饭。他觉得这家餐馆很好吃,于是就想办个会员。 一共有 n种会员充值卡套餐,假设学皇这餐饭的消费为 a元,选择第 i种套餐,需要充值 b[i] * a 的钱,这次吃饭可以打 c[i]×10 折,由充值的钱支付(即这次吃饭只需要从充值金额中扣除 a×c[i] 元)。以后用剩余的充值的钱吃饭不再打折。 请问学皇应该选择哪个套餐(必须选择恰好一个套餐),使得优惠的比例最大? 优惠比例的定义是把充的钱用完以后,(本来应该付的钱 - 实际付的钱) / 本来应该付的钱。在这个题目里,实际付的钱就是这次充值的花费。

Algorithm | Algorithm
Prev123

head-sculpture

CHAsencenge

解字

Recent
  • FPS问题解决记录
  • 单例模式
  • 工厂模式
  • 手撸算法终版
  • 哈希专题
  • 特殊技巧专题
  • 栈和队列专题
  • 树专题
Categories
  • Algorithm21
  • Android1
  • DesignPattern2
  • Docker1
  • GameDev4
  • Git1
  • Hexo2
  • Laya4
  • Light Frequency Authenticate1
  • Linux1
  • LoRa1
  • Python4
  • Unity5
    • Unreal1
  • Writing3
  • cpp3
Archives
  • 2021-011
  • 2020-122
  • 2020-111
  • 2020-109
  • 2020-096
  • 2020-086
  • 2020-0721
  • 2019-111
  • 2019-092
  • 2019-076
Tags
Algorithm C++ Docker GameDev Git Gradle Hexo Laya LoRa Python UE Unity Unreal Writing cpp hexo lightFre writing 远程登录
Copyright © 2019 | Powered by Hexo | Theme by Loren | 浙ICP备18016660号-1