#include <iostream>
#include <cmath>
#include <vector>
using namespace std;

void main()
{
double area=50;
double R=0;
int line;
cin>>line;
int i;
double x,y;
vector<double> dist;
vector<double>::iterator dit;
vector<int> res;
vector<int>::iterator rit;
for (i=0;i<line;i++)
{
cin>>x>>y;
dist.push_back(sqrt(x*x+y*y));
}

int year=0;
for (dit=dist.begin();dit!=dist.end();dit++)
{
area=50;
year=0;
while (1)
{
R=sqrt(2*area/3.1415926);
area+=50;
year++;
if (R>=*dit)
{
res.push_back(year);
break;
}
}
}

for (i=1,rit=res.begin();rit!=res.end();rit++,i++)
{
cout<<"Property"<<" "<<i<<": ";
cout<<"This property will begin eroding in year ";
cout<<*rit<<'.'<<endl;
}
cout<<"END OF OUTPUT."<<endl;

}

相关文章:

  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-31
  • 2022-02-02
  • 2022-12-23
猜你喜欢
  • 2021-10-20
  • 2021-09-18
  • 2022-12-23
  • 2021-11-12
  • 2021-04-19
  • 2021-11-08
  • 2021-10-31
相关资源
相似解决方案