- 1、本文档共10页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
2010ACM程序设计亚洲域哈尔滨初赛试题
Description
In our high school, we had learn a theorem: if two numbers have the invariablenes sum, they will get the maximum product when they are equal, on the side, another is if two numbers have the invariablenes product, they will get the minimum sum when each of them equals the other one.Now, I will give you a same equations, you should give me the result that you can get from the above theorems.
Input
There are several test cases. Each case contains a string, it is an equation, and its length is less than 1024. In the equation, the variants are different, and only contain lower letters, the number is a legality double number variants , operator sign and number are separate by spaces.
Output
Output the result that you can get from the two theorems(the result is rounded to two decimal digits). And the result should express as ranges, ranges will be united by letter U, each range have a left value and a right value and the range should begin with ( and end with ), if the value is infinite it should be replace with inf, all numbers, signs, values should separate by space.
Sample Input
x + y = ?-4.00a * b = 4.0401s * t = -0.000i * j = ? 0.01
Sample Output
(-inf x * y = 4.00)(-inf a + b = -4.02) U (4.02 = a + b +inf)(-inf s + t +inf)(-inf i + j = -0.20) U (0.20 = i + j +inf)
Description
One day, XiaoA is calculating an upright expression(A is not zero):?ABCD*) ? ?9------?DCBAHe found the answer is ABCD=1089, and then, he think about a hard question (it is below), what is the answer??ABCDEFGH...RST*) ? ? ? ? ? ? ? ? ? X--------------------------?TSR...HGFEDCBA
Input
There are several test cases. Each case contains two integer L and X, L indicates the length of the variant above and X is the value of the factor (0L=1024, 0=X=9).
Output
You should output the solution for the upright expression, if there is more than one solution, you should output the minimum solution, and if there is not solution, you should output No solution
Sample Input
文档评论(0)