1022 Digital Library (30 point(s))

NVMe-MI --- Message Servicing Model(消息服务模型) 本文主要介绍NVMe-MI消息服务模型,两个主要类别是请求消息和响应消息。并介绍带外机制消息服务状态机。 阅读详情

1022 Digital Library (30 point(s))

A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number as its ID. Given any query from a reader, you are supposed to output the resulting books, sorted in increasing order of their ID's.

Input Specification:

Each input file contains one test case. For each case, the first line contains a positive integer N (≤10​4​​) which is the total number of books. Then N blocks follow, each contains the information of a book in 6 lines:

  • Line #1: the 7-digit ID number;
  • Line #2: the book title -- a string of no more than 80 characters;
  • Line #3: the author -- a string of no more than 80 characters;
  • Line #4: the key words -- each word is a string of no more than 10 characters without any white space, and the keywords are separated by exactly one space;
  • Line #5: the publisher -- a string of no more than 80 characters;
  • Line #6: the published year -- a 4-digit number which is in the range [1000, 3000].

It is assumed that each book belongs to one author only, and contains no more than 5 key words; there are no more than 1000 distinct key words in total; and there are no more than 1000 distinct publishers.

After the book information, there is a line containing a positive integer M (≤1000) which is the number of user's search queries. Then M lines follow, each in one of the formats shown below:

  • 1: a book title
  • 2: name of an author
  • 3: a key word
  • 4: name of a publisher
  • 5: a 4-digit number representing the year

Output Specification:

For each query, first print the original query in a line, then output the resulting book ID's in increasing order, each occupying a line. If no book is found, print Not Found instead.

Sample Input:

3
1111111
The Testing Book
Yue Chen
test code debug sort keywords
ZUCS Print
2011
3333333
Another Testing Book
Yue Chen
test code sort keywords
ZUCS Print2
2012
2222222
The Testing Book
CYLL
keywords debug book
ZUCS Print2
2011
6
1: The Testing Book
2: Yue Chen
3: keywords
4: ZUCS Print
5: 2011
3: blablabla

Sample Output:

1: The Testing Book
1111111
2222222
2: Yue Chen
1111111
3333333
3: keywords
1111111
2222222
3333333
4: ZUCS Print
1111111
5: 2011
1111111
2222222
3: blablabla
Not Found

这道题难度不大,但是比较烦!

最开始看到限定关键词和出版商的数量,我还以为会有样例卡这个,本来想建一个map<string,vector<int> >来在输入的时候存储关键词和出版商id的,实际证明不需要。

注意点:

1. 如果要在cin或者scanf后紧接着用getline(),需要用cin.get()或者getchar()先吸收回车符;

参考他人代码的时候看到不少有趣的方法:

1. 拆解单词的方法

a. 我的方法。读取后再拆解,注意到最后若word不为空,则这也是一个单词。

getline(cin,s);
string word="";
for(int j=0;j<s.size();j++){
	if(s[j]!=' '){
		word+=s[j];
	}
	else if(s[j]==' '&&!word.empty()){
		B[i].keywords.push_back(word);
		word = "";				
	}
}
if(!word.empty()) B[i].keywords.push_back(word);

b. 更简单的方法,简直是处理字符串的神器。

while(cin>>s){
	B[i].keywords.push_back(s);
	char ch = getchar();
	if(ch=='\n') break;
}

2. 不必要去分解单词,再查询时去查询子串即可。

参考链接:https://blog.youkuaiyun.com/eric4784510/article/details/81664680

vector<string> searchKeyword(string keyword){
	vector<string> ans;
	for(int i=0;i<n;i++){
		if(b[i].keywords.find(keyword)!=string::npos)
			ans.push_back(b[i].id);
	}
	return ans;
}

3. 建立map<string, set<int>> mpTitle, mpAuthor, mpKey, mpPub, mpYear的映射关系,分别记录每个标题、作者、关键词、出版商、年份对应的id,又利用set的排序自动完成了对id的排序

参考链接:https://blog.youkuaiyun.com/qq_24452475/article/details/99851018

