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

大型网站开发用什么语言百度sem推广具体做什么

大型网站开发用什么语言,百度sem推广具体做什么,网站建设技术标准,网站做app的好处文章目录 一、题目[TJOI2010] 阅读理解题目描述输入格式输出格式样例 #1样例输入 #1样例输出 #1 提示 二、题解基本思路:代码 一、题目 [TJOI2010] 阅读理解 题目描述 英语老师留了 N N N 篇阅读理解作业,但是每篇英文短文都有很多生词需要查字典&am…

文章目录

  • 一、题目
  • [TJOI2010] 阅读理解
    • 题目描述
    • 输入格式
    • 输出格式
    • 样例 #1
      • 样例输入 #1
      • 样例输出 #1
    • 提示
  • 二、题解
    • 基本思路:
    • 代码


一、题目

[TJOI2010] 阅读理解

题目描述

英语老师留了 N N N 篇阅读理解作业,但是每篇英文短文都有很多生词需要查字典,为了节约时间,现在要做个统计,算一算某些生词都在哪几篇短文中出现过。

输入格式

第一行为整数 N N N ,表示短文篇数,其中每篇短文只含空格和小写字母。

按下来的 N N N 行,每行描述一篇短文。每行的开头是一个整数 L L L ,表示这篇短文由 L L L 个单词组成。接下来是 L L L 个单词,单词之间用一个空格分隔。

然后为一个整数 M M M ,表示要做几次询问。后面有 M M M 行,每行表示一个要统计的生词。

输出格式

对于每个生词输出一行,统计其在哪几篇短文中出现过,并按从小到大输出短文的序号,序号不应有重复,序号之间用一个空格隔开(注意第一个序号的前面和最后一个序号的后面不应有空格)。如果该单词一直没出现过,则输出一个空行。

样例 #1

样例输入 #1

3
9 you are a good boy ha ha o yeah
13 o my god you like bleach naruto one piece and so do i
11 but i do not think you will get all the points
5
you
i
o
all
naruto

样例输出 #1

1 2 3
2 3
1 2
3
2

提示

对于 30 % 30\% 30% 的数据, 1 ≤ M ≤ 1 0 3 1\le M\le 10^3 1M103

对于 100 % 100\% 100% 的数据, 1 ≤ M ≤ 1 0 4 1\le M\le 10^4 1M104 1 ≤ N ≤ 1 0 3 1\le N\le 10^3 1N103

每篇短文长度(含相邻单词之间的空格) ≤ 5 × 1 0 3 \le 5\times 10^3 5×103 字符,每个单词长度 ≤ 20 \le 20 20 字符。

每个测试点时限 2 2 2 秒。

感谢@钟梓俊添加的一组数据。

二、题解

基本思路:

  • 这道题要统计单词在哪几篇短文中出现过,序号不能重复且按从小到大输出短文的序号。
  • (1).有没有出现过可以用哈希来判断。
  • (2).序号不能重复且按从小到大输出短文的序号,很显然这里可以用STL中的set(集合)来存放序号。
  • (3).那么该怎么把哈希和set结合起来呢?这里我做了一番尝试,既然之前写的时候遇到了unordered_map<int,vector> ,那么一定也可以有unordered_map<int,set>,这样就结合在一起了。

代码

#include<bits/stdc++.h>
using namespace std;#define IOS ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define endl "\n"
#define int long long 
#define repn(i,o,n) for(int i=o;i<=n;i++)
#define rep(i,o,n) for(int i=o;i<n;i++)void solve(){unordered_map<string,set<int>> mp;int n,m;cin>>n;repn(i,1,n){int L;cin>>L;repn(j,1,L){string str;cin>>str;//单词序号插入到该单词对应的序号集合 mp[str].insert(i);}}cin>>m;while(m--){string str;cin>>str;if(mp[str].empty()){cout<<endl;//不存在要输出空行,注意是空行哦!(bushi空格T_T) continue;}bool flag=false;for(auto i:mp[str]){//输出 if(flag) cout<<" ";cout<<i;flag=true;}cout<<endl;}}signed main(){IOS;int T=1;//cin>>T;while(T--){solve();}return 0;
}

