
数值方法
jchalex
善待人,严做事,无节操
展开
-
hdu - 2899 - Strange fuction(二分)
题意:求F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2899——>>分类讨论+二分。#include #include #define F(x) (6*pow(x, 7) + 8*pow(x, 6) + 7*pow(x, 3) + 5*pow(x, 2原创 2013-05-22 13:42:54 · 1005 阅读 · 0 评论 -
hdu - 2199 - Can you solve this equation?(二分)
题意:求8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y在[0, 100]上的解。题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2199——>>简单二分。发现,在hust上用函数写法0ms过,用define写法15ms过,而这两种写法在hdu上都是0ms过。奇葩~函数写法:#include #includ原创 2013-05-21 13:33:39 · 1140 阅读 · 0 评论 -
Uva - 1476 - Error Curves(三分)
题意:求函数F(x) = max(S(x)) 的最小值。S(x) = a*x^2 + b*x + c(0 ≤ a ≤ 100),输入多个S(x)。题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=493&problem=4222——>>做的原创 2013-03-18 21:37:59 · 1065 阅读 · 0 评论 -
Uva - 10341 - Solve It(二分)
题意:解方程p*e-x + q*sin(x) + r*cos(x) + s*tan(x) + t*x2 + u = 0 where 0 x .(0 p,r and -20 q,s,t <= 0)题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=原创 2013-03-18 20:27:08 · 2372 阅读 · 0 评论 -
hdu - 1402 - A * B Problem Plus(FFT)
题意:求A * B(A,B的位数不超过50000位)。题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1402——>>在我刚上大学的时候,若遇到它,猜想我会输入2个int,然后直接用*输出;在学了大数高精度之后,若遇到它,猜想我会用大数去乘;结果还是把神题看成了水题。。。10场多校,FFT常常在解题报告中出现,实在不能不去看看这个传奇的FF原创 2013-08-24 16:25:21 · 1384 阅读 · 0 评论 -
hdu - 4704 - Sum(费马小定理)
题意:求一个正整数N拆分成1到N个正整数的和,有多少种拆法(3 = 2 + 1和3 = 1 + 2算2种不同的拆法)(1 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4704——>>数学不太行呀,还好队友给力~题意转换为求2 ^ (N - 1),不过N好大~由费马小定理,得2 ^ (10 ^ 9 + 6) % (10 ^ 9 + 7原创 2013-08-22 20:26:02 · 1442 阅读 · 0 评论 -
zoj - 2928 - Mathematical contest in modeling(爬山)
题意:空间中有 n(3 题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2928——>>如果是一维的,那么答案是中位数;现在是三维的,赛时不会,赛后学了一种叫做爬山的随机算法用于这题。爬山算法:先选取其中一值作为最优值,然后向该值附近扫描,若发现更优的值,则以该更优值作为最优值,继续迭代扫描;否则所选值原创 2015-03-30 20:23:32 · 817 阅读 · 0 评论