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

怎样在自己网站上传产品网页程序开发采购

怎样在自己网站上传产品,网页程序开发采购,厨师培训机构,商洛网站建设公司电话学习要点 写代码时梳理好思路写上注释 题目链接 数据分类处理_牛客题霸_牛客网 题目描述 解法&#xff1a;哈希set #include <bits/stdc.h> #include <complex> #include <iostream> #include <string> #include <unordered_map> using nam…

学习要点

  1. 写代码时梳理好思路
  2. 写上注释

题目链接

        数据分类处理_牛客题霸_牛客网

题目描述

解法:哈希+set

#include <bits/stdc++.h>
#include <complex>
#include <iostream>
#include <string>
#include <unordered_map>
using namespace std;int main() {// 先获得第一行int I_count;cin >> I_count;vector<string> v_str(I_count);for (int i = 0; i < I_count; i++) {cin >> v_str[i];}// 再获得第二行int R_count;cin >> R_count;vector<int> v_int(R_count);for (int i = 0; i < R_count; i++) {cin >> v_int[i];}// cout << endl;// for (auto& i : v_str) {//     cout << i << ' ';// }// cout << endl;// for (auto& i : v_int) {//     cout << i << ' ';// }// cout << endl;// 先处理Rset<int> s_int(v_int.begin(), v_int.end());// cout << endl;// for (auto& i : s_int) {//     cout << i << ' ';// }// cout << endl;// 挂哈希桶unordered_map<int, vector<string>> index_map;for (auto& r_int : s_int) {for (int i = 0; i < I_count; i++) {int pos = v_str[i].find(to_string(r_int));if (pos != string::npos) {index_map[r_int].push_back(to_string(i));}}}// cout << endl;// for (auto& i : index_map) {//     cout << i.first << ' ';//     for(auto&j:i.second)//     {//         cout << j << " ";//     }//     cout << endl;// }// cout << endl;// 构建输出int real_R_count = index_map.size();// cout << real_R_count << endl;int O_count = 0;for (auto& i : index_map) {O_count += i.second.size() * 2;}// cout << O_count << endl;O_count += real_R_count * 2;// cout << O_count << endl;vector<string> O_str;O_str.push_back(to_string(O_count)); // 投入总数for (auto& r_int : s_int) {// 只处理有效Rif (index_map[r_int].size() != 0) {// 投入单规则O_str.push_back(to_string(r_int));// 投入单规则总数O_str.push_back(to_string(index_map[r_int].size()));// 投入后续数组for (int k = 0; k < index_map[r_int].size(); k++) {// 投入下标string t1;t1 += index_map[r_int][k];O_str.push_back(t1);// 投入元素O_str.push_back(v_str[stoi(index_map[r_int][k])]);}}}for (auto& i : O_str) {cout << i << ' ';}
}


文章转载自:

http://diyZpRK2.dhxnr.cn
http://jvXwSxnr.dhxnr.cn
http://w8d6ZDhY.dhxnr.cn
http://t67ibQOq.dhxnr.cn
http://cbfhxqVg.dhxnr.cn
http://YoHdxzPf.dhxnr.cn
http://OefF8xdD.dhxnr.cn
http://6shsL9km.dhxnr.cn
http://7pXcKFmk.dhxnr.cn
http://DxWADSsO.dhxnr.cn
http://otfBPRE1.dhxnr.cn
http://Mp61pwio.dhxnr.cn
http://pSsvRw1w.dhxnr.cn
http://vcwUgh31.dhxnr.cn
http://WzayeWIa.dhxnr.cn
http://A1ft1PLI.dhxnr.cn
http://0bu5LSLZ.dhxnr.cn
http://6tG1R5kH.dhxnr.cn
http://HNUbq8Is.dhxnr.cn
http://20e7nLn5.dhxnr.cn
http://ncOLYhC8.dhxnr.cn
http://isv4NuZ6.dhxnr.cn
http://cw2PkiSU.dhxnr.cn
http://OcVKwtZ2.dhxnr.cn
http://iDtsNJOA.dhxnr.cn
http://9zzO3pVs.dhxnr.cn
http://NBq5sqiF.dhxnr.cn
http://Ue9GKCb3.dhxnr.cn
http://CSdWdBYT.dhxnr.cn
http://eU8bTRoL.dhxnr.cn
http://www.dtcms.com/wzjs/681652.html

相关文章:

  • 网站开发公司会计处理wordpress博客数据库50m够用吗
  • 网站建设费摊销学做吃的的网站
  • 创建好网站如何把浏览二级子域名ip
  • 外贸网站推广公司最大wordpress怎么用两个主题
  • 网页一键建站wordpress去除右下角
  • 做家旅游的视频网站好用js做自适应网站
  • 织梦 网站模板免费生成网页的网站
  • 温州网页建站模板便利的邯郸网站建设
  • 中国建设银行网站主要功能简易的网站建设
  • 搜索引擎网站有哪些中国建筑网建设通证书查询
  • 开发一个icp网站需要多少钱平台建站建设
  • 钢材网站模板小程序开发制作平台源码
  • 卖东西的网站模板免费下载青州做网站的电话
  • 免x网站上海网站建设浦东
  • 手机网站怎么搜索引擎给公司做网站需要什么
  • 合肥网站制作套餐阿里主机 wordpress
  • 购物网站建设与开发石家庄高级seo经理
  • 交易网站开发合同范本有口碑的郑州网站建设
  • 站长工具关键词排名怎么查云闪付小程序开发平台
  • 深圳建设局官网站首页wordpress上面的模板
  • 不用备案的网站哪里买图书管理系统网站开发
  • 自学设计软件的免费网站三水网站开发
  • 嘉兴建网站网站制作温州
  • 建筑公司网站内容asp官网
  • 江门专业制作网站微商城开发公司有哪些比较好
  • 网站建设需要怎么选合作机构wordpress添加原创说明
  • 外贸公司网站模板免费电子商务seo名词解释
  • 婚纱网站论文做网站运营工资是不是很低
  • 胡歌做的穿衣搭配的网站网络推广文案招聘
  • 芷江建设局的工作人员网站十大电脑必玩大型免费网游