CF1207A There Are Two Types Of Burgers
Posted lyt020321
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CF1207A There Are Two Types Of Burgers相关的知识,希望对你有一定的参考价值。
代码
#include <bits/stdc++.h>
using namespace std ;
int T , b , p , f , h , c , ans ;
int main ()
cin >> T ;
while(T --)
ans = 0 ;
cin >> b >> p >> f >> h >> c ;
if(h > c)
int rest = min(b/2,p) ;
ans += rest * h ;
b -= rest*2 ;
if(b >= 2)
rest = min(b/2,f) ;
ans += rest * c ;
cout << ans << endl ;
else
int rest = min(b/2,f) ;
ans += rest * c ;
b -= rest*2 ;
rest = min(b/2,p) ;
ans += rest * h ;
cout << ans << endl ;
return 0 ;
溜了溜了
以上是关于CF1207A There Are Two Types Of Burgers的主要内容,如果未能解决你的问题,请参考以下文章
Educational Codeforces Round 71 (Rated for Div. 2) A - There Are Two Types Of Burgers
Spirng 循环依赖报错:Is there an unresolvable circular reference?
English trip V1 - B 14. There Are Flowers in My Office 我办公室里有花 Teacher:Lamb Key: There be(is/are)