原题链接 题目大意:x的取值从0.000到2.000,输出每个x对应的y(x)的值 解法:参考了这篇日志http://www.cnblogs.com/godhand/archive/2010/04/29/1723494.html.计算的公式文章里都推导了,关键是要把握好精度和运算效率的关系.分母中含有k的多项式越多,相同循环次数的结果的精度就越高.最后,还要加上一个误差项,没有这一项可能还是要WA. 参考代码: #include<stdio.h> #include<math.h>…
简单入门题.按照题目给的指导编程,算多少数要理解题意. #include <stdio.h> int main(){ int k,ssx; double x,psix; ;ssx<=;x+=*x){ psix=; ;k<;k++) psix += )*(k+x)); psix = psix*(-x) + (-x)/(**) + 1.0; printf("%5.3f %16.12f\n",x,psix); } ; }…
Numerical Summation of a Series Time Limit: 10 Seconds      Memory Limit: 32768 KB      Special Judge Produce a table of the values of the series Equation 1 for the 2001 values of x, x= 0.000, 0.001, 0.002, ..., 2.000. All entries of the table must h…
#include<bits/stdc++.h> using namespace std; int main() { double i; double k; for(i=0.000;i-2.000<=0.00000001;i+=0.001) { k=; +(-i)/(**); <) { sum+=(-i)/(k*(k+i)*(k+)); k=k+; } printf("%5.3lf %16.12lf\n",i,sum); } ; }…
和 hdu 1215 一个意思// 只是我 1坑了 1 时应该为0 #include <iostream> #include <math.h> #include <map> #include <stack> #include <queue> #include <vector> #include <algorithm> #include <stdio.h> #include <string.h> us…
题目链接: HDU:http://acm.hdu.edu.cn/showproblem.php?pid=4791 ZJU:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5072 Problem Description Alice is providing print service, while the pricing doesn't seem to be reasonable, so people using her pr…
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2818 题目描述: Given positive integers B and N, find an integer A such that AN is as close as possible to B. (The result A is an approximation to the Nth root of B.) Note that AN may be l…
题目链接:problemId=5383">http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5383 Do you know reverse Polish notation (RPN)? It is a known notation in the area of mathematics and computer science. It is also known as postfix notation since ever…
acm之pku题目分类 对ACM有兴趣的同学们可以看看 DP:  1011   NTA                 简单题  1013   Great Equipment     简单题  1024   Calendar Game       简单题  1027   Human Gene Functions   简单题  1037   Gridland            简单题  1052   Algernon s Noxious Emissions 简单题  1409   Commun…
以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight Moves1101 Gamblers1204 Additive equations 1221 Risk1230 Legendary Pokemon1249 Pushing Boxes 1364 Machine Schedule1368 BOAT1406 Jungle Roads1411 Annive…