摘要: #include <iostream>#include <vector>#include <string>#include <algorithm>using namespace std;void main(){ string num; string strset1="."; string strset2="0"; int n; int wei; int sum_wei; cin>>num>>n; int first=num.find_first_of(strset1); if (fi 阅读全文
posted @ 2012-02-08 20:56 Dsp Tian 阅读(442) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std; void main(){ int a,b; cin>>a>>b; cout<<a+b<<endl;} 阅读全文
posted @ 2012-02-08 15:25 Dsp Tian 阅读(389) 评论(0) 推荐(0) 编辑
摘要: #include <string>#include <iostream>#include <algorithm>#include <vector>#include <fstream>using namespace std;int main(){ ifstream in("data.txt"); string strtmp; vector<string> vect; while (getline(in,strtmp,'\n')) vect.push_back(strtmp); copy(v 阅读全文
posted @ 2012-02-08 13:18 Dsp Tian 阅读(624) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <vector>#include <algorithm>using namespace std;int testscore[] = {67, 56, 24, 78, 99, 87, 56}; void main(){ vector<int> score(testscore,testscore+sizeof(testscore)/sizeof(int)); vector<int>::iterator it; copy(score.begin(),score.end(),ostrea 阅读全文
posted @ 2012-02-08 00:00 Dsp Tian 阅读(647) 评论(0) 推荐(0) 编辑