摘要:
DescriptionAs a contestant, you must be familiar with the rules of ACM-ICPC. Teams are ranked according to the most problems solved. Teams who solve the same number of problems are ranked by least total time. The total time is the sum of the time consumed for each problem solved. The time consumed f
閱讀全文
摘要:
1.初始化演示2.push_back()演示3.insert()演示4.pop_back()演示5.erase()演示6.size()演示7.empty()演示8.assign()演示#include<iostream>#include<vector>using namespace std;typedef vector<int> vint;int main(){ cout<<"初始化對象:"<<endl; vint vec1; ///vec1對象初始為空 vint vec2(10, 6); ///vec2對象最初有
閱讀全文
摘要:
#include<iostream>#include<vector>#include<cstring>using namespace std;int main(){ int arr[10] = {12,34,566,45,64,9,45,98,35,2}; char *str = "Hello vector!"; vector <int> vector1(arr, arr+10); vector <char> vector2(str, str+strlen(str)); cout<<"vect
閱讀全文