阅读以下说明和C++代码,将应填入 (n) 处的字句写在答题纸的对应栏内。
【说明】
C++标准模板库中提供了vector模板类,可作为动态数组使用,并可容纳任意数据类型,其所属的命名空间为std。vector模板类的部分方法说明如下表所示:
【C++代码】
#include <iostream>
#include <vector>
using namespace (1) ;
typedef vector< (2) > INTVECTOR;
const int ARRAY_SIZE = 6;
void ShowVector(INTVECTOR &theVector);
int main(){
INTVECTOR theVector;
// 初始化theVector,将theVector的元素依次设置为0至5
for (int cEachItem = 0; cEachItem < ARRAY_SIZE; cEachItem++)
theVector.push_back( (3) );
ShowVector(theVector); // 依次输出theVector中的元素
theVector.erase(theVector.begin() + 3);
ShowVector(theVector);
}
void ShowVector(INTVECTOR &theVector) {
if (theVector.empty()) {
cout << "theVector is empty." << endl; return;
}
INTVECTOR::iterator (4) ;
for(theIterator = theVector.begin(); theIterator != theVector.end(); theIterator++){
cout << *theIterator;
if (theIterator != theVector.end()-1) cout << ", ";
}
cout << endl;
}
该程序运行后的输出结果为:(5)
(1)std (2) int (3)cEachItem (4)theIterator (5)0,1,2,4,5
本题主要考查C++语言的基本使用以及类库的应用。
在使用标准C++库中所提供的对象时,一般需要引用标准的命名空间。所以空(1)需要填入标准的命名空间std。空(2)处主要考查是否会使用C++提供的模板类。C++中Vector模板类可存储任意类型,在定义Vector模板类的对象时,需要指定Vector对象的类型。从后面的代码可以看出,Vector被用于存储整型数,所以,空(2)处应填写整型int。初始化代码将0到5共6个整数存储到theVector对象中,所以,空(3)处将循环变量的值存入theVector中。空(4)处代码部分主要是循环输出theVector对象的内容,使用了迭代器的访问方式,因此空(4)处应该为定义迭代器变量,在后续的循环中使用该变量。程序运行时将首先输出0至5,其次会删除第3个元素,再次输出时将不再包含整数3。
( )is that it provides guidance and direction on how quality will be managed and verified throughout the project.
( )the process of determining,documenting,and managing stakeholder needs and requirements to meet Project objectives.
The information security management system preserves the confidentiality,integrity and availability of information by applying a( ).
( )is a decentralized database,ensure that the data will not be tampered with and forged.
( )puts computer resources on the web,and must meet the requirements of super capacity,super concurrency,super speed and super security.
分配甲、乙、丙、丁四个人去完成五项任务。每人完成各项任务时间如表所示。由于任务多于人数,故规定其中有一个人可兼完成两项任务,其余三人每人完成一项。为了花费时间最少,( )应该完成两项任务。
已知某公司生产AB两种产品,其中生产1件A产品需要1个单位的甲资源,3个单位的丙资源;生产1件B产品需要2个单位的乙资源和2个单位的丙资源。已知现有甲乙丙三种资源4个单位、12个单位和18个单位。通过市场预测,可知A产品的单位市场利润为2元,B产品的单位市场利润为5元。该公司获得最大的市场利润应生产A产品(68)件,此时(69)资源仍有剩余。
已知某公司生产AB两种产品,其中生产1件A产品需要1个单位的甲资源,3个单位的丙资源;生产1件B产品需要2个单位的乙资源和2个单位的丙资源。已知现有甲乙丙三种资源4个单位、12个单位和18个单位。通过市场预测,可知A产品的单位市场利润为2元,B产品的单位市场利润为5元。该公司获得最大的市场利润应生产A产品(68)件,此时(69)资源仍有剩余。
某项目2016年投资额12万元,2018年开始取得项目的净收益(产品一原料辅料及公用工程)6万元/年,2018-2021年每年还会产生其他成本(包括人员工资、管理成本、制造成本等)1.1万元/年;増值税0.35万元/年、营业税金及附加0.05万元/年。则该项目的静态投资回收期为(66)年,截止到2021年底该项目的投资收益率是(67)。
安全审计的手段主要包括( )。