荆州网站建设厂家企业推广策略

张小明 2026/1/1 23:33:56
荆州网站建设厂家,企业推广策略,网站背景视频是怎么做的,医院网站和公众号建设方案2025年天津大学计算机考研复试机试真题 2025年天津大学计算机考研复试上机真题 历年天津大学计算机考研复试上机真题 历年天津大学计算机考研复试机试真题 更多学校题目开源地址#xff1a;https://gitcode.com/verticallimit1/noobdream N 诺 DreamJudge 题库#xff1…2025年天津大学计算机考研复试机试真题2025年天津大学计算机考研复试上机真题历年天津大学计算机考研复试上机真题历年天津大学计算机考研复试机试真题更多学校题目开源地址https://gitcode.com/verticallimit1/noobdreamN 诺 DreamJudge 题库输入 “学校名称” 即可筛选该校历年机试真题题目均在考纲范围内按难度自动排序。还可搭配《计算机考研机试攻略》刷题书中题目可通过题号直接在题库中查找。天津大学-计算表达式题目描述Time Limit: 1000 msMemory Limit: 256 mb输入字符串的中缀表达式包含‘’、‘-’、‘*’、‘/’、‘(’、‘)’输出运算结果。输入输出格式输入描述:字符串的中缀表达式输出描述:计算结果输入输出样例输入样例#:3(5-3)*2输出样例#:7代码一#include iostream#include vector#include algorithm#include iomanip#include set#include list#include string#include cmath#include stack#include map#include sstream#include queue#include bitset#include climitsusing namespace std;mapchar, intmapp{{,1},{-,1},{*,2},{/,2}};void fun(stackint nums, stackchar ops) {int b nums.top(); nums.pop();int a nums.top(); nums.pop();char op ops.top(); ops.pop();int result;if (op ) result a b;else if (op -)result a - b;else if (op *)result a * b;else result a / b;nums.push(result);}int main() {string s;while (cin s) {stackintnums;stackcharops;char op;for(int i0;is.size();i) {op s[i];if (s[i] 0 s[i] 9) {int num 0;while (i s.length() isdigit(s[i])) {num num * 10 (s[i] - 0);i;}i--;nums.push(num);}else if (op () {ops.push(op);}else if (op )) {while (!ops.empty() ops.top() ! () {fun(nums, ops);}if (!ops.empty()) {ops.pop();}}else {while (!ops.empty() ops.top() ! ( mapp[ops.top()]mapp[op]) {fun(nums, ops);}ops.push(op);}}while (!ops.empty()) {fun(nums, ops);}cout nums.top() endl;}return 0;}代码二#includeiostream#includeunordered_map#includealgorithm#includestring#includestackusing namespace std;stackint num;stackchar fu;unordered_mapchar, int h{ {,1},{-,1},{*,2},{/,2} };void jisuan() {int num1 num.top();num.pop();int num2 num.top();num.pop();char f fu.top();fu.pop();int n 0;if (f )n num1 num2;if (f -)n num2 - num1;if (f *)n num1 * num2;if (f /)n num2 / num1;num.push(n);}int main() {string s;cin s;for (int i 0; i s.size(); i) {if (isdigit(s[i])) {int j i, x 0;while (j s.size() isdigit(s[j])) {x x * 10 s[j] - 0;j;}num.push(x);i j - 1;}else if (s[i] () {fu.push(s[i]);}else if (s[i] )) {while (fu.top() ! () {jisuan();}fu.pop();}else {while (fu.size() 0 h[s[i]] h[fu.top()]) {jisuan();}fu.push(s[i]);}}while (fu.size())jisuan();cout num.top() endl;return 0;}代码三#includebits/stdc.husing namespace std;struct li{//方便存储多位数字char ch$;int number;};int main(){vectorlires;//存后缀表达式stackintsta;//后缀表达式求值操作栈mapchar,int m;m[]1;m[-]1;m[*]2;m[/]2;m[^]3;string str;cinstr;int lenstr.length();stackchars;//中缀转后缀操作栈for(int i0;ilen;){//中缀转后缀if(str[i]0str[i]9){//数字string cc;while(str[i]0str[i]9){ccstr[i];i;}int numstoi(cc);li temp;temp.numbernum;res.push_back(temp);continue;}else if(str[i](){//左括号s.push(str[i]);}else if(str[i])){//右括号while(s.top()!(){li temp;temp.chs.top();res.push_back(temp);s.pop();}s.pop();}else{//-*/^运算符if(!s.empty()){if(s.top()!(){int bm[str[i]];int am[s.top()];while(ab){li temp;temp.chs.top();res.push_back(temp);s.pop();if(s.empty()){break;}if(s.top()(){break;}int am[s.top()];}}}s.push(str[i]);}i;}while(!s.empty()){li temp;temp.chs.top();res.push_back(temp);s.pop();}//后缀表达式求值for(int i0;ires.size();i){if(res[i].ch$){//数字sta.push(res[i].number);}else{//运算符int bsta.top();sta.pop();int asta.top();sta.pop();int c;if(res[i].ch){cab;}else if(res[i].ch-){ca-b;}else if(res[i].ch*){ca*b;}else if(res[i].ch/){ca/b;}else if(res[i].ch^){c(int)pow(a,b);}sta.push(c);}}coutsta.top();return 0;}
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

