牛客练习赛73 A(wa了几十次)

四舍五入

#include<bits/stdc++.h>

using namespace std;
const int N = 1e5+9;
double c[N]; 
int main()
{
	int n,m,p;
	cin>>n>>m>>p;
	for(int i=0;i<n;i++)
	{
	   double a,b;
	   scanf("%lf%lf",&a,&b);
	   c[i] = a*0.85 + b*0.15;
	}
	sort(c,c+n,greater<double>());
	double tmp = (c[m-1]- p*0.15)/0.85;
    if(tmp<=0) puts("0");
    else 
	printf("%.f\n",tmp+0.5);
	return 0;
} 
posted @   翔村亲亲鸟  阅读(13)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
· 25岁的心里话
点击右上角即可分享
微信分享提示