-
【問(wèn)題描述】
在一個(gè)N*N的點(diǎn)陣中,如N=4,你現(xiàn)在站在(1,1),出口在(4,4)。你可以通過(guò)上、下、左、右四種移動(dòng)方法,在迷宮內(nèi)行走,但是同一個(gè)位置不可以訪問(wèn)兩次,亦不可以越界。表格最上面的一行加黑數(shù)字A[1..4]分別表示迷宮第I列中需要訪問(wèn)并僅可以訪問(wèn)的格子數(shù)。右邊一行加下劃線數(shù)字B[1..4]則表示迷宮第I行需要訪問(wèn)并僅可以訪問(wèn)的格子數(shù)。如圖中帶括號(hào)紅色數(shù)字就是一條符合條件的路線。
給定N,A[1..N] B[1..N]。輸出一條符合條件的路線,若無(wú)解,輸出NO ANSWER。(使用U,D,L,R分別表示上、下、左、右。)
2 2 1 2
(4,4) 1
(2,3) (3,3) (4,3) 3
(1,2) (2,2) 2
(1,1) 1
【輸入格式】
第一行是數(shù)m (n < 6 )。第二行有n個(gè)數(shù),表示a[1]..a[n]。第三行有n個(gè)數(shù),表示b[1]..b[n]。
【輸出格式】
僅有一行。若有解則輸出一條可行路線,否則輸出“NO ANSWER”。
標(biāo)簽:
點(diǎn)陣
上傳時(shí)間:
2014-06-21
上傳用戶:llandlu
-
asp 客戶關(guān)系管理系統(tǒng)的實(shí)際與實(shí)現(xiàn),包括源碼和相關(guān)文檔(論文)-asp customer relationship management system and implementation of practical, including source code and related documentation (Thesis)
標(biāo)簽:
asp
管理系統(tǒng)
上傳時(shí)間:
2014-10-13
上傳用戶:qb1993225
-
The book uses a task-oriented structure that allows you to work through the steps necessary to install
MySQL 4.1 on Linux and Windows platforms, create and manage MySQL databases, query and manipulate
data stored in those databases, administer the MySQL database management system, and connect to
MySQL databases from your PHP, JSP/Java, and ASP.NET/C# applications.
The next section, which describes the book’s structure, provides additional details about the specifics of
what the book covers.
標(biāo)簽:
task-oriented
structure
necessary
through
上傳時(shí)間:
2017-09-06
上傳用戶:a673761058
-
switch power China IC, powerful and low cost
標(biāo)簽:
switch power design
上傳時(shí)間:
2015-09-29
上傳用戶:dxj1900
-
實(shí)驗(yàn)源代碼
//Warshall.cpp #include<stdio.h> void warshall(int k,int n) { int i , j, t; int temp[20][20]; for(int a=0;a<k;a++) { printf("請(qǐng)輸入矩陣第%d 行元素:",a); for(int b=0;b<n;b++) { scanf ("%d",&temp[a][b]); } } for(i=0;i<k;i++){ for( j=0;j<k;j++){ if(temp[ j][i]==1) { for(t=0;t<n;t++) { temp[ j][t]=temp[i][t]||temp[ j][t]; } } } } printf("可傳遞閉包關(guān)系矩陣是:\n"); for(i=0;i<k;i++) { for( j=0;j<n;j++) { printf("%d", temp[i][ j]); } printf("\n"); } } void main() { printf("利用 Warshall 算法求二元關(guān)系的可傳遞閉包\n"); void warshall(int,int); int k , n; printf("請(qǐng)輸入矩陣的行數(shù) i: "); scanf("%d",&k);
四川大學(xué)實(shí)驗(yàn)報(bào)告 printf("請(qǐng)輸入矩陣的列數(shù) j: "); scanf("%d",&n); warshall(k,n); }
標(biāo)簽:
warshall
離散
實(shí)驗(yàn)
上傳時(shí)間:
2016-06-27
上傳用戶:梁雪文以
-
#include "iostream" using namespace std;
class Matrix
{
private:
double** A; //矩陣A
double *b; //向量b
public:
int size;
Matrix(int );
~Matrix();
friend double* Dooli(Matrix& );
void Input();
void Disp();
};
Matrix::Matrix(int x) {
size=x;
//為向量b分配空間并初始化為0
b=new double [x];
for(int j=0;j<x;j++)
b[j]=0;
//為向量A分配空間并初始化為0
A=new double* [x];
for(int i=0;i<x;i++)
A[i]=new double [x];
for(int m=0;m<x;m++)
for(int n=0;n<x;n++)
A[m][n]=0;
}
Matrix::~Matrix() {
cout<<"正在析構(gòu)中~~~~"<<endl;
delete b;
for(int i=0;i<size;i++)
delete A[i];
delete A;
}
void Matrix::Disp()
{
for(int i=0;i<size;i++)
{
for(int j=0;j<size;j++)
cout<<A[i][j]<<" ";
cout<<endl;
}
}
void Matrix::Input()
{
cout<<"請(qǐng)輸入A:"<<endl;
for(int i=0;i<size;i++)
for(int j=0;j<size;j++){
cout<<"第"<<i+1<<"行"<<"第"<<j+1<<"列:"<<endl;
cin>>A[i][j];
}
cout<<"請(qǐng)輸入b:"<<endl;
for(int j=0;j<size;j++){
cout<<"第"<<j+1<<"個(gè):"<<endl;
cin>>b[j];
}
}
double* Dooli(Matrix& A) {
double *Xn=new double [A.size];
Matrix L(A.size),U(A.size);
//分別求得U,L的第一行與第一列
for(int i=0;i<A.size;i++)
U.A[0][i]=A.A[0][i];
for(int j=1;j<A.size;j++)
L.A[j][0]=A.A[j][0]/U.A[0][0];
//分別求得U,L的第r行,第r列
double temp1=0,temp2=0;
for(int r=1;r<A.size;r++){
//U
for(int i=r;i<A.size;i++){
for(int k=0;k<r-1;k++)
temp1=temp1+L.A[r][k]*U.A[k][i];
U.A[r][i]=A.A[r][i]-temp1;
}
//L
for(int i=r+1;i<A.size;i++){
for(int k=0;k<r-1;k++)
temp2=temp2+L.A[i][k]*U.A[k][r];
L.A[i][r]=(A.A[i][r]-temp2)/U.A[r][r];
}
}
cout<<"計(jì)算U得:"<<endl;
U.Disp();
cout<<"計(jì)算L的:"<<endl;
L.Disp();
double *Y=new double [A.size];
Y[0]=A.b[0];
for(int i=1;i<A.size;i++ ){
double temp3=0;
for(int k=0;k<i-1;k++)
temp3=temp3+L.A[i][k]*Y[k];
Y[i]=A.b[i]-temp3;
}
Xn[A.size-1]=Y[A.size-1]/U.A[A.size-1][A.size-1];
for(int i=A.size-1;i>=0;i--){
double temp4=0;
for(int k=i+1;k<A.size;k++)
temp4=temp4+U.A[i][k]*Xn[k];
Xn[i]=(Y[i]-temp4)/U.A[i][i];
}
return Xn;
}
int main()
{
Matrix B(4);
B.Input();
double *X;
X=Dooli(B);
cout<<"~~~~解得:"<<endl;
for(int i=0;i<B.size;i++)
cout<<"X["<<i<<"]:"<<X[i]<<" ";
cout<<endl<<"呵呵呵呵呵";
return 0;
}
標(biāo)簽:
道理特分解法
上傳時(shí)間:
2018-05-20
上傳用戶:Aa123456789
-
The continuous progress in modern power device technology is increasingly
supported by power-specific modeling methodologies and dedicated simulation
tools. These enable the detailed analysis of operational principles on the the device
and on the system level; in particular, they allow the designer to perform trade-
off studies by investigating the operation of competing design variants in a very
early stage of the development process. Furthermore, using predictive computer
simulation makes it possible to analyze the device and system behavior not only
under regularoperatingconditions, but also at the rim of the safe-operatingarea and
beyond of it, where destructive processes occur that limit the lifetime of a power
system.
標(biāo)簽:
POWERHVMOS_Devices_Compact_Modeli
ng
上傳時(shí)間:
2020-06-07
上傳用戶:shancjb
-
Research on microwave power amplififiers has gained a growing importance demanded by the many continuously developing applications which require such subsystem performance. A broad set of commercial and strategic systems in fact have their overall performance boosted by the power amplififier, the latter becoming an enabling component wherever its effificiency and output power actually allows functionalities and operating modes previously not possible. This is the case for the many wireless systems and battery-operated systems that form the substrate of everyday life, but also of high-performance satellite and dual-use systems.
標(biāo)簽:
高效率
射頻
微波
固態(tài)
功率放大器
上傳時(shí)間:
2021-10-30
上傳用戶:得之我幸78
-
通過(guò)采用無(wú)橋PFC和半橋LLC諧振變換器作為數(shù)字開(kāi)關(guān)電源的主變換拓?fù)?基于STM32系列微控制器的全數(shù)字控制PFC和DC-DC變換器,首先對(duì)數(shù)字化開(kāi)關(guān)電源方案進(jìn)行對(duì)比,然后闡述了200W數(shù)字開(kāi)關(guān)電源整體方案,并對(duì)數(shù)字開(kāi)關(guān)電源的無(wú)橋PFC和半橋LLC變換器進(jìn)行系統(tǒng)研究。By using a bridgeless PFC and a half-bridge LLC resonant converter as the main conversion topology of the digital switching power supply,the all-digital control PFC and DC-DC converter based on the STM32 series of microcontrollers,firstly the digital switching power supply scheme is compared,and then the overall scheme of 200 W digital switching power supply is expounded, and the bridgeless PFC and half-bridge LLC converter of digital switching power supply are systematically studied.
標(biāo)簽:
數(shù)字開(kāi)關(guān)電源
上傳時(shí)間:
2022-04-02
上傳用戶:qingfengchizhu
-
目的:自主研制一款超聲手術(shù)刀電源控制系統(tǒng),以減少能量的消耗,維持手術(shù)刀的正常溫度。方法:對(duì)超聲換能器在諧振附近的等效電路建立模型,并設(shè)計(jì)基于數(shù)字信號(hào)處理(DSP)的超聲手術(shù)刀的硬件控制系統(tǒng)。結(jié)果:經(jīng)對(duì)電源控制系統(tǒng)的電路和工作性能測(cè)試,生成的電流和電壓的有效值等參數(shù),能夠及時(shí)調(diào)整電源的頻率,并達(dá)到預(yù)期的功能指標(biāo),使超聲手術(shù)刀工作在諧振狀態(tài)。結(jié)論:以DSP為核心設(shè)計(jì)的超聲手術(shù)刀電源控制系統(tǒng),測(cè)試指標(biāo)均能夠達(dá)到預(yù)期的要求,能夠使系統(tǒng)在諧振狀態(tài)下工作。Objective: To independently develop a power control system of ultrasonic scalpel so as to reduce the energy consumption and maintain the normal temperature of ultrasonic scalpel. Methods: In this paper, the model of equivalent circuit of ultrasonic transducer nearby syntony was built up, and the hardware control system of ultrasonic scalpel based on digital signal processing(DSP) was designed. Results: Through testing the circuit and work performance of power control system, the series of parameters such as effective value and so on which were produced by this system could adjust frequency of power source in time and attain anticipative functional indicator, and it took the ultrasonic scalpel to work in syntonic situation. Conclusion: The tested indicators of power control system of ultrasonic scalpel based on the kernel design of DSP can attain anticipative requirement, and can take this system to work in syntonic situation.
標(biāo)簽:
數(shù)字信號(hào)處理
超聲手術(shù)刀
電源控制
上傳時(shí)間:
2022-04-03
上傳用戶:bluedrops