📅  最后修改于: 2023-12-03 15:34:33.669000             🧑  作者: Mango
你正在进行一个安置测验,帮助系统找到最适合你的工作。系统会问你一些关于你职业技能和工作经验的问题,然后推荐一些职业和对应的工资水平。
现在,你需要编写一个程序来处理这个安置测验。程序需要读取输入的问题和答案,然后根据一些预设条件来推荐职业和工资水平。
输入文件包含多组数据,每组数据的格式如下:
第一行为整数 $n$,表示该组数据中有 $n$ 个问题。
接下来 $n$ 行,每行包含一个问题和该问题的答案选项,格式如下:
Question: question_text
Answers: answer_option_1, answer_option_2, ..., answer_option_k
接下来一行,包含 $m$ 个整数,表示每个职业对应的工资水平。
接下来一行,包含多个整数,表示预设条件,用于筛选职业,格式如下:
profession_1: lower_bound_1 upper_bound_1
profession_2: lower_bound_2 upper_bound_2
...
每个职业的工资水平可以是任意整数。
对于每组数据,输出若干行,每行包含一个职业和该职业对应的工资水平,从高到低按工资水平排列。输出格式如下:
profession_1: salary_1
profession_2: salary_2
...
3
Question: Do you like coding?
Answers: Yes, No, Maybe
Question: Which programming language do you know best?
Answers: C++, Java, Python
Question: How many years of coding experience do you have?
Answers: 0-1, 1-5, 5+
100000 80000 120000
Software Engineer: 0 5
Data Analyst: 1 10
6
Question: Do you like math?
Answers: Yes, No
Question: Can you handle big data?
Answers: Yes, No
Question: Which programming language do you know best?
Answers: R, Python, Matlab
Question: Do you have experience in machine learning?
Answers: Yes, No
Question: Can you work well under pressure?
Answers: Yes, No
Question: How many years of experience do you have in data analysis?
Answers: 0-1, 1-3, 3-5, 5+
80000 60000 120000 100000
Data Scientist: 1 10
Data Analyst: 0 5
Software Engineer: 120000
Data Analyst: 100000
Data Scientist: 120000
Data Analyst: 100000
# QA – 安置测验|工作和工资|问题 14
## 问题描述
你正在进行一个安置测验,帮助系统找到最适合你的工作。系统会问你一些关于你职业技能和工作经验的问题,然后推荐一些职业和对应的工资水平。
现在,你需要编写一个程序来处理这个安置测验。程序需要读取输入的问题和答案,然后根据一些预设条件来推荐职业和工资水平。
## 输入格式
输入文件包含多组数据,每组数据的格式如下:
第一行为整数 $n$,表示该组数据中有 $n$ 个问题。
接下来 $n$ 行,每行包含一个问题和该问题的答案选项,格式如下:
Question: question_text Answers: answer_option_1, answer_option_2, ..., answer_option_k
接下来一行,包含 $m$ 个整数,表示每个职业对应的工资水平。
接下来一行,包含多个整数,表示预设条件,用于筛选职业,格式如下:
profession_1: lower_bound_1 upper_bound_1 profession_2: lower_bound_2 upper_bound_2 ...
每个职业的工资水平可以是任意整数。
## 输出格式
对于每组数据,输出若干行,每行包含一个职业和该职业对应的工资水平,从高到低按工资水平排列。输出格式如下:
profession_1: salary_1 profession_2: salary_2 ...
## 示例输入
3 Question: Do you like coding? Answers: Yes, No, Maybe Question: Which programming language do you know best? Answers: C++, Java, Python Question: How many years of coding experience do you have? Answers: 0-1, 1-5, 5+ 100000 80000 120000 Software Engineer: 0 5 Data Analyst: 1 10 6 Question: Do you like math? Answers: Yes, No Question: Can you handle big data? Answers: Yes, No Question: Which programming language do you know best? Answers: R, Python, Matlab Question: Do you have experience in machine learning? Answers: Yes, No Question: Can you work well under pressure? Answers: Yes, No Question: How many years of experience do you have in data analysis? Answers: 0-1, 1-3, 3-5, 5+ 80000 60000 120000 100000 Data Scientist: 1 10 Data Analyst: 0 5
## 示例输出
Software Engineer: 120000 Data Analyst: 100000
Data Scientist: 120000 Data Analyst: 100000