Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
啊犯了个初级错误不好意思In Reply To:那位大哥替我看一下,明明是对的啊? Posted by:zhangjb at 2005-02-19 00:04:23 > #include <iostream> > #include <vector> > using namespace std; > > void main() > { > int n; cin >> n; > vector< vector<int> > homeworks(n, vector<int>(5)); > for (int i=0;i<n;i++) > { > for (int j=0;j<4;j++) > { > cin >> homeworks[i][j]; > } > } > for (i=0;i<n;i++) > { > if ( homeworks[i][3]-homeworks[i][2]==homeworks[i][2]-homeworks[i][1]==homeworks[i][1]-homeworks[i][0] ) > homeworks[i][4] = homeworks[i][3]+homeworks[i][3]-homeworks[i][2]; > else homeworks[i][4] = homeworks[i][3]/homeworks[i][2]*homeworks[i][3]; > } > for (i=0;i<n;i++) > { > for (int j=0;j<5;j++) > { > cout << homeworks[i][j] << " "; > } > cout << endl; > } > } > Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator