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

为什么编译器上过了,oj一直卡我编译错误呢????????

Posted by hanxiangzi at 2015-09-08 16:41:09 on Problem 1005
#include<iostream>
#include<math.h>
using namespace std;
float R(float x,float y)
{
	return sqrt(x*x+y*y);
};
int year(float r)
{
	int year=0;
	float area=1.5707963*r*r;
	for(float i=0;i<area;i+=50.0)
	{
		year++;
	}
	return year;
};
int main()
{
	int N;
	cin>>N;
	float x[N],y[N],r;
	for(int j=0;j<N;j++)
	{
		cin>>x[j]>>y[j];
		r=R(x[j],y[j]);
		cout<<"Property "<<j+1<<": This property will begin eroding in year "<<year(r)<<endl;
	}
	cout << "END OF OUTPUT."<<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