上一页 1 ··· 7 8 9 10 11
  2012年5月12日
摘要: 田忌赛马时间限制:3000 ms | 内存限制:65535 KB难度:1描述Here is a famous story in Chinese history.“That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the king and others.”“Both of Tian and the king have three horses in different classes, namely, re 阅读全文
posted @ 2012-05-12 01:17 端着咖啡码农 阅读(278) 评论(0) 推荐(0) 编辑
摘要: View Code 1 #include<iostream> 2 #include<vector> 3 #include<string> 4 using namespace std; 5 6 int main() 7 { 8 vector <int> ive;//保存一个int类型数据的vector,此时,ive为空,当ive(5,2);表明在容器中已经键入了5个2,再往里面键入时,就往后面继续加 9 int k;10 cout<< ive.size()<<endl;11 cout<<"请输入5个整数 阅读全文
posted @ 2012-05-12 01:15 端着咖啡码农 阅读(165) 评论(0) 推荐(0) 编辑
  2012年5月9日
摘要: vector开始学了:#include<iostream>#include<vector>#include<string>using namespace std;int main(){vector <int> ive;//保存一个int类型数据的vector,此时,ive为空,当ive(5,2);表明在容器中已经键入了5个2,再往里面键入时,就往后面继续加int k;cout<< ive.size()<<endl;cout<<"请输入5个整数:";for(vector<int>: 阅读全文
posted @ 2012-05-09 20:48 端着咖啡码农 阅读(306) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11