源码网站gitcrm系统功能模块

RSSHub-Radar终极指南:智能信息管理的完整解决方案 【免费下载链接】RSSHub-Radar 🍰 Browser extension that simplifies finding and subscribing RSS and RSSHub 项目地址: https://gitcode.com/gh_mirrors/rs/RSSHub-Radar 在信息爆炸的时代&…

张小明 2025/12/31 10:53:36 网站建设

长春网站建设路企业为什么要交税

目标:不仅会“用”,还能“设计、调试、扩展、优化”。文内包含从零手写、生成器、惰性管道、异步流、资源管理、常见坑、性能建议、练习清单等。1. 核心协议 可迭代协议 (Iterable):对象实现 obj[Symbol.iterator](),返回一个迭代…

张小明 2025/12/28 7:03:41 网站建设

菜谱网站后台代码开发公司项目管理制度

Serverless Express日志管理:7个关键策略让你的应用更可靠 【免费下载链接】serverless-express CodeGenieApp/serverless-express: Serverless Express 是一个库,它允许开发者在无服务器环境下(如AWS Lambda、Google Cloud Functions等&…

张小明 2025/12/29 12:13:06 网站建设

建设网站的网站是什么wordpress如何迁移

第一章:Open-AutoGLM长按操作精准触发在移动设备或触控界面中,长按操作是一种常见的用户交互方式。Open-AutoGLM 通过优化事件监听机制,实现了对长按操作的精准识别与响应。该机制不仅提升了用户体验,还为复杂手势控制提供了底层支…

张小明 2025/12/27 4:54:14 网站建设

关于旅行社网站规划建设方案书常州集团网站建设

腾讯云和阿里云在知识图谱的实体链接技术实现上各有特色,但都遵循"实体识别→候选生成→消歧链接"的核心流程。两者在技术架构、算法选择和生态整合方面存在差异,腾讯云更注重易用性和成本控制,阿里云则强调技术底座的全栈自研。一…

张小明 2025/12/27 3:10:01 网站建设

网站建设详细报价团结湖网站建设

在数字化办公普及的当下,传统线下绩效考核的低效、数据割裂等问题逐渐凸显,线上绩效考核系统方案成为企业优化人力管理的关键选择。它不仅能整合考核流程、减少人工成本,还能实现数据实时同步与精准分析,帮助 HR 摆脱繁琐事务&…

张小明 2025/12/27 4:46:56 网站建设