Problem 3788 --Calculus

3788: Calculus

"
Time Limit $1$ 秒/Second(s) Memory Limit $128$ 兆字节/Megabyte(s)
提交总数 $1$ 正确数量 $1$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 数学

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.



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

F={C,C/x,Csinx,Ccosx,C/sinx,C/cosx,Cx,Cx}


C is a constant integer ranging from 0 to 109.
ZXyang wonders if S(x) is convergent. S(x) is convergent if and only if limx→∞S(x)=c, where c is a constant.


 
The first line of input contains a single integer t (1≤t≤104) --- the number of test cases.

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

推荐代码 查看3788 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$104 $ms] 只能过个样例~~~ 789785 2021-12-02 11:17:36
内存最少[$2080 $KB] 只能过个样例~~~ 789785 2021-12-02 11:17:36
第一AC 只能过个样例~~~ 789785 2021-12-02 11:17:36
第一挑战 只能过个样例~~~ 789785 2021-12-02 11:17:36

赛题来源/所属竞赛 N/A

竞赛编号 竞赛名称 竞赛时间 访问比赛