欢迎来到天天文库
浏览记录
ID:33259698
大小:84.00 KB
页数:24页
时间:2019-02-23
《武汉大学遥感信息工程学院复试机试》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、2004:#include#include#include//sort所需头文件#includeusingnamespacestd;intmain(){ifstreaminfile("test.txt");ofstreamoutfile("result.txt");if(!infile){cout<<"text.txtopenfailed"<m_vecInt;//读出
2、数的个数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、nt[mid]<#include#includeusingnamespacestd;typedefvector>VecInt;VecIntConvolutionFun1(constvector&vec,constint&m,constint&n);VecIntConvolutionFun2(constvector&vec,constint&r,constint&s);intma4、in(){constintM=125;constintN=80;constintR=100;constintS=100;VecIntvecInt;inti,j;ifstreaminfile("SourceData.txt");if(!infile){cout<<"SourceData.txtopenfailed.";return1;}vectorvec_int;intnumeric(0);for(i=0;i<10000;i++){infile>>numeric;vec_int.push_back(numeric);}ofstreamoutfile("result.txt");5、if(!outfile){cout<<"result.txtopenfailed.";return1;}outfile<<"卷积一次后的矩阵:";vecInt=ConvolutionFun1(vec_int,M,N);for(i=0;i6、utfile<&vec,constint&m,constint&n){VecIntvecInt(m,vector(n));intnum=0;for(inti=0;i7、-1,0,-1,0};for(inti=1;i
3、nt[mid]<#include#includeusingnamespacestd;typedefvector>VecInt;VecIntConvolutionFun1(constvector&vec,constint&m,constint&n);VecIntConvolutionFun2(constvector&vec,constint&r,constint&s);intma
4、in(){constintM=125;constintN=80;constintR=100;constintS=100;VecIntvecInt;inti,j;ifstreaminfile("SourceData.txt");if(!infile){cout<<"SourceData.txtopenfailed.";return1;}vectorvec_int;intnumeric(0);for(i=0;i<10000;i++){infile>>numeric;vec_int.push_back(numeric);}ofstreamoutfile("result.txt");
5、if(!outfile){cout<<"result.txtopenfailed.";return1;}outfile<<"卷积一次后的矩阵:";vecInt=ConvolutionFun1(vec_int,M,N);for(i=0;i6、utfile<&vec,constint&m,constint&n){VecIntvecInt(m,vector(n));intnum=0;for(inti=0;i7、-1,0,-1,0};for(inti=1;i
6、utfile<&vec,constint&m,constint&n){VecIntvecInt(m,vector(n));intnum=0;for(inti=0;i7、-1,0,-1,0};for(inti=1;i
7、-1,0,-1,0};for(inti=1;i
此文档下载收益归作者所有