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

请各位看看,为什么老是Wrong Answer呢?

Posted by xmlparser at 2011-07-24 11:54:25 on Problem 1005
#include <iostream>
#include <vector>
#include <math.h>

using namespace std;

int main()
{
	int N ;
	double X,Y;
	cin >> N ;
	if ( N == 0 )
		cout<<"END OF OUTPUT."<<endl;
	vector<int> yearVector;
	double pi = 3.14 ;
	double year;
	double perYear = 50.0 ; 
	for ( int i = 0 ; i < N ; i ++ )
	{
		cin >> X >> Y ;
		year = ( 0.5 * pi * ( X * X + Y * Y ) ) / perYear ;
		yearVector.push_back( ceil ( year ) );
	}
	for ( int i = 0 ; i < N ; i ++ )
		cout<<"Property "<<i<<": This property will begin eroding in year "<<yearVector[i]<<"."<<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