文章
34
粉丝
316
获赞
10
访问
24.2k
#include<bits/stdc++.h>
using namespace std;
typedef struct Drink
{
int ml;
int price;
};
bool cmp(Drink* a, Drink* b)
{
if (((float)a->ml / a->price) < ((float)b->ml / b->price) ) return false;
return true;
}
int main()
{
int x, n;
while (cin >> x >> n)
{
if (x == -1 && n == -1) return 0;
vector<Drink*> data;
for (int i = 0; i < n; i++)
{
 ...
登录后发布评论
暂无评论,来抢沙发