vector<int> Val;
for(int i=0;i<5;i++)
{
Val.push_back(i);
}
int nMax = *max_element(Val.begin(),Val.end());//求最大值
int nMin = *min_element(Val.begin(),Val.end());//求最小值
vector<int> Val;
for(int i=0;i<5;i++)
{
Val.push_back(i);
}
int nMax = *max_element(Val.begin(),Val.end());//求最大值
int nMin = *min_element(Val.begin(),Val.end());//求最小值