当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6985:Calculus

题目描述
This summer, ZXyang became so tired when doing the problems of Multi-University contests. So he decided to attend the Unified National Graduate Entrance Examination. This day, he sees a problem of series.

Let $S(x)$ be a function with $x$ as the independent variable. $S(x)$ can be represented by the formula as follow.

$$f(x)=\sum_{i=1}^n f_i(x)$$

$$S(x)=\sum_{j=1}^xf(j)$$

$f_i(x)$ is a function with $x$ as the independent variable. Furthermore. $f_i(x)$ belongs to the function set $F$.

$$
F=\left \{
C,
\frac{C}{x},
C\sin x,
C\cos x,
\frac{C}{\sin x},
\frac{C}{\cos x},
Cx,
C^x
\right \}
$$

$C$ is a constant integer ranging from $0$ to $10^9$.

ZXyang wonders if $S(x)$ is convergent. $S(x)$ is convergent if and only if $ \lim\limits_{x\to \infty}S(x)=c$, where $c$ is a constant.
输入解释
The first line of input contains a single integer $t\ (1\leq t\leq 10^4)$ --- the number of test cases.

The first and the only line of each test case contains a single string $s\ (1\leq |s|\leq 100)$, indicating the formula of $f(x)$. Fraction is presented as $\text{a/b}$. $C^x$ is presented as $\text{C^x}$. It's guaranteed that the constant $C$ won't be left out when $C=1$. $f(x)$ consists of functions from $F$ connected with $+$.
输出解释
For each test case, print $\text{YES}$ in one line if $S(x)$ is a convergent sequence, or print $\text{NO}$ in one line if not.
输入样例
2
1sinx+0cosx+3x+6/sinx
0
输出样例
NO
YES

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6985

最后修改于 2021-10-23T19:10:54+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
4000/2000MS(Java/Others) 262144/262144K(Java/Others)