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

建设银行官网首页网站公告wordpress怎么变中文版

建设银行官网首页网站公告,wordpress怎么变中文版,wordpress代码添加文章字段栏目,营销公司官网输入n篇文章和m个请求#xff08;n100#xff0c;m≤50000#xff09;#xff0c;每个请求都是以下4种格式之一。 A#xff1a;查找包含关键字A的文章。 A AND B#xff1a;查找同时包含关键字A和B的文章。 A OR B#xff1a;查找包含关键字A或B的文章。 NOT A…输入n篇文章和m个请求n100m≤50000每个请求都是以下4种格式之一。 A查找包含关键字A的文章。 A AND B查找同时包含关键字A和B的文章。 A OR B查找包含关键字A或B的文章。 NOT A查找不包含关键字A的文章。 处理询问时需要对于每篇文章输出证据。前3种询问输出所有至少包含一个关键字的行第4种询问输出整篇文章。关键字只由小写字母组成查找时忽略大小写。每行不超过80个字符一共不超过1500行。 样例 输入 4 A manufacturer, importer, or seller of digital media devices may not (1) sell, or offer for sale, in interstate commerce, or (2) cause to be transported in, or in a manner affecting, interstate commerce, a digital media device unless the device includes and utilizes standard security technologies that adhere to the security system standards. ********** Of course, Lisa did not necessarily intend to read his books. She might want the computer only to write her midterm. But Dan knew she came from a middle-class family and could hardly afford the tuition, let alone her reading fees. Books might be the only way she could graduate ********** Research in analysis (i.e., the evaluation of the strengths and weaknesses of computer system) is essential to the development of effective security, both for works protected by copyright law and for information in general. Such research can progress only through the open publication and exchange of complete scientific results ********** I am very very very happy! What about you? ********** 6 computer books AND computer books OR protected NOT security very slick输出 want the computer only to write her ---------- computer system) is essential to theintend to read his books. She might want the computer only to write her fees. Books might be the only way sheintend to read his books. She might fees. Books might be the only way she ---------- for works protected by copyright lawOf course, Lisa did not necessarily intend to read his books. She might want the computer only to write her midterm. But Dan knew she came from a middle-class family and could hardly afford the tuition, let alone her reading fees. Books might be the only way she could graduate ---------- I am very very very happy! What about you?I am very very very happy!not found解法 use std::{collections::{BTreeMap, BTreeSet, HashMap},io, }; #[derive(PartialEq)] enum WordOp {AND,OR,None,NOT, }fn get_words(s: String) - VecString {let w: String s.chars().map(|x| {if x.is_alphabetic() {x.to_ascii_lowercase()} else { }}).collect();let wds: VecString w.split_whitespace().map(|x| x.to_string()).collect();wds } fn main() {let mut buf String::new();io::stdin().read_line(mut buf).unwrap();let n: usize buf.trim().parse().unwrap();let mut articles: VecVecString vec![];//每篇文章的所有行let mut words: VecHashMapString, BTreeSetusize vec![];//每篇文章的所有单词和单词所在的行号for _i in 0..n {let mut article: VecString vec![];let mut wd: HashMapString, BTreeSetusize HashMap::new();loop {let mut buf String::new();io::stdin().read_line(mut buf).unwrap();if buf.trim() *.repeat(10) {break;}article.push(buf.trim().to_string());//count wordslet v: VecString get_words(buf);let line_idx article.len() - 1;for w in v.iter() {wd.entry(w.to_string()).and_modify(|x| {x.insert(line_idx);}).or_insert(BTreeSet::from([line_idx]));}}articles.push(article);words.push(wd);}let mut buf String::new();io::stdin().read_line(mut buf).unwrap();let m: usize buf.trim().parse().unwrap();let mut cmds vec![];for _i in 0..m {let mut buf String::new();io::stdin().read_line(mut buf).unwrap();cmds.push(buf.trim().to_string());}for cmd in cmds.iter() {if let Some(idx) cmd.find(OR) {let word1 cmd[0..idx - 1].to_string();let word2 cmd[idx 3..].to_string();find_word(articles, words, word1, word2, WordOp::OR);} else if let Some(idx) cmd.find(AND) {let word1 cmd[0..idx - 1].to_string();let word2 cmd[idx 4..].to_string();find_word(articles, words, word1, word2, WordOp::AND);} else if let Some(idx) cmd.find(NOT) {let word1 cmd[idx 4..].to_string();find_word(articles, words, word1, .to_string(), WordOp::NOT);} else {let word1 cmd;find_word(articles, words, word1, .to_string(), WordOp::None);}println!({}, .repeat(10));} }fn print_result(find_result: BTreeMapusize, BTreeSetusize, articles: VecVecString) {if find_result.is_empty() {println!(not found);} else {let mut cnt 0;for (k, v) in find_result.iter() {for i in v.iter() {println!({}, articles[*k][*i]);}cnt 1;if cnt ! find_result.len() {println!({}, -.repeat(10));}}} }fn find_word(articles: VecVecString,words: VecHashMapString, BTreeSetusize,word1: String,word2: String,op: WordOp, ) {let mut find_result: BTreeMapusize, BTreeSetusize BTreeMap::new();for (aidx, lines) in articles.iter().enumerate() {let mut find_line_idx: BTreeSetusize BTreeSet::new();let ws words.get(aidx).unwrap();if op WordOp::OR {if ws.contains_key(word1) || ws.contains_key(word2) {if let Some(idx) ws.get(word1) {find_line_idx.append(mut idx.clone());}if let Some(idx) ws.get(word2) {find_line_idx.append(mut idx.clone());}find_result.insert(aidx, find_line_idx);}} else if op WordOp::AND {if ws.contains_key(word1) ws.contains_key(word2) {let idx ws.get(word1).unwrap();find_line_idx.append(mut idx.clone());let idx ws.get(word2).unwrap();find_line_idx.append(mut idx.clone());find_result.insert(aidx, find_line_idx);}} else if op WordOp::None {if ws.contains_key(word1) {let idx ws.get(word1).unwrap();find_line_idx.append(mut idx.clone());find_result.insert(aidx, find_line_idx);}} else if op WordOp::NOT {if !ws.contains_key(word1) {find_line_idx.append(mut (0..lines.len()).collect());find_result.insert(aidx, find_line_idx);}}}print_result(find_result, articles); }
http://www.yutouwan.com/news/90023/

