博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
poj Dropping tests 01分数规划---Dinkelbach算法
阅读量:4597 次
发布时间:2019-06-09

本文共 544 字,大约阅读时间需要 1 分钟。

果然比二分要快将近一倍。63MS。二分94MS。

 

#include 
#include
#include
#include
#include
#include
using namespace std;const int maxn=1005;double a[maxn],b[maxn];const double eps=1e-6;int n,k;struct dnode{ double x; int index;}d[maxn];bool cmp(dnode a,dnode b){ return a.x>b.x;}int main(){ while(scanf("%d%d", &n, &k) != EOF) { if(n+k==0)break; for(int i=0;i
=eps); printf("%.0f\n", l * 100); } return 0;}

 

 

转载于:https://www.cnblogs.com/xinyuyuanm/p/3211942.html

你可能感兴趣的文章
Koch 分形,海岸线,雪花
查看>>
ubuntu系统下Python虚拟环境的安装和使用
查看>>
IOS7开发~新UI学起(二)
查看>>
软件过程度量和CMMI模型概述
查看>>
数据结构(DataStructure)与算法(Algorithm)、STL应用
查看>>
Linux与Windows xp操作系统启动过程
查看>>
linux运维、架构之路-Kubernetes1.13离线集群部署双向认证
查看>>
[Leetcode]Substring with Concatenation of All Words
查看>>
Gem install rmagick 报错问题~
查看>>
验证一个方法触发时机
查看>>
25句充满正能量的句子
查看>>
python学习手册笔记——27.更多实例
查看>>
Spring Cloud Alibaba 新版本发布:众多期待内容整合打包加入!
查看>>
Android Camera 使用小结
查看>>
20170908 校内模拟赛 游戏
查看>>
P1774 最接近神的人_NOI导刊2010提高(02)
查看>>
4245: [ONTAK2015]OR-XOR
查看>>
DataGridView的DataGridViewCheckBox问题
查看>>
C#导出成Excel文档
查看>>
C语言指针总结
查看>>