QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#286884#7862. Land TradePhantomThresholdAC ✓299ms17016kbC++208.6kb2023-12-18 22:37:342023-12-18 22:37:35

Judging History

你现在查看的是最新测评结果

  • [2023-12-18 22:37:35]
  • 评测
  • 测评结果:AC
  • 用时:299ms
  • 内存:17016kb
  • [2023-12-18 22:37:34]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

int __CNT=0;

typedef long double db;
const db eps=1e-10;
const db pi=acos(-1);
int sign(db k){
	if (k>eps) return 1;
	else if (k<-eps) return -1;
	return 0;
}
int cmp(db k1,db k2){return sign(k1-k2);}
int inmid(db k1,db k2,db k3){return sign(k1-k3)*sign(k2-k3)<=0;}// k3 在 [k1,k2] 内
struct point{
	db x,y;
	point operator + (const point &k1) const{return (point){k1.x+x,k1.y+y};}
	point operator - (const point &k1) const{return (point){x-k1.x,y-k1.y};}
	point operator * (db k1) const{return (point){x*k1,y*k1};}
	point operator / (db k1) const{return (point){x/k1,y/k1};}
	int operator == (const point &k1) const{return cmp(x,k1.x)==0&&cmp(y,k1.y)==0;}
	// 逆时针旋转
	point turn(db k1){return (point){x*cos(k1)-y*sin(k1),x*sin(k1)+y*cos(k1)};}
	point turn90(){return (point){-y,x};}
	bool operator < (const point k1) const{
		int a=cmp(y,k1.y);
		if (a==-1) return 1; else if (a==1) return 0; else return cmp(x,k1.x)==-1;
	}
	db abs(){return sqrt(x*x+y*y);}
	db abs2(){return x*x+y*y;}
	db dis(point k1){return ((*this)-k1).abs();}
	point unit(){db w=abs(); return (point){x/w,y/w};}
	/*
	void scan(){double k1,k2; scanf("%lf%lf",&k1,&k2); x=k1; y=k2;}
	void print(){printf("%.11lf %.11lf\n",x,y);}
	*/
	
	friend ostream& operator << (ostream& os,const point &P){
		os << "(" << P.x << "," << P.y << ")";
		return os;	
	}
	
	db getw(){return atan2(y,x);}
	point getdel(){
		if (sign(x)==-1||(sign(x)==0&&sign(y)==-1)) return (*this)*(-1);
		else return (*this);
	}
	int getP() const{return sign(y)==-1||(sign(y)==0&&sign(x)==-1);}
};
int inmid(point k1,point k2,point k3){
	return inmid(k1.x,k2.x,k3.x)&&inmid(k1.y,k2.y,k3.y);
}
db cross(point k1,point k2){return k1.x*k2.y-k1.y*k2.x;}
db dot(point k1,point k2){return k1.x*k2.x+k1.y*k2.y;}
db rad(point k1,point k2){return atan2(cross(k1,k2),dot(k1,k2));}
// -pi -> pi
int compareangle (point k1,point k2){
	return k1.getP()<k2.getP()||(k1.getP()==k2.getP()&&sign(cross(k1,k2))>0);
}
point proj(point k1,point k2,point q){ // q 到直线 k1,k2 的投影
	point k=k2-k1; return k1+k*(dot(q-k1,k)/k.abs2());
}
int checkLL(point k1,point k2,point k3,point k4){// 求直线 (L) 线段 (S)k1,k2 和 k3,k4 的交点
	return cmp(cross(k3-k1,k4-k1),cross(k3-k2,k4-k2))!=0;
}
point getLL(point k1,point k2,point k3,point k4){
	db w1=cross(k1-k3,k4-k3),w2=cross(k4-k3,k2-k3); return (k1*w2+k2*w1)/(w1+w2);
}

