Educational Codeforces Round 71 (Rated for Div. 2) Solution A~G
A. There Are Two Types Of Burgers 题意: 给一些面包,鸡肉,牛肉,你可以做成鸡肉汉堡或者牛肉汉堡并卖掉 一个鸡肉汉堡需要两个面包和一个鸡肉,牛肉汉堡需要两个面包和一个牛肉 求能得到的最多的钱 直接贪心,哪个比较贵就选哪个做,剩下的材料再做另一个 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> using namespace std; typedef long long ll; inline int read() { int x=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9') { if(ch=='-') f=-1; ch=getchar(); } while(ch>='0'&&ch<='9') { x=(x<<1)+(x<<3)+(ch^48); ch=getchar(); } return x*f; } const int N=2e5+7; int T,n,a,b,va,vb; int main() { T=read(); while(T--) { n=read(),a=read(),b=read(); va=read(),vb=read(); if(va>vb) {