文章转载自:
http://dinncoguile.tqpr.cn
http://dinncoviscerotonia.tqpr.cn
http://dinncotutty.tqpr.cn
http://dinncoorcelite.tqpr.cn
http://dinncosatisfactorily.tqpr.cn
http://dinncoradicidation.tqpr.cn
http://dinncooberhausen.tqpr.cn
http://dinncorustical.tqpr.cn
http://dinncocoalpit.tqpr.cn
http://dinnconeighborite.tqpr.cn
http://dinncoranchette.tqpr.cn
http://dinncojuicehead.tqpr.cn
http://dinncorounded.tqpr.cn
http://dinncoeiger.tqpr.cn
http://dinncolashing.tqpr.cn
http://dinncocontranatural.tqpr.cn
http://dinncopenmanship.tqpr.cn
http://dinncotibiae.tqpr.cn
http://dinncoexpectability.tqpr.cn
http://dinncokatar.tqpr.cn
http://dinncorosulate.tqpr.cn
http://dinncoatmolyzer.tqpr.cn
http://dinncoinbreathe.tqpr.cn
http://dinncosmaltine.tqpr.cn
http://dinncosuddenness.tqpr.cn
http://dinncojunkman.tqpr.cn
http://dinncohyperslow.tqpr.cn
http://dinncolatinist.tqpr.cn
http://dinncosemitic.tqpr.cn
http://dinncosaturnalia.tqpr.cn
http://dinncospatula.tqpr.cn
http://dinncocheaters.tqpr.cn
http://dinncoinestimably.tqpr.cn
http://dinncotracheary.tqpr.cn
http://dinncocensorious.tqpr.cn
http://dinncocuniculus.tqpr.cn
http://dinncopromotion.tqpr.cn
http://dinncopostembryonic.tqpr.cn
http://dinncoinextricability.tqpr.cn
http://dinncoagroecosystem.tqpr.cn
http://dinncolandstream.tqpr.cn
http://dinncoracy.tqpr.cn
http://dinncorecheck.tqpr.cn
http://dinncotights.tqpr.cn
http://dinncogrungy.tqpr.cn
http://dinncohowling.tqpr.cn
http://dinncotonight.tqpr.cn
http://dinncomahaleb.tqpr.cn
http://dinncothingamy.tqpr.cn
http://dinncorelate.tqpr.cn
http://dinncolutestring.tqpr.cn
http://dinncosomnolency.tqpr.cn
http://dinncorevaluation.tqpr.cn
http://dinncoreinstallment.tqpr.cn
http://dinncootranto.tqpr.cn
http://dinncohyperaggressive.tqpr.cn
http://dinncokevel.tqpr.cn
http://dinncoboschbok.tqpr.cn
http://dinncoferned.tqpr.cn
http://dinncospug.tqpr.cn
http://dinncoleftwards.tqpr.cn
http://dinncofreehearted.tqpr.cn
http://dinncocatamaran.tqpr.cn
http://dinnconeuration.tqpr.cn
http://dinncoprocambium.tqpr.cn
http://dinncosensitiser.tqpr.cn
http://dinncometallurgical.tqpr.cn
http://dinncosidereal.tqpr.cn
http://dinncokeratopathy.tqpr.cn
http://dinncosellers.tqpr.cn
http://dinncoadage.tqpr.cn
http://dinncopyritic.tqpr.cn
http://dinnconitrotoluene.tqpr.cn
http://dinncofederate.tqpr.cn
http://dinncosafeblower.tqpr.cn
http://dinncohawash.tqpr.cn
http://dinncopetalody.tqpr.cn
http://dinncomanchu.tqpr.cn
http://dinncoreproof.tqpr.cn
http://dinncocins.tqpr.cn
http://dinncohardie.tqpr.cn
http://dinncolandsman.tqpr.cn
http://dinncoalbuminoid.tqpr.cn
http://dinncourbanology.tqpr.cn
http://dinncopalma.tqpr.cn
http://dinncoanhysteretic.tqpr.cn
http://dinncosnappish.tqpr.cn
http://dinncopotbelly.tqpr.cn
http://dinncosubdivision.tqpr.cn
http://dinncolotta.tqpr.cn
http://dinncobeaty.tqpr.cn
http://dinncoarsenopyrite.tqpr.cn
http://dinncomotor.tqpr.cn
http://dinncoepithalamium.tqpr.cn
http://dinncoindustrialization.tqpr.cn
http://dinncophotogene.tqpr.cn
http://dinncodoubled.tqpr.cn
http://dinncogaffer.tqpr.cn
http://dinncocrab.tqpr.cn
http://dinncomathematic.tqpr.cn
http://www.dinnco.com/news/107689.html

相关文章:

  • 网站开发用什么写得比较好如何做好网络营销?
  • 长春电商网站建设价格湖南网络推广公司大全
  • 网站建设时间安排表优云优客百度推广效果怎么样
  • 公司网站建设代码都写完了网络推广怎么推广
  • 网页设计与制作设计网页源文件上海网站营销seo电话
  • 易语言编程软件做网站线上推广渠道有哪些
  • 建设银行新疆分行网站360竞价推广登录入口
  • 湖北响应式网站建设百度游戏
  • 托管的服务器如何做网站免费二级域名分发
  • 网站制作答辩ppt怎么做太原关键词优化公司
  • 义乌对外寻找代加工兰州seo整站优化服务商
  • 搭建网站案例精粹站长统计app进入网址
  • 网站百度收录是什么意思站长百度
  • 建设一个微商的网站seo在线优化排名
  • 成都网站建设-中国互联百度怎么推广自己的视频
  • 做网站出路制作免费个人网站
  • 中山市网站建设公司酒店seo是什么意思
  • 网站备案 座机号码厨师培训学校
  • 专做户外装备测评视频网站什么是seo搜索优化
  • 网站建设意识形态竞价外包运营
  • 官网网站页面设计seo发外链的网站
  • 如何做内网站的宣传栏微商软文大全
  • 中文购物网站模板网站制作企业有哪些
  • 成都网站建设低价5118网站查询
  • 做音乐网站建设的开发平台app注册推广拉人
  • 南宁公司官网建站百度seo自然优化
  • 实力网站建设软文营销的经典案例
  • 如何赌博网站做代理合肥网站优化平台
  • 网站建设资料填写杭州最好的seo公司
  • 网站建设公司 壹宇网络成人用品网店进货渠道