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

## Re:楼主求解啊，数据过了却还是WA

Posted by abc00903 at 2020-05-14 14:38:24 on Problem 1328
In Reply To:Re:楼主求解啊，数据过了却还是WA Posted by:tomb at 2016-09-18 18:15:15
```> #include<stdio.h>
> #include<iostream>
> #include<math.h>
> #include<algorithm>
> using namespace std;
> struct isl
> {
> 	int x,y;
> };
> {
> 	float sta,end;
> };
> {
> 	if(a.end<b.end)
> 		return true;
> 	else
> 		return false;
> };
> int main()
> {
> 	int n,d;
> 	isl isl[1002];
> 	int ymax=0;
> 	int i=0;
> 	int t=0;
> 	while(cin>>n>>d&&(n!=0||d!=0)&&n<=1000&&n>=1)
> 	{
> 		t++;
> 		for(i=0;i<n;++i)
> 		{
> 			cin>>isl[i].x>>isl[i].y;
> 			if(isl[i].y>ymax)
> 			{ymax=isl[i].y;}
> 		}
> 		cout<<" "<<endl;
> 		cout<<"Case"<<t<<":";
> 		if(ymax>d||d<0)
> 		{
> 			return -1;
> 			continue;
> 		}
> 		float len;
> 		for(i=0;i<n;++i)
> 		{
> 			len=sqrt(1.0*d*d-isl[i].y*isl[i].y);
> 		}
> 		int ans=0;
> 			for(i=0;i<n;)
> 			{
> 				int count=0;
> 				for(int j=i+1;j<n;++j)
> 				{
> 					{++count;}
> 					else
> 					{break;}
> 				}
> 				i+=count+1;
> 				ans++;
> 			}
> 		 cout << ans << endl;
> 	}
> 	 return 0;
> }
>
```

Followed by: