UVA 1648(p346)----Business Center
来源:互联网 发布:cmd打开端口命令 编辑:程序博客网 时间:2024/05/19 01:30
#include<iostream>#include<cstdio>#include<algorithm>using namespace std;const int INF=1e10;int main(){ int n,m; while(scanf("%d%d",&n,&m)==2&&n) { int ans=INF; for(int i=0; i<m; i++) { int u,d; scanf("%d%d",&u,&d); int x=(n*d)/(u+d)+1; int y=(u+d)*x-n*d; ans=min(ans,y); } printf("%d\n",ans); } return 0;}
0 0
- UVA 1648(p346)----Business Center
- uva 1648 Business Center 简单数学
- uva 1648 Business Center 数学+二分
- Business Center
- Business Center
- Business Intelligence Center
- poj3863 Business Center 贪心
- 4159: [Neerc2009]Business Center
- poj 3863Business Center
- poj 3863 Business Center
- B. Business Center
- [POJ3863]Business Center
- UVA 10002 Center of Masses
- UVa 10002 - Center of Masses
- Uva 10585 - Center of symmetry
- UVA 10585 - Center of symmetry
- UVa 10585 - Center of symmetry
- UVA 10585 Center of symmetry
- 关于”unicode字符是2个字节“这句话的讨论
- PHP反射(ReflectionClass、ReflectionMethod)在ThinkPHP框架的控制器调度模块中的应用
- Android studio 中 butterknife zelezny 的使用
- android app Lose Weight
- linux sudo 命令学习笔记
- UVA 1648(p346)----Business Center
- IOS Apps 开发(Swift)(6)——Implement a Custom Control(2)
- linux设备驱动归纳总结(八):1.总线、设备和驱动
- file not found. nginx php nginx 如何开启解析 PHP 的功能
- Git分支管理总结
- SQL Server数据库设计规范
- linux设备驱动归纳总结(八):2.总线、设备和驱动的关系
- 通过 ip 直接访问项目
- java日志,需要知道的几件事(commons-logging,log4j,slf4j,logback)