相关文章:

  • php 除了做网站网站用单页面框架做
  • 怎么制定网站上海私人网站建设
  • 福州网站建设多少钱wordpress此网页包含重定向循环
  • 网站已经收录了 但是输入公司名找不到免费qq注册入口
  • 外发加工单表格范本外贸网站优化哪家好
  • 网站制作外包牛商做网站的理念
  • 高埗镇网站建设网页设计与制作有什么感想
  • 购物网站线下推广方案技术号的网站建设
  • 网站建设 意向协议书公司网站制作范文
  • 网站发布时间更改网页打不开但是微信和qq都可以上
  • 沈阳建网站电商wordpress页面调用子页面
  • 上海做网站大的公司有哪些深圳龙华建设公司
  • 课程网站开发与设计logo设计报价明细表
  • 洛阳网站建设seo如何使用花生壳做网站
  • 网站建设价格如何深圳做分销网站的公司
  • 罗湖网站建设罗湖网站设计有哪些网站可以做店面设计软件
  • 2021年关键词排名seo如何优化排名
  • 甘肃网站建设公司电话做网站只做前端可以用吗
  • html课程教学网站模板住房和城乡建设部网站行标
  • 厦门网站建设是什么网页版微信网址
  • 网络公司网站样本百度网站提交收录
  • 专业做家政网站只做同城交易的网站
  • 兰州网站建设q.479185700棒计算机网站开发国外参考文献
  • 政务网站建设信息怎么设置公司网址
  • 凤岗网站设计门户网站建设技术要求
  • 里水网站开发做网站公司松江
  • 企业网站备案域名信息陕西省建设监理协会查询官方网站
  • 珠宝企业的门户网站开发如何查询网站建设者
  • 网站建设外包给外企移动平台开发技术
  • 组建一个网站wordpress th7