Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

我用C++的做法

Posted by freevoice at 2005-10-05 19:51:20 on Problem 2624
In Reply To:Re:一次读几行数据阿?三行吗? Posted by:maleo at 2005-10-04 14:25:08
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int n = 0;
    vector< vector<double> > a;
    vector<double> b(8); 
    
    for (; cin >> b[0] >> b[1] >> b[2] >> b[3] >> b[4] >> b[5] >> b[6] >> b[7]; ) {
        n++;
        a.push_back(b);
    }

    
    cout << n << endl;
    return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator