当前位置: 首页 > news >正文

怎么做点击文字进入的网站天津港电子商务信息网

怎么做点击文字进入的网站,天津港电子商务信息网,网站开发工具 n,wordpress你好多莉#includebits/stdc.h与using namespace std;在第一第二行加上就行#xff0c;无需了解 cin cout endl为c的输入#xff0c;输出与换行符 Istringsteam 是string流,用来string转换为int 五个函数#xff08;需要稍微了解c迭代器#xff0c;lambda(类似函数)#xf…#includebits/stdc.h与using namespace std;在第一第二行加上就行无需了解 cin cout endl为c的输入输出与换行符 Istringsteam 是string流,用来string转换为int 五个函数需要稍微了解c迭代器lambda(类似函数) count_if() reverse() sort() accumulate() replace() 三个容器 vector数组 其函数push_back()最为常用 string 字符串 map关联容器映射 集训01 7-1 统计比指定元素大的个数-hebust #includebits/stdc.h using namespace std; int main() {int item,a;cina;vectorint_a;while(cinitem){_a.push.back(item);}coutcount_if(_a.begin(),_a.end(),[a](int x){return xa;}); //count_if函数 返回满足第三个参数的个数 //[a](int x){return xa;} 是一个lambda }7-2 倒顺字母字符串-hebust #includebits/stdc.h using namespace std; int main() {string a abcdefghijklmnopqrstuvwxyz;vectorchar_a;int b,flag0;cin b;for (auto i a.begin(); i ! a.begin() b; i)//auto 编译器会自动生成对应的类型 //i的类型是迭代器{if (b 1)cout *i;else{cout *i ;}_a.push_back(*i);}reverse(_a.begin(), _a.end());//使容器倒置for (auto i _a.begin()1; i ! _a.end() ; i){if (flag 1)cout ;cout *i;flag 1;}}集训02 7-1 重复数据问题-hebust #includebits/stdc.h using namespace std; int main() {int item,a,b;vectorint_a;while (cin item){_a.push_back(item);}sort(_a.begin(), _a.end());//排序算法auto iter unique(_a.begin(), _a.end());if (iter ! _a.end())cout yes;elsecout no; }7-2 找出最长的单词-hebust #includebits/stdc.h using namespace std int main() {string a;vectorstring_a;while (cin a){_a.push_back(a);}sort(_a.begin(), _a.end());cout _a[_a.size() - 1]; }7-3 较为复杂情况下的求和-hebust #includebits/stdc.h #includecctype using namespace std; int main() {vectorstring_a;string a;int s0;while(cina){_a.push_back(a);}for(auto i:_a){if(isalpha(i[0])){continue;}else{istringstream a1(i);//string流 用来string转换为intint j;a1j;sj;}}couts;}集训03 7-2 编程题选修课成绩统计问题 #includebits/stdc.h using namespace std; mapstring, intB{ {A,5},{B,4}, {C,3}, {D,2},{E,1} }; int main() {int flag0,s;vectorstringA;string item,c;string n, m;while (cinitem){A.push_back(item);A.push_back( );}c accumulate(A.begin(), A.end(), string());//求和函数replace(c.begin(), c.end(), ,, );//替换函数istringstream is(c);while(isitemnm){sB[n] B[m];if (flag 1)cout ,;cout item s;flag 1;} }7-3 找到共同的选修课-hebust #includebits/stdc.h using namespace std; int main() {string a;string b;int max -1, c;cin c;mapstring, int_a;for (int i 0; i c; i){while (getchar() ! :){}do{if(cin.good()) //这里有个坑平台第三组数据最后一行没有换行符需要检查是否到文件尾{cina;}else{break;}_a[a];} while (getchar() ! \n);}for (auto i : _a){if (max i.second){max i.second;b i.first;}}if (max!c){cout none;}else{cout b;} }
http://www.yutouwan.com/news/395981/

相关文章:

  • 娱乐公司网站建设价格怎么注册公司名称
  • 淘宝客 网站备案本地wordpress环境
  • 外贸模板网站seo外包公司多吗
  • 网站的主题定位wordpress.org移除
  • 网站全面详细创建步骤网站建设存在问题
  • 企业网站的特点公众号外链网站怎么做
  • dz门户网站模板个体工商户未做年报会罚款吗
  • 百度认证官方网站公司网站建设费用入什么费用
  • 设计素材网站哪个最好用昆明软件开发公司
  • 电子商务和网站开发 职务网站建设规划大纲
  • 东莞网站建设基本流程图网站如何做360度全景
  • 如何规划网站栏目商店网站制作
  • 宁波企业网站开发公司h5前端开发主要做什么
  • 网站的按钮怎么做的网站发布与推广怎么写
  • jrs直播网站谁做的sns网站建设
  • 做关于什么内容的网站备案网查询化妆品
  • 炫酷一些的网站自动下单网站开发
  • 大气网站图私人app一键制作器软件
  • wordpress绑定域名企业网站排名软件度智能优化
  • 自建房设计网站推荐为什么网站的备案号在备案网站查询不到
  • 无锡电子商务网站制作wordpress改 cms
  • 佛山网站哪家最专业discuz应用中心打不开
  • 做学校子网站网站建设属于会计的什么科目
  • 在网站里继费粘贴以下代码到网站首页代码的与标签之间
  • 网站推广的主题温州城乡建设学校
  • 文化传媒网站建设上海网站开发外包公司
  • 网站右下角广告展示代码300平方别墅装修大约多少钱
  • 石家庄网站优化排名推广wordpress 4.5.2模板
  • 做meta分析需注册的网站京东如何进行网站建设
  • 杭州投资公司自适应网站品牌网站建设小蝌蚪a