公司网站设计教程打开百度网站建设
2026/2/10 4:17:46 网站建设 项目流程
公司网站设计教程,打开百度网站建设,淘宝客建立网站推广怎么做,北京十大代理记账公司2025年北京理工大学计算机考研复试机试真题 2025年北京理工大学计算机考研复试上机真题 历年北京理工大学计算机考研复试上机真题 历年北京理工大学计算机考研复试机试真题 更多学校完整题目开源地址#xff1a;https://gitcode.com/u014339447/pgcode 百度一下 pgcdoe 即…2025年北京理工大学计算机考研复试机试真题2025年北京理工大学计算机考研复试上机真题历年北京理工大学计算机考研复试上机真题历年北京理工大学计算机考研复试机试真题更多学校完整题目开源地址https://gitcode.com/u014339447/pgcode百度一下pgcdoe即可查看输入 “学校名称” 即可筛选该校历年机试真题包括真题、ac代码、解题思路、视频讲解。字符大小写交替-北京理工大学题目描述给你个字符需要你输出从大写字母A AA开始到这个字符然后又回到起点A AA的过程其中交替大小写。比如给你一个d dd输出AbCdCbA。给你一个c cc输出AbCbA。输入描述一个英文字母。输出描述结果字符串。输入样例d输出样例AbCdCbA#includeiostreamusingnamespacestd;intmain(){charc;cinc;//if (cA) coutAendl;//coutint(A) int(a)endl;intbasea;intbase_cc;//coutbase_cbase;if(base_cbase)cc(a-A);//coutc;intic-a;//couti;for(intj0;ji;j){if(j%20){charbjA;coutb;}else{charbaj;coutb;}}intType(i%2);for(intj1;ji;j){if(j%2Type){charbc-jA-a;coutb;}else{charbc-j;coutb;}}coutendl;}确定二叉树的结构-北京理工大学题目描述给你一颗二叉树的先序 先序先序和中序遍历 中序遍历中序遍历请你输出这颗二叉树的后序遍历 后序遍历后序遍历。输入描述两个字符串其长度n nn均小于等于26 2626。第一行为先序遍历 先序遍历先序遍历第二行为中序遍历 中序遍历中序遍历。输出描述输入样例可能有多组对于每组测试样例输出一行为后序遍历 后序遍历后序遍历的字符串。输入样例abc bac fdxeag xdefag输出样例bca xedgaf#includeiostream#includestringusingnamespacestd;typedefstructLnode{chardata;structLnode*left;structLnode*right;}Lnode;voidstring2lnode(string l1,string l2,Lnode*h){if(l2.size()0|l1.size()0){hnullptr;return;}//coutl2[0]endl;hnewLnode;h-datal1[0];//coutl2 l2endl;//coutl1 l1endl;intlenl2.find(l1[0]);//cout111 l1.substr(0,len) l2.substr(1,len)endl;//cout222 l1.substr(len1,l1.size()-len-1) l2.substr(len1,l2.size()-len-1)endl;string2lnode(l1.substr(1,len),l2.substr(0,len),h-left);string2lnode(l1.substr(len1,l1.size()-len-1),l2.substr(len1,l2.size()-len-1),h-right);}voidpreorder(Lnode*h){if(h!nullptr){preorder(h-left);preorder(h-right);couth-data;}}intmain(){string l1;string l2;while(true){getline(cin,l1);if(l1\0)break;//coutl1endl;getline(cin,l2);//coutl2endl;Lnode*h;string2lnode(l1,l2,h);preorder(h);coutendl;}}表达式求值-北京理工大学题目描述读入一个只包含 ,− -−,∗ *∗,/ //的非负整数计算表达式计算该表达式的值。如果该表达式格式有误请输出N O NONO。输入描述测试输入包含若干测试用例每个测试用例占一行。每行不超过200 200200个字符整数和运算符之间用一个空格分隔。没有非法表达式不会出现/ //0 00这种情况。当一行中只有0 00时输入结束相应的结果不要输出。输出描述对每个测试用例输出1 11行即该表达式的值精确到小数点后2 22位。输入样例1 2 4 2 * 5 - 7 / 11 2 3 / / 6 0输出样例3.00 13.36 NO#includeiostream#includestring#includestack#includestdio.husingnamespacestd;intisd(chara){if((a9)(a0))return1;if((a)|(a-)|(a*)|(a/))return2;return3;}floatstr2n(string a){floataa0;for(inti0;ia.size();i){aaaa*10a[i]-0;}returnaa;}intmain(){string a;while(1){stackfloatsa;stackcharsb;getline(cin,a);if(a0)break;string b;inttype0;intcheck0;floatfa0;floatfb0;intdoit0;for(inti0;ia.size();i){if(a[i] |ia.size()){if(type1){//coutdoitdoitendl;if(doit1){fasa.top();sa.pop();fbstr2n(b);sa.push(fa*fb);doit0;}elseif(doit2){fasa.top();sa.pop();fbstr2n(b);sa.push(fa/fb);doit0;}elsesa.push(str2n(b));//coutsa.top()endl;}if(type2){if(b*){doit1;}elseif(b/){doit2;}elsesb.push(a[i-1]);}//coutbendl;b;check0;}else{ba[i];if(check0){intt2isd(a[i]);if(type0){if(t21){typet2;check1;continue;}type-1;break;}else{if(type!t2t2!3){typet2;check1;continue;}type-1;break;}}}//coutbendl;}if(type!1){coutNOendl;continue;}// while(!sa.empty()){// coutsa.top()endl;// sa.pop();// }while(!sb.empty()){fasa.top();sa.pop();fbsa.top();sa.pop();charcsb.top();sb.pop();if(c)sa.push(fbfa);elsesa.push(fb-fa);}printf(%.2f\n,sa.top());// while(!sa.empty()){// coutsa.top()endl;// sa.pop();// }//coutYesendl;}}等腰梯形-北京理工大学题目描述输入高度 $ h $。输入一个高为 $ h $上底边长为 $ h $ 的等腰梯形。例如 $ h 4 $图形如下**** ****** ******** **********输入描述一个整数$ h $ 的值。输入样例4输出样例**** ****** ******** **********#includeiostreamusingnamespacestd;intmain(){inta;cina;intla(a-1)*2;for(intjja;jj0;jj--){intkjj-1;for(intjk;j0;j--)cout ;//coutk;for(intjl-k-k;j0;j--)cout*;for(intjk;k0;k--)cout ;coutendl;}}cpp # includeiostream using namespace std; int main(){ int a; cina; int la(a-1)*2; for(int jja;jj0;jj--){ int kjj-1; for(int jk;j0;j--) cout ; //coutk; for(int jl-k-k;j0;j--) cout*; for(int jk;k0;k--) cout ; coutendl; } }

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询