#include<map>
#include<set>
#include<string>
#include<iostream>
using namespace std;
void query(map<string, set<int>>& mp, string& str)
{
    if(mp.find(str) == mp.end())
        printf("Not Found\n");
    else{
        for(set<int>::iterator it=mp[str].begin(); it!=mp[str].end(); it++)
            printf("%07d\n", *it);
    }
}
int main()
{
    int n, m, id, type;
    scanf("%d", &n);
    string title, author, key, pub, year;
    map<string, set<int>> mpTitle, mpAuthor, mpKey, mpPub, mpYear;
    for(int i=0; i<n; i++)
    {
        scanf("%d", &id);
        char c = getchar();
        getline(cin, title);
        mpTitle[title].insert(id);
        getline(cin, author);
        mpAuthor[author].insert(id);
        while(cin >> key)
        {
            mpKey[key].insert(id);
            c = getchar();
            if(c == '\n') break;
        }
        getline(cin, pub);
        mpPub[pub].insert(id);
        getline(cin, year);
        mpYear[year].insert(id);
    }

    string searchKey;
    scanf("%d", &m);
    for(int i=0; i<m; i++)
    {
        scanf("%d: ", &type);
        getline(cin, searchKey);
        cout << type << ": " << searchKey << endl;
        if(type == 1) query(mpTitle, searchKey);
        else if(type==2) query(mpAuthor, searchKey);
        else if(type==3) query(mpKey, searchKey);
        else if(type==4) query(mpPub, searchKey);
        else query(mpYear, searchKey);
    }
    return 0;
}

我的AC代码

#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<cstring>
using namespace std;
int N,M;
struct book{
	int id;
	string title,author,publisher,year;
	vector<string> keywords;
	bool operator < (const book &other) const{
		return id<other.id;
	}
}; 
book B[10007];
void query(char c,string s){
	bool found = false;
	if(c=='1'){
		for(int i=0;i<N;i++){
			if(B[i].title==s){
				printf("%07d\n",B[i].id);
				found = true;
			}
		}
	}
	else if(c=='2'){
		for(int i=0;i<N;i++){
			if(B[i].author==s){
				printf("%07d\n",B[i].id);
				found = true;
			}
		}
	}
	else if(c=='3'){
		for(int i=0;i<N;i++){
			for(int j=0;j<B[i].keywords.size();j++){
				if(B[i].keywords[j]==s){
					printf("%07d\n",B[i].id);
					found = true;
					break;
				}
			}
		}
	}
	else if(c=='4'){
		for(int i=0;i<N;i++){
			if(B[i].publisher==s){
				printf("%07d\n",B[i].id);
				found = true;
			}
		}
	}
	else if(c=='5'){
		for(int i=0;i<N;i++){
			if(B[i].year==s){
				printf("%07d\n",B[i].id);
				found = true;
			}
		}
	}
	if(!found) cout<<"Not Found"<<endl;
}
int main(void){
	cin>>N;
	string s;
	for(int i=0;i<N;i++){
		cin>>B[i].id;getchar();
		getline(cin,s);
		B[i].title=s;
		getline(cin,s);
		B[i].author=s;
		getline(cin,s);
		string word="";
		for(int j=0;j<s.size();j++){
			if(s[j]!=' '){
				word+=s[j];
			}
			else if(s[j]==' '&&!word.empty()){
				B[i].keywords.push_back(word);
				word = "";				
			}
		}
		if(!word.empty()) B[i].keywords.push_back(word);
		getline(cin,s);
		B[i].publisher=s;
		getline(cin,s);
		B[i].year=s;
	}
	sort(B,B+N);
	cin>>M;getchar();
	char c;
	while(M--){
		cin>>c;cin.get();cin.get(); 
		getline(cin,s);
		cout<<c<<": "<<s<<endl;
		query(c,s);
	}
	return 0;
} 

 

matlab锅炉 pid仿真,基于Matlab锅炉仿真.doc 基于Matlab锅炉仿真内蒙古科技大学MATLAB课程设计任务书2012题 目:锅炉汽包水位控制系统学生姓名:林三彪学 号:0967112127专 业:测控技术与仪器班 级:2009-1指导教师:梁 丽摘 要锅炉是化工、炼油、发电、造纸和制糖等工业生产过程中必不可少的重要动力设备。锅炉往往成了不少工厂不可缺少的一部分,因而,对锅炉设备中的自动控制系统进行分析研究是必要的... 阅读详情

相关推荐

ROS2中间件选型指南:FastDDS与CycloneDDS零拷贝机制对比与实战

