#include<bits/stdc++.h> using namespace std; int T,n,l,w; const int maxn = 1e4+5; struct S{ double s,t; }a[maxn]; bool cmp(const S &a,const S &b){ return a.s<b.s; } void work(){ scanf("%d%d%d",&n,&l,&w); int o=0; for(int i=1;i<=n;i++){ int mid,r; scanf("%d%d",&mid,&r); if(r*2<w)continue;o++; a[o].s=a[o].mid-sqrt(r*r-h*h/4.0); a[o].t=a[o].mid+sqrt(r*r-h*h/4.0); } sort(a+1,a+1+n,cmp); n=o; double f; int ans=0,opt=1,i=1; while(f<l){ ans++; double t=f; } } int main(){ scanf("%d",&T); while(T--){ work(); } return 0; }
原文:https://www.cnblogs.com/yangxuejian/p/10780965.html