![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数学
naturelan
这个作者很懒,什么都没留下…
展开
-
hdu_1049 Climbing Worm(数学,模拟)
http://acm.hdu.edu.cn/showproblem.php?pid=1049 分析: 小学数学题,直接用模拟做 代码: #include #include #include #include #include #define LL long long using namespace std; int n,u,d; int main() { /原创 2014-01-02 13:52:14 · 520 阅读 · 0 评论 -
hdu 1005
Problem Description A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. Given A, B, and n, you are to calculate the value of f(n). I原创 2013-02-23 22:23:19 · 548 阅读 · 0 评论 -
hdu 1008
//elavator #include using namespace std; int num; void elavator(int *b) { int time=0; for(int i=1;i<=num;i++){ if(b[i]>b[i-1]) time+=(b[i]-b[i-1])*6; else if(b[i]<b[i-1]) time+=(b原创 2013-01-06 09:15:45 · 432 阅读 · 0 评论 -
hdu_1008 Elevator
http://acm.hdu.edu.cn/showproblem.php?pid=1008 代码:原创 2014-04-15 11:16:56 · 509 阅读 · 0 评论 -
hdu_1275 两车追及或相遇问题
http://acm.hdu.edu.cn/showproblem.php?pid=1275 分析: 两车第i次重合: 相遇:t * (va + vb) = s * (2* i-1) ; 追及:t * |va - vb | = s* (2*i -1); 途中可能相遇也可能追及(第一次一定为原创 2013-11-24 16:04:01 · 1586 阅读 · 1 评论