在机器人开发中,通信中间件是连接分布式节点的核心纽带,其性能直接影响系统的实时性与可靠性。DDS作为ROS2默认的通信标准,通过发布订阅模型和QoS策略,为高频大带宽场景提供了灵活的数据分发能力。并行计算与高性能传输的需求,推动了零拷贝技术的演进——从传统序列化到共享内存乃至指针传递,旨在减少数据复制开销、降低延迟。在激光雷达点云、相机图像等场景下,中间件的选型尤为关键。FastDDS凭借与ROS2的深度集成和丰富文档成为入门首选,而CycloneDDS在低延迟和资源占用上表现更优,借助iceoryx实现了

weixin_28726391的博客 261

【PAT(甲级)】1022 Digital Library

【PAT(甲级)】1022 Digital Library 详细的解题思路分析,AC代码

weixin_55202895的博客 328

统信UOS V20 安装mysql5.7.42详细教程

到bin/下,执行下面的命令,初始化mysql服务信息,得到数据库的初始密码,实际如果目录不一样记得换成自己的目录。下载后通过远程将安装包上传至服务器,我这里将安装包上传至/usr/local/mysql 下。ps:这时候如果还是不能远程访问的话,可能是防火墙的原因,命令行执行以下命令即可。再次登录,发现缺少 libtinfo.so.5文件,再次建立软连接。登录,发现报错,提示缺少libncurses.so.5文件,使用。创建 /var/lib/ 下mysql目录。登录成功,修改密码,设置远程访问。

为谁伫立在风中 1万+

PAT 1022 Digital Library

目录 题目 1022Digital Library(数字图书馆) Input Specification: Output Specification: Sample Input: Sample Output: 注意点 自己写的所有代码 代码版本一 代码版本二 代码版本三 代码版本四 代码版本...

Do Better 310

从零搭建一个虚拟ECU:手把手用Autosar CP模块模拟汽车灯控系统(基于Vector工具链)

本文详细介绍了如何使用Vector工具链从零搭建一个基于Autosar CP架构的虚拟ECU系统,模拟汽车灯光控制功能。通过环境搭建、模块配置、通信栈设置到灯光控制逻辑实现的全流程指导,帮助开发者掌握Autosar CP模块术语的实际应用,并提供了系统集成与测试的实用方案。

weixin_42628688的博客 314

量化人必看|miniQMT踩坑记:回测太慢?一招教你把行情数据“搬回家”!

这篇文章主要聊的是。

奔跑的蜗牛 3479

1022 Digital Library (30 分) C++解法

1022 Digital Library (30 分) A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number as its ID. Given any query fr

Jay_fearless的博客 286

2026AI漫剧放心大胆做!小白也能轻松出片(附保姆级教程)

要是在2025,我大概率会劝他再等等,毕竟那时工具还没这么顺手。但到了2026年的今天,我的回答得很干脆:放心去做,绝对没问题。这一年多来,AI漫剧这块的变化真可谓翻天覆地。过去你想拍个像样的短片,哪怕再简陋,也得凑齐拍摄设备、找场地、找演员,后期剪辑更是折磨。但现在,时代变了,AI已经把创作的门槛踏平了。你不需要请演员,也不用操心灯光布景,更不用为剪辑特效烧钱。一个人,一台电脑,花几天时间就能做一部完整的AI漫剧。你只要有有想表达的故事,突发的灵感,剩下的,都能直接交给AI落地。

欢迎来到鸾姝淡月博客,专为程序员和编程爱好者打造的技术博客。我们分享编程语言趋势、开发工具、编程哲学、职业发展等,助你掌握新技术,优化技能,激发编程热情。 534

1022 Digital Library(超详细注解,61行代码)

1022 Digital Library(超详细注解,61行代码)

m0_66329385的博客 215

树莓派 Raspberry Pi 使用 YOLOv8 YOLOv10 YOLOv11进行目标检测及推理加速,Run YOLOv8 YOLOv10 YOLOv11 on Raspberry Pi

libcamera 是 linux 新增加用于访问 camera 的 API。树莓派参与了 libcamera 的开发,并且在新的摄像头软件中开始从依赖于固件的摄像头图像处理管道(Image processing pipeline, ISP)迁移到更加开放的 libcamera。当然这块用USB 摄像头应该也是可以的。