struct line{
	// p[0]->p[1]
	point p[2];
	line(point k1,point k2){p[0]=k1; p[1]=k2;}
	point& operator [] (int k){return p[k];}
	int include(point k){return sign(cross(p[1]-p[0],k-p[0]))>0;}
	point dir(){return p[1]-p[0];}
	/*
	line push(){ // 向外 ( 左手边 ) 平移 eps
		const db eps = 1e-6;
		point delta=(p[1]-p[0]).turn90().unit()*eps;
		return {p[0]-delta,p[1]-delta};
	}
	*/
	friend ostream& operator << (ostream& os,const line &L){
		os << "{" << L.p[0] << "->" << L.p[1] << "}";
		return os;	
	}
};
bool checkLL(line k1,line k2){return checkLL(k1[0],k1[1],k2[0],k2[1]);}
point getLL(line k1,line k2){return getLL(k1[0],k1[1],k2[0],k2[1]);}
int parallel(line k1,line k2){return sign(cross(k1.dir(),k2.dir()))==0;}
int sameDir(line k1,line k2){
	return parallel(k1,k2)&&sign(dot(k1.dir(),k2.dir()))==1;
}
int operator < (line k1,line k2){
	if (sameDir(k1,k2)) return k2.include(k1[0]);
	return compareangle(k1.dir(),k2.dir());
}
int checkpos(line k1,line k2,line k3){return k3.include(getLL(k1,k2));}


int lineid=0;//0-index
vector<line> vline;
vector<tuple<db,db,db>> vabc;

int nodeid=0;//1-index
struct node{
	int tp;
	// 1 2 3 4 5
	// & | ^ ! L
	int lson;
	int rson;
	int line_num;
};
node vnode[200050];

int parse(const string &expr,int L,int R){
//	cerr << "----------------" << endl;
//	cerr << "expr : " << expr << endl;
//	cerr << "L R:" << L << " " << R << endl;
//	if (++__CNT==20) exit(0);
	if (expr[L]=='['){
		string tmp=expr.substr(L+1,R-L-1);
		stringstream ss(tmp);
		
		long long a,b,c;
		ss >> a >> b >> c;
		db D=-1.0*c/(a*a+b*b);
		point P={D*a,D*b};
		point dir={(db)b,(db)-a};
		point Q=P+dir.turn90();
		if (sign(a*Q.x+b*Q.y+c)<0) dir=dir*(-1.0);
		
		vline.emplace_back(P,P+dir);
		vabc.emplace_back(a,b,c);
		vnode[++nodeid]={5,-1,-1,lineid};
		lineid++;
		return nodeid;
	}
	if (expr[L+1]=='!'){
		int now_id=++nodeid;
		vnode[now_id]={4,parse(expr,L+2,R-1),-1,-1};
		return now_id;
	}
	int pos=-1;
	int sum=0;
	for (int i=L+1;i<=R-1;i++){
		if (expr[i]=='(') sum++;
		if (expr[i]=='[') sum++;
		if (expr[i]==')') sum--;
		if (expr[i]==']') sum--;
		if (sum==0){
			pos=i+1;
			break;	
		}
	}
//	cerr << "pos,sum: " << pos << " " << sum << endl; 
	int now_id=++nodeid;
	if (expr[pos]=='&') vnode[now_id].tp=1;
	if (expr[pos]=='|') vnode[now_id].tp=2;
	if (expr[pos]=='^') vnode[now_id].tp=3;
	vnode[now_id].lson=parse(expr,L+1,pos-1);
	vnode[now_id].rson=parse(expr,pos+1,R-1);
	vnode[now_id].line_num=-1;
	return now_id;
}

bool check(int x,point P){
	if (vnode[x].tp==1){
		return check(vnode[x].lson,P) && check(vnode[x].rson,P);
	}
	else if (vnode[x].tp==2){
		return check(vnode[x].lson,P) || check(vnode[x].rson,P);
	}
	else if (vnode[x].tp==3){
		return check(vnode[x].lson,P) ^ check(vnode[x].rson,P);
	}
	else if (vnode[x].tp==4){
		return !check(vnode[x].lson,P);
	}
	else if (vnode[x].tp==5){
		tuple<db,db,db> &abc = vabc[vnode[x].line_num];
		if (sign(get<0>(abc)*P.x+get<1>(abc)*P.y+get<2>(abc))>=0) return true;
		return false;
	}
	return false;
}

