欢迎来到天天文库
浏览记录
ID:35539357
大小:59.57 KB
页数:11页
时间:2019-03-25
《2010acm程序设计亚洲域哈尔滨初赛试题》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、DescriptionInourhighschool,wehadlearnatheorem:"iftwonumbershavetheinvariablenessum,theywillgetthemaximumproductwhentheyareequal蔦ontheside,anotheris"iftwonumbershavetheinvariablenesproduct,theywillgettheminimumsumwheneachofthemequalstheotherone11.Now,Iwillgiveyo
2、uasameequations,youshouldgivemetheresultthatyoucangetfromtheabovetheorems.InputThereareseveraltestcases.Eachcasecontainsastring,itisanequation,anditslengthislessthan1024.Intheequation,thevariantsaredifferent,andonlycontainlowerletters,thenumberisalegalitydouble
3、numbervariants,operatorsignandnumberareseparatebyspaces.OutputOutputtheresultthatyoucangetfromthetwotheorems(theresultisroundedtotwodecimaldigits).Andtheresultshouldexpressasranges,rangeswillbeunitedbyletternU,f5eachrangehavealeftvalueandarightvalueandtheranges
4、houldbeginwith"(”andendwith”)",ifthevalueisinfiniteitshouldbereplacewith"inf”,allnumbers,signs,valuesshouldseparatebyspace.SampleInputx4-y=-4.00a*b=4.0401s*t=-0.000i*j=0.01SampleOutput(-inf5、v=-0.20)U(0.20v=i+jv4-inf)DescriptionOneday,XiaoAiscalculatinganuprightexpression(Aisnotzero):ABCD*)9DCBAHefoundtheanswerisABCD=1089,andthen,hethinkaboutahardquestion(itisbelow),whatistheanswer?ABCDEFGH...RST*)XTSR...HGFEDCBAInputThereareseveraltestcases.Eachca6、secontainstwointegerLandX,LindicatesthelengthofthevariantaboveandXisthevalueofthefactor(07、tput,fNosolutiorTSampleInput496531SampleOutput1089Nosolution101HintThedifferentletterscanindicatesamenumber.DescriptionWedefinethatifIntegerXandNsatisfythat:X*X<=N<(X+1)气X+1),XcanbecalledastherootofN.Now,IgiveyouaintegerN,youshouldtellmewhatistherootofit,andthe8、resultisbinarydigits.InputThereareseveraltestcases,eachcasecontainsanIntegerN(0<=N<=10^200)#indicatestheendofinput.OutputOutputtherootofinputinbinarydigits.SampleInput456100
5、v=-0.20)U(0.20v=i+jv4-inf)DescriptionOneday,XiaoAiscalculatinganuprightexpression(Aisnotzero):ABCD*)9DCBAHefoundtheanswerisABCD=1089,andthen,hethinkaboutahardquestion(itisbelow),whatistheanswer?ABCDEFGH...RST*)XTSR...HGFEDCBAInputThereareseveraltestcases.Eachca
6、secontainstwointegerLandX,LindicatesthelengthofthevariantaboveandXisthevalueofthefactor(07、tput,fNosolutiorTSampleInput496531SampleOutput1089Nosolution101HintThedifferentletterscanindicatesamenumber.DescriptionWedefinethatifIntegerXandNsatisfythat:X*X<=N<(X+1)气X+1),XcanbecalledastherootofN.Now,IgiveyouaintegerN,youshouldtellmewhatistherootofit,andthe8、resultisbinarydigits.InputThereareseveraltestcases,eachcasecontainsanIntegerN(0<=N<=10^200)#indicatestheendofinput.OutputOutputtherootofinputinbinarydigits.SampleInput456100
7、tput,fNosolutiorTSampleInput496531SampleOutput1089Nosolution101HintThedifferentletterscanindicatesamenumber.DescriptionWedefinethatifIntegerXandNsatisfythat:X*X<=N<(X+1)气X+1),XcanbecalledastherootofN.Now,IgiveyouaintegerN,youshouldtellmewhatistherootofit,andthe
8、resultisbinarydigits.InputThereareseveraltestcases,eachcasecontainsanIntegerN(0<=N<=10^200)#indicatestheendofinput.OutputOutputtherootofinputinbinarydigits.SampleInput456100
此文档下载收益归作者所有