码迷,mamicode.com
首页 >  
搜索关键字:strange fuction    ( 492个结果
hdu 1548 A strange lift
题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1548A strange liftDescriptionThere is a strange lift.The lift can stop can at every floor as you want, a...
分类:其他好文   时间:2015-06-26 21:01:22    阅读次数:98
Strange Sum
题目大意:对于一个大于$1$的正整数$x$,定义$v(x)$为不超过$x$的最大质数,$u(x)$为大于$x$的最小质数。给定$n(n\le10^9)$,求:$$\sum_{i=2}^n\frac{1}{v(i)\cdot u(i)}$$多组数据,要求按最简分数形式输出。分析:对于任意两个相邻质数$...
分类:其他好文   时间:2015-06-25 22:39:34    阅读次数:145
Python strange questions list
sys.setrecursionlimit(1<<64)Line 3: OverflowError: Python int too large to convert to C longmax: 2**64-1, (1<<64) - 1sys.setrecursionlimit(1<<31)Line ...
分类:编程语言   时间:2015-06-20 15:33:06    阅读次数:160
【司雨寒】最短路专题总结
最近在刷郏老大博客上的最短路专题【HDU】1548 A strange lift 基础最短路(或bfs) 1 //#define LOCAL 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const int maxn...
分类:其他好文   时间:2015-06-14 10:50:38    阅读次数:217
POJ 3107 Godfather
Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 5154Accepted: 1793DescriptionLast years Chicago was full of gangster fights and strange murde...
分类:其他好文   时间:2015-06-10 14:04:19    阅读次数:107
hdu 1548 A strange lift
......
分类:其他好文   时间:2015-06-08 13:22:12    阅读次数:170
HDU Strange fuction(二分+精度控制)
相当于y是个常数求 F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 =0 && x0[0-100]上单增,所以F'(x)0(x>x0),所以F(x)在x=x0处取得最小值,所以本题主要就是二分求解方程的x0,然后直接带入x0,y计算即可。 #include #include #include const double eps = 1e-6; double cal(...
分类:其他好文   时间:2015-06-04 09:58:31    阅读次数:122
HDU 1548 A strange lift 奇怪的电梯(BFS,水)
题意:有一座电梯,其中楼层从1~n,每层都有一个数字k,当处于某一层时,只能往上走k层,或者下走k层。楼主在a层,问是否能到达第b层?思路:在起点时只能往上走和往下走两个选择,之后的每层都是这样,那么就类似于二叉树。每个节点就是对应的层,因为有可能碰到循环的层,比如1跳到3,3跳回1,这样使得无限循...
分类:其他好文   时间:2015-06-03 23:25:42    阅读次数:137
HDU 2899 Strange fuction (求导解方程+二分查找)
题目链接:click here~~ 【题目大意】: Now, here is a fuction:  F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 【解题思路】: 首先,对该式子,求一阶导,得到F'(x) = 42*x^6 + 48*x^5+21*x^2+10*x-y,这里,我们忽略y,可发现,导函数42*x^6 + 48*x^5+21*x^2+10...
分类:其他好文   时间:2015-06-02 20:10:35    阅读次数:106
位运算+枚举
位运算http://c.biancheng.net/cpp/html/101.html在很多情况下(比如翻棋子)在搜索时涉及大量枚举往往导致超时,位运算则很好地解决了这个问题,方便又快捷HDU 1882 Strange Billboardhttp://acm.hdu.edu.cn/showprobl...
分类:其他好文   时间:2015-05-30 21:08:31    阅读次数:99
492条   上一页 1 ... 30 31 32 33 34 ... 50 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!