int main(){
	db xl,yl,xr,yr;
	cin >> xl >> xr >> yl >> yr;
	
	string expr;
	cin >> expr;
	int len=expr.length();
	for (auto &ch:expr) if (ch==',') ch=' ';
	int Root = parse(expr,0,len-1);
	
	point C1={(db)xl,(db)yl};
	point C2={(db)xr,(db)yl};
	point C3={(db)xr,(db)yr};
	point C4={(db)xl,(db)yr};
	vline.emplace_back(C1,C2);
	vline.emplace_back(C2,C3);
	vline.emplace_back(C3,C4);
	vline.emplace_back(C4,C1);
	lineid+=4;
	/*
	cerr << "stage 1" << endl;
	cerr << "---------------" << endl;
	cerr << "lineid : " << lineid << endl;
	for (auto L:vline) cerr << L << endl;
	cerr << "---------------" << endl;
	cerr << "nodeid : " << nodeid << endl;
	for (int i=1;i<=nodeid;i++)
		cerr << "tp,l,r,lid : "
			 << vnode[i].tp << " "
			 << vnode[i].lson << " "
			 << vnode[i].rson << " "
			 << vnode[i].line_num << endl;
	*/
	vector<point> vp;
	for (auto l1:vline){
		for (auto l2:vline){
			if (!checkLL(l1,l2)) continue;
			point tmp=getLL(l1,l2);
			if (!inmid(xl,xr,tmp.x)) continue;
			if (!inmid(yl,yr,tmp.y)) continue;
			vp.emplace_back(tmp);
		}
	}
	sort(vp.begin(),vp.end());
	vp.resize(
		unique(vp.begin(),vp.end())-vp.begin()
	);
	
	int pnum=vp.size();
	vector<vector<int>> G(pnum);
	/*
	cerr << "--------------" << endl;
	cerr << "stage 2" << endl;
	cerr << "point_num : " << pnum << endl;
	for (auto p:vp) cerr << p << endl;
	cerr << "--------------" << endl;
	*/
	for (auto l:vline){
		vector<int> ps;
		for (int i=0;i<pnum;i++)
			if (sign(cross(l[1]-l[0],vp[i]-l[0]))==0) ps.emplace_back(i);
		sort(ps.begin(),ps.end(),
			[&](int idx,int idy){
				return dot(l[1]-l[0],vp[idx]-l[0])<dot(l[1]-l[0],vp[idy]-l[0]);
			}
		);
		int sz=ps.size();
		for (int i=1;i<sz;i++){
			G[ps[i-1]].emplace_back(ps[i]);
			G[ps[i]].emplace_back(ps[i-1]);
		}
	}
	
	for (int i=0;i<pnum;i++){
		sort(
			G[i].begin(),G[i].end(),
			[&](int x,int y){
				return compareangle(vp[x]-vp[i],vp[y]-vp[i]);	
			}
		);
	}
	/*
	for (int i=0;i<pnum;i++){
		cerr << "G[" << i << "] : ";
		for (auto j:G[i]) cerr << j << " ";
		cerr << endl;	
	}
	*/
	db ans=0;
	set<pair<int,int>> vis;
	for (int i=0;i<pnum;i++){
		for (auto j:G[i]){
			if (vis.count(make_pair(i,j))) continue;
		//	cerr << "go : " << i << " " << j << endl;
			vector<point> area;
			
			int now=i;
			int nxt=j;
			do{
			//	cerr << "now,nxt : " << now << " " << nxt << endl;
				area.push_back(vp[now]);
				vis.emplace(make_pair(now,nxt));
				
				int nxt_nxt=-1;
				for (auto k:G[nxt]){
					if (sign(cross(vp[nxt]-vp[now],vp[k]-vp[nxt]))<=0) continue;
					if (vis.count(make_pair(nxt,k))) continue;
					
					if (nxt_nxt==-1) nxt_nxt=k;
					else if (sign(cross(vp[nxt_nxt]-vp[nxt],vp[k]-vp[nxt]))>0){
						nxt_nxt=k;
					}
				}
				
				now=nxt;
				nxt=nxt_nxt;
				
			}while (now!=i && nxt!=-1);
			
			int cnt=area.size();
			if (cnt<3) continue;
			
			point O={(db)0.0,(db)0.0};
			for (auto P:area) O=O+P;
			O=O/cnt;
			
			if (!check(Root,O)) continue; 
			
			db S=0;
			for (int k=2;k<cnt;k++) S=S+cross(area[k-1]-area[0],area[k]-area[0]);
			
			S=S/2;
			ans+=S;
			
		}
	}
	cout << fixed << setprecision(12) << ans << "\n";
	return 0;
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3668kb

input:

0 1 0 1
([-1,1,0]^[-1,-1,1])

output:

0.500000000000

result:

ok found '0.5000000', expected '0.5000000', error '0.0000000'

Test #2:

score: 0
Accepted
time: 1ms
memory: 3728kb

input:

-5 10 -10 5
((!([1,2,-3]&[10,3,-2]))^([-2,3,1]|[5,-2,7]))

output:

70.451693404635

result:

ok found '70.4516934', expected '70.4516934', error '0.0000000'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

0 1 -1 1
([1,1,1]&[-1,-1,-1])

output:

0.000000000000

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #4:

score: 0
Accepted
time: 1ms
memory: 3732kb

input:

0 1000 0 1000
(([1,-1,0]&[-1000,999,999])&([1,0,-998]&[0,1,-998]))

output:

0.000500000000

result:

ok found '0.0005000', expected '0.0005000', error '0.0000000'

Test #5:

score: 0
Accepted
time: 1ms
memory: 3724kb

input:

-725 165 643 735
((((!(([22,15,137]|(!([23,-5,-41]^(!([2,25,-515]&[-37,10,487])))))&(!(([25,24,47]^([-24,21,-114]^[19,-7,79]))^[4,20,241]))))^(!((!((!(([30,-1,474]^([14,17,155]^[-31,-6,-153]))|[-15,-15,108]))|(([-26,-11,421]&[-15,-3,-224])&[14,-3,458])))^[9,20,-404])))^(!((!((!(([14,-6,-464]^[-11,8,...

output:

47063.334852441477

result:

ok found '47063.3348524', expected '47063.3348524', error '0.0000000'

Test #6:

score: 0
Accepted
time: 1ms
memory: 3768kb

input:

767 957 738 941
((!(((!([3,-3,507]^[-30,-10,425]))^[-6,7,643])^((!((!([-11,0,450]^[21,17,-65]))&(!([17,0,64]^[-11,0,804]))))|[-31,10,-687])))&((!(([-34,12,-527]^(!([17,-14,-219]^(!([13,-27,-105]^(!([18,-47,-110]&(!([-9,-20,-455]^[-18,26,-228])))))))))^([-4,0,144]^[10,1,396])))^((!((!([35,0,-221]&[-5...

output:

36999.058655663222

result:

ok found '36999.0586557', expected '36999.0586557', error '0.0000000'

Test #7:

score: 0
Accepted
time: 226ms
memory: 16468kb

input:

-513 213 -733 114
(!((!((!((((!([2,16,-57]|[15,40,-272]))^((!(([0,26,315]|[5,-4,-336])^(!([-12,2,218]&([17,-16,-730]&[-7,3,-263])))))^[18,-7,29]))^[5,30,-126])^((!(((!((([8,9,406]^(!([-26,6,63]^[-38,-25,108])))^(([-9,20,220]^(!([-2,-27,213]^[29,16,-269])))|[-12,-4,-586]))^([30,0,-443]|(!((!([-17,0,3...

output:

295728.608103610679

result:

ok found '295728.6081036', expected '295728.6081036', error '0.0000000'

Test #8:

score: 0
Accepted
time: 5ms
memory: 4048kb

input:

-517 -379 -789 477
(((!((!(([1,-12,191]^(!(((!([32,0,89]^[-35,6,33]))^[-3,6,-293])^[20,-39,77])))^(([16,15,-285]^[15,-7,430])^([20,3,-95]|(!((!(([-15,-27,339]^[-11,-13,221])^[33,28,596]))|([-17,21,402]^[22,16,90])))))))&(!((!((!([12,-1,-279]^[-30,-13,224]))^[-29,24,-33]))^([31,-19,288]^(!((!([-1,26,...

output:

107150.604879697175

result:

ok found '107150.6048797', expected '107150.6048797', error '0.0000000'

Test #9:

score: 0
Accepted
time: 1ms
memory: 4160kb

input:

-477 275 -266 519
(!((!((!((!([-1,3,162]|[-32,16,269]))&(!(((((([-31,7,114]^([-12,7,-163]^[23,-10,159]))|(!(([0,-16,114]^[-33,15,-190])|(!([1,-22,308]^[-31,13,316])))))^((!([-12,29,-22]^(([23,15,-8]^[0,15,46])^[6,15,356])))^[22,13,-163]))^([18,17,487]^[28,23,143]))|(!(((!((!(([7,-45,-583]&([31,2,-22...

output:

335169.310517515866

result:

ok found '335169.3105175', expected '335169.3105175', error '0.0000000'

Test #10:

score: 0
Accepted
time: 1ms
memory: 3756kb

input:

175 624 -835 683
(!(((!(([-32,30,-478]^[23,4,-120])^[28,33,413]))|(!((!((!((!([-15,-5,0]^(!((!(((!([0,-32,90]^[-9,-22,-7]))^[-10,-35,344])|(!([1,11,-235]|[-31,-6,-344]))))^(!((!([-15,0,-90]|[-17,-10,-153]))^[-1,6,-8]))))))^(!([8,-6,302]^[-2,4,91]))))|([13,28,-70]^[16,-11,-74])))^(((((!((!((([-5,8,45...

output:

411470.358504943456

result:

ok found '411470.3585049', expected '411470.3585049', error '0.0000000'

Test #11:

score: 0
Accepted
time: 52ms
memory: 6576kb

input:

-1000 1000 -1000 1000
([1,0,-1000]^([0,1,-1000]^([1,0,-980]^([0,1,-980]^([1,0,-960]^([0,1,-960]^([1,0,-940]^([0,1,-940]^([1,0,-920]^([0,1,-920]^([1,0,-900]^([0,1,-900]^([1,0,-880]^([0,1,-880]^([1,0,-860]^([0,1,-860]^([1,0,-840]^([0,1,-840]^([1,0,-820]^([0,1,-820]^([1,0,-800]^([0,1,-800]^([1,0,-780]^...

output:

2000000.000000000000

result:

ok found '2000000.0000000', expected '2000000.0000000', error '0.0000000'

Test #12:

score: 0
Accepted
time: 59ms
memory: 6584kb

input:

-500 500 -500 500
([2,-3,-1000]^([2,3,-1000]^([2,-3,-980]^([2,3,-980]^([2,-3,-960]^([2,3,-960]^([2,-3,-940]^([2,3,-940]^([2,-3,-920]^([2,3,-920]^([2,-3,-900]^([2,3,-900]^([2,-3,-880]^([2,3,-880]^([2,-3,-860]^([2,3,-860]^([2,-3,-840]^([2,3,-840]^([2,-3,-820]^([2,3,-820]^([2,-3,-800]^([2,3,-800]^([2,-...

output:

540000.000000000001

result:

ok found '540000.0000000', expected '540000.0000000', error '0.0000000'

Test #13:

score: 0
Accepted
time: 13ms
memory: 7724kb

input:

-1000 1000 -1000 1000
([-57,281,0]^([478,81,0]^([-362,995,0]^([-339,614,0]^([491,769,0]^([673,486,0]^([-637,374,0]^([-204,383,0]^([-509,859,0]^([-973,757,0]^([-707,648,0]^([-792,409,0]^([-944,621,0]^([446,21,0]^([-553,473,0]^([795,704,0]^([-821,992,0]^([89,47,0]^([771,332,0]^([-845,259,0]^([271,867,...

output:

1823923.897152950195

result:

ok found '1823923.8971530', expected '1823923.8971530', error '0.0000000'

Test #14:

score: 0
Accepted
time: 1ms
memory: 3792kb

input:

-1000 1000 -1000 1000
(([-27,-20,-237]^((([31,17,247]^[-4,-23,-917])^(![8,21,-342]))^((([-17,2,-281]&[-26,-31,186])|[31,-21,-697])|[-18,8,-512])))&[-5,19,-104])

output:

420530.734540940512

result:

ok found '420530.7345409', expected '420530.7345409', error '0.0000000'

Test #15:

score: 0
Accepted
time: 115ms
memory: 11212kb

input:

-1000 1000 -1000 1000
((((!(((([31,17,247]^[-4,-23,-917])^(![8,21,-342]))^((([-17,2,-281]&[-26,-31,186])|[31,-21,-697])|[-18,8,-512]))^((!((!(!((([12,23,237]|[913,22,925])^[-14,11,-956])^[-9,-10,818])))|((([3,1,-213]^[-296,-13,171])&(!(!((!((!([-10,6,636]^[17,19,-546]))^([28,28,-698]|[-14,-4,-295]))...

output:

1479667.440785966165

result:

ok found '1479667.4407860', expected '1479667.4407860', error '0.0000000'

Test #16:

score: 0
Accepted
time: 299ms
memory: 17016kb

input:

-1000 1000 -1000 1000
(((((((((((([-15,-2,9]^[-168,-28,507])^[-31,-23,293])^[23,-1,-290])^(([26,-4,869]^(([24,2,522]^[-10,5,-918])^[-22,5,50]))^[16,-827,-276]))^(([-1,-24,-651]^([16,15,-332]^[-722,29,-330]))^([-19,-23,14]^[12,-18,289])))^(((([6,-29,803]^[8,-8,50])^((([9,-7,-112]^([23,-29,-827]^[-12,...

output:

1945479.957439870431

result:

ok found '1945479.9574399', expected '1945479.9574399', error '0.0000000'

Test #17:

score: 0
Accepted
time: 7ms
memory: 5496kb

input:

0 1000 0 1000
(((((((([85,-100,0]^[21,-100,0])^[55,-100,0])^([29,-100,0]^([47,-100,0]^([78,-100,0]^([13,-100,0]^([100,-11,0]^[86,-100,0]))))))^(([48,-100,0]^[35,-100,0])^((([39,-100,0]^[98,-100,0])^([9,-100,0]^[100,-14,0]))^[100,-79,0])))^([12,-100,0]^[100,-100,0]))^((([20,-100,0]^([100,-64,0]^([100...

output:

500000.000000000000

result:

ok found '500000.0000000', expected '500000.0000000', error '0.0000000'

Test #18:

score: 0
Accepted
time: 57ms
memory: 6912kb

input:

0 100 0 100
(((([-85,1,0]^((([-21,1,0]^([-55,1,0]^(([-29,1,0]^[-47,1,0])^([-78,1,0]^[-13,1,0]))))^(([11,1,-100]^[-86,1,0])^[-48,1,0]))^([-35,1,0]^((((([-39,1,0]^([-98,1,0]^[-9,1,0]))^((([14,1,-100]^[79,1,-100])^[-12,1,0])^[100,1,-100]))^((([-20,1,0]^[64,1,-100])^(([60,1,-100]^([-1,1,0]^[41,1,-100]))...

output:

4987.314854974314

result:

ok found '4987.3148550', expected '4987.3148550', error '0.0000000'

Test #19:

score: 0
Accepted
time: 134ms
memory: 10804kb

input:

-500 1000 -500 1000
((((((([2,-1,37]^[2,-1,1])^(([2,1,-55]^(([2,1,-29]^[2,1,-47])^[2,1,-78]))^([2,1,-13]^[0,1,-11])))^(((([2,1,-86]^([2,1,-48]^[2,-1,100]))^[2,-1,95])^[2,1,-98])^([2,1,-9]^([0,1,-14]^[0,1,-79]))))^([2,-1,88]^[0,1,-100]))^(([2,1,-20]^(([0,1,-64]^([2,-1,85]^[2,1,-1]))^(([2,-1,65]^([0,1...

output:

145000.000000000005

result:

ok found '145000.0000000', expected '145000.0000000', error '0.0000000'

Test #20:

score: 0
Accepted
time: 0ms
memory: 5832kb

input:

0 1000 0 1000
(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!...

output:

623640.000000000000

result:

ok found '623640.0000000', expected '623640.0000000', error '0.0000000'

Test #21:

score: 0
Accepted
time: 48ms
memory: 7340kb

input:

-300 300 -300 300
((([-199,200,0]&[299,-300,0])&([-1,-300,300]&[1,200,-200]))&([-1,-215,215]^((((([-1,-279,279]^[-1,-245,245])^(((((([-1,-271,271]^[-1,-253,253])^([-1,-222,222]^([-1,-287,287]^[289,-290,0])))^([-1,-214,214]^[-1,-252,252]))^(([-1,-265,265]^[-1,-261,261])^([-1,-202,202]^((([-1,-291,291...

output:

0.000001388917

result:

ok found '0.0000014', expected '0.0000014', error '0.0000000'

Test #22:

score: 0
Accepted
time: 1ms
memory: 3788kb

input:

0 1000 0 1000
(([-998,999,0]&[999,-1000,0])&[-1,-1,3])

output:

0.000001127254

result:

ok found '0.0000011', expected '0.0000011', error '0.0000000'

Extra Test:

score: 0
Extra Test Passed