欢迎来到天天文库
浏览记录
ID:58574334
大小:81.00 KB
页数:24页
时间:2020-10-19
《武汉大学遥感信息工程学院复试机试.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、2004:#include#include#include//sort所需头文件#includeusingnamespacestd;intmain(){ifstreaminfile("test.txt");ofstreamoutfile("result.txt");if(!infile){cout<<"text.txtopenfailed"<2、iled"<m_vecInt;//读出数的个数intsum=0;infile>>sum;inti=0;while(i>number;m_vecInt.push_back(number);i++;}//排序算法sort(m_vecInt.begin(),m_vecInt.end());outfile<<"theminnumberis:"<3、vecInt[sum-1]<#include#includeusingnamespacestd;typedefvector>VecInt;VecIntConvolutionFun1(cons4、tvector&vec,constint&m,constint&n);VecIntConvolutionFun2(constvector&vec,constint&r,constint&s);intmain(){constintM=125;constintN=80;constintR=100;constintS=100;VecIntvecInt;inti,j;ifstreaminfile("SourceData.txt");if(!infile){cout<<"SourceData.txtopen5、failed.";return1;}vectorvec_int;intnumeric(0);for(i=0;i<10000;i++){infile>>numeric;vec_int.push_back(numeric);}ofstreamoutfile("result.txt");if(!outfile){cout<<"result.txtopenfailed.";return1;}outfile<<"卷积一次后的矩阵:";vecInt=ConvolutionFun1(vec_int,M,N);6、for(i=0;i7、e.close();return0;}//卷积函数1VecIntConvolutionFun1(constvector&vec,constint&m,constint&n){VecIntvecInt(m,vector(n));intnum=0;for(inti=0;i8、tj=1;j
2、iled"<m_vecInt;//读出数的个数intsum=0;infile>>sum;inti=0;while(i>number;m_vecInt.push_back(number);i++;}//排序算法sort(m_vecInt.begin(),m_vecInt.end());outfile<<"theminnumberis:"<3、vecInt[sum-1]<#include#includeusingnamespacestd;typedefvector>VecInt;VecIntConvolutionFun1(cons4、tvector&vec,constint&m,constint&n);VecIntConvolutionFun2(constvector&vec,constint&r,constint&s);intmain(){constintM=125;constintN=80;constintR=100;constintS=100;VecIntvecInt;inti,j;ifstreaminfile("SourceData.txt");if(!infile){cout<<"SourceData.txtopen5、failed.";return1;}vectorvec_int;intnumeric(0);for(i=0;i<10000;i++){infile>>numeric;vec_int.push_back(numeric);}ofstreamoutfile("result.txt");if(!outfile){cout<<"result.txtopenfailed.";return1;}outfile<<"卷积一次后的矩阵:";vecInt=ConvolutionFun1(vec_int,M,N);6、for(i=0;i7、e.close();return0;}//卷积函数1VecIntConvolutionFun1(constvector&vec,constint&m,constint&n){VecIntvecInt(m,vector(n));intnum=0;for(inti=0;i8、tj=1;j
3、vecInt[sum-1]<#include#includeusingnamespacestd;typedefvector>VecInt;VecIntConvolutionFun1(cons
4、tvector&vec,constint&m,constint&n);VecIntConvolutionFun2(constvector&vec,constint&r,constint&s);intmain(){constintM=125;constintN=80;constintR=100;constintS=100;VecIntvecInt;inti,j;ifstreaminfile("SourceData.txt");if(!infile){cout<<"SourceData.txtopen
5、failed.";return1;}vectorvec_int;intnumeric(0);for(i=0;i<10000;i++){infile>>numeric;vec_int.push_back(numeric);}ofstreamoutfile("result.txt");if(!outfile){cout<<"result.txtopenfailed.";return1;}outfile<<"卷积一次后的矩阵:";vecInt=ConvolutionFun1(vec_int,M,N);
6、for(i=0;i7、e.close();return0;}//卷积函数1VecIntConvolutionFun1(constvector&vec,constint&m,constint&n){VecIntvecInt(m,vector(n));intnum=0;for(inti=0;i8、tj=1;j
7、e.close();return0;}//卷积函数1VecIntConvolutionFun1(constvector&vec,constint&m,constint&n){VecIntvecInt(m,vector(n));intnum=0;for(inti=0;i8、tj=1;j
8、tj=1;j
此文档下载收益归作者所有