【問題描述】 在一個N*N的點陣中,如N=4,你現(xiàn)在站在(1,1),出口在(4,4)。你可以通過上、下、左、右四種移動方法,在迷宮內(nèi)行走,但是同一個位置不可以訪問兩次,亦不可以越界。表格最上面的一行加黑數(shù)字A[1..4]分別表示迷宮第I列中需要訪問并僅可以訪問的格子數(shù)。右邊一行加下劃線數(shù)字B[1..4]則表示迷宮第I行需要訪問并僅可以訪問的格子數(shù)。如圖中帶括號紅色數(shù)字就是一條符合條件的路線。 給定N,A[1..N] B[1..N]。輸出一條符合條件的路線,若無解,輸出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個數(shù),表示a[1]..a[n]。第三行有n個數(shù),表示b[1]..b[n]。 【輸出格式】 僅有一行。若有解則輸出一條可行路線,否則輸出“NO ANSWER”。
標(biāo)簽: 點陣
上傳時間: 2014-06-21
上傳用戶:llandlu
實驗源代碼 //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("請輸入矩陣第%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("請輸入矩陣的行數(shù) i: "); scanf("%d",&k); 四川大學(xué)實驗報告 printf("請輸入矩陣的列數(shù) j: "); scanf("%d",&n); warshall(k,n); }
上傳時間: 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<<"請輸入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<<"請輸入b:"<<endl; for(int j=0;j<size;j++){ cout<<"第"<<j+1<<"個:"<<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<<"計算U得:"<<endl; U.Disp(); cout<<"計算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)簽: 道理特分解法
上傳時間: 2018-05-20
上傳用戶:Aa123456789
AR0231AT7C00XUEA0-DRBR(RGB濾光)安森美半導(dǎo)體推出采用突破性減少LED閃爍 (LFM)技術(shù)的新的230萬像素CMOS圖像傳感器樣品AR0231AT,為汽車先進(jìn)駕駛輔助系統(tǒng)(ADAS)應(yīng)用確立了一個新基準(zhǔn)。新器件能捕獲1080p高動態(tài)范圍(HDR)視頻,還具備支持汽車安全完整性等級B(ASIL B)的特性。LFM技術(shù)(專利申請中)消除交通信號燈和汽車LED照明的高頻LED閃爍,令交通信號閱讀算法能于所有光照條件下工作。AR0231AT具有1/2.7英寸(6.82 mm)光學(xué)格式和1928(水平) x 1208(垂直)有源像素陣列。它采用最新的3.0微米背照式(BSI)像素及安森美半導(dǎo)體的DR-Pix?技術(shù),提供雙轉(zhuǎn)換增益以在所有光照條件下提升性能。它以線性、HDR或LFM模式捕獲圖像,并提供模式間的幀到幀情境切換。 AR0231AT提供達(dá)4重曝光的HDR,以出色的噪聲性能捕獲超過120dB的動態(tài)范圍。AR0231AT能同步支持多個攝相機,以易于在汽車應(yīng)用中實現(xiàn)多個傳感器節(jié)點,和通過一個簡單的雙線串行接口實現(xiàn)用戶可編程性。它還有多個數(shù)據(jù)接口,包括MIPI(移動產(chǎn)業(yè)處理器接口)、并行和HiSPi(高速串行像素接口)。其它關(guān)鍵特性還包括可選自動化或用戶控制的黑電平控制,支持?jǐn)U頻時鐘輸入和提供多色濾波陣列選擇。封裝和現(xiàn)狀:AR0231AT采用11 mm x 10 mm iBGA-121封裝,現(xiàn)提供工程樣品。工作溫度范圍為-40℃至105℃(環(huán)境溫度),將完全通過AEC-Q100認(rèn)證。
標(biāo)簽: 圖像傳感器
上傳時間: 2022-06-27
上傳用戶:XuVshu
Signal Processing and Linear Systems,B.P. Lathi,Berkeley-Cambridge Press book matlab codes
標(biāo)簽: Berkeley-Cambridge Processing Systems Signal
上傳時間: 2017-06-01
上傳用戶:541657925
I. C. Wong, Z. Shen, J. G. Andrews, and B. L. Evans, ``A Low Complexity Algorithm for Proportional Resource Allocation in OFDMA Systems , Proc. IEEE Int. Work. Signal Processing Systems, 針對這篇文章給出的源代碼
上傳時間: 2014-01-24
上傳用戶:zhichenglu
隨著光伏發(fā)電系統(tǒng)快速發(fā)展,以及電動汽車充電樁的普及,傳統(tǒng)的剩余電流保護(hù)器無法滿足實際需求。介紹了一款B型剩余電流保護(hù)器,采用磁調(diào)制剩余電流互感器和零序電流互感器采集剩余電流。根據(jù)GB/T 22794—2017標(biāo)準(zhǔn)要求,可識別1 kHz及以下的正弦交流、帶和不帶直流分量的脈動直流、平滑直流等剩余電流信號。經(jīng)信號調(diào)理電路將電壓信號送到單片機進(jìn)行采集和判斷。通過試驗測試,該樣機在測試精度和速度上均符合國家標(biāo)準(zhǔn)的相關(guān)要求。The rapid development of photovoltaic power generation systems and the popularity of electric vehicle charging piles make the traditional residual current protective devices unable to meet the actual demand.This paper proposed a type B residual current protective device,which uses the magnetically modulated residual current transformer and the zero sequence current transformer to acquire the residual current.According to the requirements of GB/T 22794—2017,the type B residual current protective device can detect sinusoidal AC residual current of 1kHz and below 1kHz,pulsating DC residual current with and without DC component,smooth DC residual current and so on.The signal processing circuit sends the voltage signal to the MCU for acquisition and judgment.Through experimental tests,the device meets the relevant requirements of national standards in terms of test accuracy and speed.
標(biāo)簽: 電流保護(hù)器
上傳時間: 2022-03-27
上傳用戶:
C++ Algorithms for Digital Signal Processing 第4章 濾波器程序
標(biāo)簽: Algorithms Processing Digital Signal
上傳時間: 2013-08-01
上傳用戶:eeworm
21世紀(jì)大學(xué)新型參考教材系列 集成電路B 荒井
上傳時間: 2013-04-15
上傳用戶:eeworm
家電維修(最基礎(chǔ)的教程B)1-20.Torrent
上傳時間: 2013-06-10
上傳用戶:eeworm
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1