欢乐赛T3题解
2025-08-26 21:49:50
发布于:广东
3阅读
0回复
0点赞
解题思路
看什么看,枚举啊笨蛋
实际代码
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, x, y;
int max_=INT_MIN;
ios::sync_with_stdio(false);
cin.tie(NULL), cout.tie(NULL);
cin >> n >> x >> y;
for(int i=1;i<=n;++i){
int a, b;
cin >> a >> b;
double bj = 1.0*x/100+1.0*a/100, bs = y*1.0/100+b*1.0/100;
if(bj>1){
bs += (bj-1)*3;
bj = 1;
}
int damage = 10000*bj*(1.0+bs)+10000*(1.0-bj)*1.0;
max_=max(max_, damage);
} cout << max_;
}
这里空空如也
有帮助,赞一个