早教吧作业答案频道 -->其他-->
一道acm题GuessinggameSelf-AdaptTestisacomputerbasedtestthatiswidelyusedsuchasGRE,GMATandLSAT.Thetestcontinuesaccordingtohowthetest-takersperformed,whichmeans,differentanswerwouldleaddifferentquestionensue.Schoo
题目详情
一道acm题 Guessing gameSelf-Adapt Test is a computer based test that is widely used such as GRE, GMAT and LSAT. The test continues according to how the test-takers performed, which means, different answer would lead different question ensue. School of Applied Mathematics is preparing a words guessing game in concept of the Self-Adapt Test. In the game, the player could choose any word as beginning to guess the meaning. If the guessing is correct, the system would lead to a certain word while lead to another if the answer is incorrect. For instance, the first word is "abandon", if you succeed guessing it out, the next word is "abnormal"; if your guessing is wrong, the coming word is "abolish". In one word, correct answer and incorrect answer would lead different series of words following. Each word to guess has its score, and you can get the score if you guess it correctly or else you would miss it. The game can be stop whenever you like. Now the problem is, in order to gain the total scores greater or equal to T points, what's the minimum number of words you must guess out correctly? Note that each word may appear only once in the game and there's no cycle in guessing order.
▼优质解答
答案和解析
#include int compare(int b[],int c[],int b_len) //比较大整数的大小 { int p; for(p=0;c[p]!='\n';p++) p--; if (b_lenc[i]) return 0; else return 1; } } int minus(char a[],char b[],char c[],int b_len) { int n=0,p,h=0,i,j; char *A,*B,*C; A=a; B=b; C=c; for(p=0;a[p]!='\n';p++) p--; if(p=0;i--,j--) { while(j>=0) { if(*(A+i)+h>=*(B+j)) { *(C+i)=*(A+i)-*(B+j); h=0; } else { h=-1; *(C+i)=*(B+j)-*(A+i)+h; } i--; j--; } *(C+i)=*(C+i)+h; } A=C; } return n; }
看了 一道acm题Guessing...的网友还看了以下:
请大家发表下自己的解法,学过高数的进来看看函数f(x),g(x)在区间a,b上连续可导,且导数均不为 2020-03-31 …
首字母英语填空题目!一.根据首字母填空I"m a (m ) school student.I go 2020-05-16 …
如图所示,隔板I固定不动,活塞II可自由移动.M、N两个容器中均发生如下反应:A(g)+3B(g) 2020-05-16 …
吉他谱中,右手手指编号,p,i,a,m,x,分别对应什么? 2020-07-21 …
如表是元素周期表的一部分,有关说法中正确的是()ⅠAⅡAⅢAⅣAⅤAⅥAVⅡA二abc三defgh 2020-07-23 …
各位帮我解一题九宫图用0到9的数字填进九宫图的A到IABCDEFGHI要求:A+B+C=D+E+F= 2020-11-02 …
职中数学题,关于集合.@@急!1)已知集合A={m,a,t,h,s},B={e,n,g,l,i,s, 2020-11-10 …
给加粗的字选择正确的读音。矮小(A.wěi;B.ǎi)坟墓(A.fén;B.wén)怅惘(A.w 2020-11-12 …
选出下面各项中字音有误的一项:A成绩斐然fěi孵化fū惊魂甫定fǔ作茧自缚fùB言简意赅gāi罡风g 2020-12-23 …
英文单词分类填空动物类1.O()t()p()s2.k()t()e()3.l()b()t()r4.a( 2021-02-05 …