【OJ】1033: 奇怪的餐厅

刚刚开始没有弄清楚题目意思,这题的关键就是每次选择那个折扣率最小的那个人付钱,就是用到了贪心的思想,具体的分析与其中的坑且见代码: #include<stdio.h> #include<stdlib.h> #include<algorithm> #include<string.h> using namespace std; struct Node { double dicount; int
相关文章
相关标签/搜索