shiter编写程序的艺术 5571

Open3D(C++) 点云构建三维Delaunay三角剖分

C++版本的Open3D实现从点云构建三维Delaunay,可视化效果。

点云侠的博客 2247

1022 Digital Library(超简单方法)

A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number a...

Godblessuam的博客 536

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

1022 Digital Library (30 point(s))

1022 Digital Library (30 point(s)) A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is...

徐伯莱 276

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

1022 Digital Library (30point(s))

1022 Digital Library (30point(s)) A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number as its ID. Given any qu

佳迪斯的博客 152

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

1022 Digital Library (30 point(s))

思路: 每个查询条件建立索引,索引 id 号,利用 Map 是红黑树实现的特性,快速建立/查询索引。 1022 Digital Library (30 point(s)) A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is as

专栏 143

【PAT】A1022 Digital Library (30point(s))

文章目录A1022 Digital Library (30point(s))Input Specification:Output Specification:Sample Input:Sample Output:Code([柳神的代码](https://blog.youkuaiyun.com/liuchuo/article/details/52263303))Analysis Author: CHEN, Yu...

Duke 263

A1022 Digital Library (30point(s))

A1022 Digital Library (30point(s)) 题意 每一本书的信息包含6行,其中第3行的信息是一些关键字keywords。 包含m次查询,一共有5中查询,输出书籍id。 思路 把查询的信息作为索引,书籍id为值。 #include"bits/stdc++.h" using namespace std; int main(){ // freopen("input.txt",...

qq_43578870的博客 144

1022 Digital Library (30 point(s)) - C语言 PAT 甲级

设计思路: * 结构体存储书的信息 * 每次查询命令对应一次查询 * 查询函数中,因为结构体内成员的地址是相对地址,所以利用偏移量对应每次查询 注:若是把结构体中 keywords[] 改成一维数组,直接存储一行,keysearch 函数可以直接利用 strstr() 进行子串匹配,不仅能 AC,速度还很快(有匹配到更小子串的风险,但似乎并没有这样的测试点~)

有三只土豆 252

PAT A1022 Digital Library (30point(s))

题目链接 注意点: 1.要用到map<string,set>来将学号映射到不同的字符串信息上方便查找。 2.关键字的提取要注意区分空格和换行,只有遇到换行才说明关键字部分结束。可以用getchar()来判断,代码如下: do{//关键字要特殊处理 cin>>key;//读入一个关键字 mpkeywords[key].inser...

皮皮瓜的博客 206

1022 Digital Library (30)(30 point(s))

problem A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit ...

weixin_30235225的博客 79

PAT (Advanced Level) Practice 1022 Digital Library (30 point(s))

题目 PAT A 1022 链接 题目大意 有n本书,每本书输入的格式为 Line #1: the 7-digit ID number; Line #2: the book title -- a string of no more than 80 characters; Line #3: the author -- a string of no more than 80 characters; Line #4: the key words -- each word is a string of no mor

helloful的博客 143

1022 Digital Library (30)(30 分)

1022 Digital Library (30)(30 分) A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is as...

Become hunger become strong 854

1022 Digital Library (30)(30 point(s))(cj)

1022 Digital Library (30)(30 point(s)) A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each boo...

Cute_jinx的博客 195

PAT 1022 Digital Library(测试点3,4是输出格式问题)

#include <iostream> #include <string> #include <map> #include <set> using namespace std; void Find(map<string, set<int>>&list, string &x) { if (list.find(x) == list.end()) cout << "Not Found" << en

qq_40737596的博客 537

1022 Digital Library (30)(30 分)

要气疯了,,,最后发现是没写%07d,emmmm #include&lt;iostream&gt; #include&lt;string&gt; #include&lt;algorithm&gt; #include&lt;vector&gt; using namespace std; const int maxn = 1e4 + 10, maxnm = 1e3 + 10; struct boo...

Dai 438

A1022 Digital Library (30分)【C语言】

A1022 Digital Library (30分)【C语言】 原题链接 题目描述: A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number as its ID. Gi

SASAKI_130的博客 820
上一篇: 1071 Speech Patterns (25 point(s))
下一篇: 1043 Is It a Binary Search Tree (25 point(s))
coderwait
博客等级 码龄9年 20粉丝 210原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值