首页 > 试题广场 >

程序的输出为( )

[单选题]
#include<bits/stdc++.h>
using namespace std;
int main(){
int n = 5;
vector<int>a;
set<int>b;
for(int i = 1; i <= n; ++i){
a.push_back(i);
b.insert(i);
}
for(int i = 1; i <= n; ++i){
a.push_back(i);
b.insert(i);
}
cout<<a.size()<<b.size()<<endl;
return 0;
}
程序的输出为( )
  • 105
  • 510
  • 1010
  • 55
vector?
发表于 2019-09-28 08:05:28 回复(0)
Set 意为集合,集合在数学上没有重复值
发表于 2019-09-27 10:40:54 回复(0)
set容器里没有重复值
发表于 2019-08-24 20:34:58 回复(0)