随笔分类 -  二分 三分

摘要:#include#include#include#include#includeusing namespace std;int n,c;int a[100000+100];int solve(int m){ int ret=1; int i,j,k; int l=0,r; f... 阅读全文
posted @ 2015-08-05 21:46 sola94 阅读(142) 评论(0) 推荐(0)
摘要:题意:需要从(0,0) 点 到(x,y) 修一段路 其中有n条和y轴平行的河 修路的单位成本c1 修桥的单位成本c2 问最小总成本为多少思路:把所有河合并 再三分桥的长度 求出最小成本#include#include#include#include#include#in... 阅读全文
posted @ 2015-03-29 22:53 sola94 阅读(106) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5144题意 :给出初速度 v 和高度 h 求最远斜抛距离思路:根据物理公式推出 距离s=v*cos(x)*(t1+t2); 再对x从0 到π/2 进行三分#include#include#include... 阅读全文
posted @ 2015-01-26 13:16 sola94 阅读(108) 评论(0) 推荐(0)
摘要:E -Strange fuctionTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 2899DescriptionNow, here is a fuction:F(x)... 阅读全文
posted @ 2014-11-04 17:42 sola94 阅读(161) 评论(0) 推荐(0)