The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition
標(biāo)簽: government streamline important alphabet
上傳時(shí)間: 2015-06-09
上傳用戶:weixiao99
c語(yǔ)言版的多項(xiàng)式曲線擬合。 用最小二乘法進(jìn)行曲線擬合. 用p-1 次多項(xiàng)式進(jìn)行擬合,p<= 10 x,y 的第0個(gè)域x[0],y[0],沒(méi)有用,有效數(shù)據(jù)從x[1],y[1] 開(kāi)始 nNodeNum,有效數(shù)據(jù)節(jié)點(diǎn)的個(gè)數(shù)。 b,為輸出的多項(xiàng)式系數(shù),b[i] 為b[i-1]次項(xiàng)。b[0],沒(méi)有用。 b,有10個(gè)元素ok。
標(biāo)簽: 多項(xiàng)式 曲線擬合 c語(yǔ)言 最小二乘法
上傳時(shí)間: 2014-01-12
上傳用戶:變形金剛
prolog 找路例子程序: === === === === === === Part 1-Adding connections Part 2-Simple Path example | ?- path1(a,b,P,T). will produce the response: T = 15 P = [a,b] ? Part 3 - Non-repeating path As an example, the query: ?- path2(a,h,P,T). will succeed and may produce the bindings: P = [a,depot,b,d,e,f,h] T = 155 Part 4 - Generating a path below a cost threshold As an example, the query: ?- path_below_cost(a,[a,b,c,d,e,f,g,h],RS,300). returns: RS = [a,b,depot,c,d,e,g,f,h] ? RS = [a,c,depot,b,d,e,g,f,h] ? no ==================================
標(biāo)簽: Part connections example prolog
上傳時(shí)間: 2015-04-24
上傳用戶:ljt101007
* * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES LOSS OF USE, DATA, OR PROFITS OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH D
標(biāo)簽: WARRANTIES SOFTWARE PROVIDED EXPRESS
上傳時(shí)間: 2013-12-20
上傳用戶:sxdtlqqjl
C# BigInteger class. BigInteger.cs is a csharp program. It is the BIgInteger class. It has methods: abs() , FermatLittleTest(int confidence) ,gcd(BigInteger bi) , genCoPrime(int bits, Random rand) , genPseudoPrime(int bits, int confidence, Random rand) , genRandomBits(int bits, Random rand) , isProbablePrime(int confidence) , isProbablePrime() , Jacobi(BigInteger a, BigInteger b) , LucasSequence(BigInteger P, BigInteger Q, BigInteger k, BigInteger n) ,max(BigInteger bi) , min(BigInteger bi) , modInverse(BigInteger modulus) , RabinMillerTest(int confidence) ,
標(biāo)簽: BigInteger class BIgInteger program
上傳時(shí)間: 2013-12-23
上傳用戶:ynzfm
The "GEE! It s Simple" package illustrates Gaussian elimination with partial pivoting, which produces a factorization of P*A into the product L*U where P is a permutation matrix, and L and U are lower and upper triangular, respectively. The functions in this package are accurate, but they are far slower than their MATLAB equivalents (x=A\b, [L,U,p]=lu(A), and so on). They are presented here merely to illustrate and educate. "Real" production code should use backslash and lu, not this package.
標(biāo)簽: illustrates elimination Gaussian pivoting
上傳時(shí)間: 2016-11-09
上傳用戶:wang5829
The "GEE! It s Simple" package illustrates Gaussian elimination with partial pivoting, which produces a factorization of P*A into the product L*U where P is a permutation matrix, and L and U are lower and upper triangular, respectively. The functions in this package are accurate, but they are far slower than their MATLAB equivalents (x=A\b, [L,U,p]=lu(A), and so on). They are presented here merely to illustrate and educate. "Real" production code should use backslash and lu, not this package.
標(biāo)簽: illustrates elimination Gaussian pivoting
上傳時(shí)間: 2014-01-21
上傳用戶:lxm
#include<stdio.h> #include<windows.h> int xuanxiang; int studentcount; int banjihao[100]; int xueqihao[100][10]; char xm[100][100]; int xuehao[100][10]; int score[100][3]; int yuwen; int shuxue[000]; int yingyu[100]; int c[100]; int p; char x[1000][100]="",y[100][100]="";/*x學(xué)院 y專業(yè) z班級(jí)*/ int z[100]; main() { void input(); void inputsc(); void alter(); void scbybannji(); printf("--------學(xué)生成績(jī)管理-----\n"); printf("請(qǐng)按相應(yīng)數(shù)字鍵來(lái)實(shí)現(xiàn)相應(yīng)功能\n"); printf("1.錄入學(xué)生信息 2.錄入學(xué)生成績(jī) 3.修改學(xué)生成績(jī)\n"); printf("4.查詢學(xué)生成績(jī) 5.不及格科目及名單 6.按班級(jí)輸出學(xué)生成績(jī)單\n"); printf("請(qǐng)輸入你要實(shí)現(xiàn)的功能所對(duì)應(yīng)的數(shù)字:"); scanf("%d",&xuanxiang); system("cls"); getchar(); switch (xuanxiang) { case 1:input(); case 2:inputsc(); case 3:alter(); /*case 4:select score(); case 5:bujigekemujimingdan();*/ case 6:scbybanji; } } void input() { int i; printf("請(qǐng)輸入你的學(xué)院名稱:"); gets(x); printf("請(qǐng)輸入你的專業(yè)名稱:"); gets(y); printf("請(qǐng)輸入你的班級(jí)號(hào):"); scanf("%d",&z); printf("請(qǐng)輸入你們一個(gè)班有幾個(gè)人:"); scanf("%d",&p); system("cls"); for(i=0;i<p;i++) { printf("請(qǐng)輸入第%d個(gè)學(xué)生的學(xué)號(hào):",i+1); scanf("%d",xuehao[i]); getchar(); printf("請(qǐng)輸入第%d個(gè)學(xué)生的姓名:",i+1); gets(xm[i]); system("cls"); } printf("您已經(jīng)錄入完畢您的班級(jí)所有學(xué)生的信息!\n"); printf("您的班級(jí)為%s%s%s\n",x,y,z); /*alter(p);*/ } void inputsc() { int i; for(i=0;i<p;i++) { printf("\n"); printf("--------------------------------------------------------------------------------\n\n"); printf("\t\t\t\t錄入學(xué)生的成績(jī)\n\n\n"); printf("--------------------------------------------------------------------------------\n\n"); printf("\t\t\t\t%s\n",xm[i]); printf("\n"); printf("\t\t\t\t數(shù)學(xué):"); scanf("%d",&shuxue[i]); printf("\n"); getchar(); printf("\t\t\t\t英語(yǔ):"); scanf("%d",&yingyu[i]); printf("\n"); getchar(); printf("\t\t\t\tc語(yǔ)言:"); scanf("%d",&c[i]); system("cls"); } } void alter() { int i;/*循環(huán)變量*/ int m[10000];/*要查詢的學(xué)號(hào)*/ int b;/*修改后的成績(jī)*/ char kemu[20]=""; printf("請(qǐng)輸入你要修改的學(xué)生的學(xué)號(hào)"); scanf("%d",&m); for (i=0;i<p;i++) { if (m==xuehao[i]) { printf("%s的數(shù)學(xué)成績(jī)?yōu)?d,英語(yǔ)成績(jī)?yōu)?d,c語(yǔ)言成績(jī)?yōu)?d,xm[i],shuxue[i],yingyu[i],c[i]"); printf("請(qǐng)輸入你想修改的科目");} } gets(kemu); getchar(); if (kemu=="數(shù)學(xué)"); { scanf("%d",&b); shuxue[i]=b;} if (kemu=="英語(yǔ)"); { scanf("%d",&b); yingyu[i]=b;} if (kemu=="c語(yǔ)言"); { scanf("%d",&b); c[i]=b; } printf("%s的數(shù)學(xué)成績(jī)?yōu)?d,英語(yǔ)成績(jī)?yōu)?d,c語(yǔ)言成績(jī)?yōu)?d,xm[i],shuxue[i],yingyu[i],c[i]"); } void scbybannji() { int i; char zyname[20]; int bjnumber; printf("請(qǐng)輸入你的專業(yè)名稱"); scanf("%s",&zyname); printf("請(qǐng)輸入你的班級(jí)號(hào)"); scanf("%d",&bjnumber); for (i=0;i<p;i++) { if (zyname==y[i]); if (bjnumber==z[i]); printf("專業(yè)名稱%s班級(jí)號(hào)%d數(shù)學(xué)成績(jī)%d英語(yǔ)成績(jī)%dc語(yǔ)言成績(jī)%d,y[i],z[i],shuxue[i],yingyu[i],c[i]"); } }
標(biāo)簽: c語(yǔ)言
上傳時(shí)間: 2018-06-08
上傳用戶:2369043090
This edition updates and continues the series of books based on the residential courses on radiowave propagation organised by the IEE/IET. The first course was held in 1974, with lectures by H. Page, P. Matthews, D. Parsons, M.W. Gough, P.A. Watson, E. Hickin, T. Pratt, P. Knight, T.B. Jones, P.A. Bradley, B. Burgess and H. Rishbeth.
標(biāo)簽: Propagation Radiowaves edition 3rd of
上傳時(shí)間: 2020-05-31
上傳用戶:shancjb
簡(jiǎn)易負(fù)離子發(fā)生器負(fù)離子增加,對(duì)人有催眠、止汗、鎮(zhèn)痛、增進(jìn)食欲,使人精神爽快,消除疲勞的作用。圖1是負(fù)離子發(fā)生器電路圖。220V交流市電經(jīng)D1整流后向C3和C2充電,當(dāng)C2充電至氖泡導(dǎo)通并觸發(fā)SCR導(dǎo)通時(shí),C3經(jīng)SCR、B的L1放電,經(jīng)B感應(yīng)升壓后,由D2反向整流得8kV直流高壓使發(fā)生器M的分子電離而產(chǎn)生負(fù)離子。調(diào)整R3的阻值可以改變觸發(fā)頻率和輸出電壓。調(diào)整時(shí)必須注意安全,更換元件需撥下電源插頭
標(biāo)簽: 負(fù)離子發(fā)生器
上傳時(shí)間: 2013-10-29
上傳用戶:731140412
蟲(chóng)蟲(chóng)下載站版權(quán)所有 京ICP備2021023401號(hào)-1