QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#95753#115. Fenceseyiigjkn100 ✓15ms4196kbC++143.1kb2023-04-11 19:51:552023-04-11 19:51:57

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-11 19:51:57]
  • 评测
  • 测评结果:100
  • 用时:15ms
  • 内存:4196kb
  • [2023-04-11 19:51:55]
  • 提交

answer

# include <bits/stdc++.h>
using namespace std;
constexpr double INF=1e9;
int S,id[110][2];
double f[210][210];
struct Point
{
	double x,y;
	Point(){}
	Point(double x,double y):x(x),y(y){}
	Point operator+(const Point &t)const{return Point(x+t.x,y+t.y);}
	Point operator-(const Point &t)const{return Point(x-t.x,y-t.y);}
	Point operator*(const double &t)const{return Point(x*t,y*t);}
	double operator*(const Point &t)const{return x*t.x+y*t.y;}
	Point operator/(const double &t)const{return Point(x/t,y/t);}
	double operator^(const Point &t)const{return x*t.y-y*t.x;}
};
struct Seg
{
	Point A,B;
	Seg(){}
	Seg(const Point &A,const Point &B):A(A),B(B){}
}a[110];
inline double Abs(const Point &t){return sqrt(t.x*t.x+t.y*t.y);}
inline void chkmin(double &x,const double &y){x=min(x,y);}
inline bool contain(const Point &A,const Point &B,const Point &C)
{
	return C.x>=min(A.x,B.x) && C.x<=max(A.x,B.x) && C.y>=min(A.y,B.y) && C.y<=max(A.y,B.y);
}
inline Point geth(const Point &A,const Point &B,const Point &C)
{
	auto D=(B-A)/Abs(B-A);
	return A+D*((C-A)*D);
}
inline bool calc(Point A,Point B)
{
	if(A.x<B.x) swap(A,B);
	return A.x>=0 && B.x<0 && (A^B)>0;
}
bool chk(const Point &A,const Point &B)
{
	if((abs(A.x)<S && abs(A.y)<S) || (abs(B.x)<S && abs(B.y)<S)) return false;
	if(A.x-A.y!=B.x-B.y)
	{
		double a=A.x*B.y-B.x*A.y,b=(B.y-B.x)-(A.y-A.x);
		if(b<0) a=-a,b=-b;
		if(a>=b*max(min(A.x,B.x),min(A.y,B.y)) && a<=b*min(max(A.x,B.x),max(A.y,B.y)) && abs(a)<b*S) return false;
	}
	if(A.x+A.y!=B.x+B.y)
	{
		double a=A.x*B.y-B.x*A.y,b=(B.x+B.y)-(A.x+A.y);
		if(b<0) a=-a,b=-b;
		if(a>=b*max(min(A.x,B.x),-max(A.y,B.y)) && a<=b*min(max(A.x,B.x),-min(A.y,B.y)) && abs(a)<b*S) return false;
	}
	return true;
}
pair<double,double> Dis(int i,int j)
{
	double ans[2]={INF,INF};
	for(auto P:{a[i].A,a[i].B})
		for(auto Q:{a[j].A,a[j].B})
			if(chk(P,Q))
				chkmin(ans[calc(a[i].A,P)^calc(P,Q)^calc(Q,a[j].A)],Abs(P-Q));
	for(auto P:{a[i].A,a[i].B})
	{
		auto Q=geth(a[j].A,a[j].B,P);
		if(contain(a[j].A,a[j].B,Q) && chk(P,Q))
			chkmin(ans[calc(a[i].A,P)^calc(P,Q)^calc(Q,a[j].A)],Abs(P-Q));
	}
	for(auto P:{a[j].A,a[j].B})
	{
		auto Q=geth(a[i].A,a[i].B,P);
		if(contain(a[i].A,a[i].B,Q) && chk(P,Q))
			chkmin(ans[calc(a[i].A,Q)^calc(Q,P)^calc(P,a[j].A)],Abs(P-Q));
	}
	return {ans[0],ans[1]};
}
int main()
{
	int n,tot=0;
	double ans=INF;
	cin>>n>>S;
	for(int i=1;i<=n;i++) scanf("%lf%lf%lf%lf",&a[i].A.x,&a[i].A.y,&a[i].B.x,&a[i].B.y);
	for(int x:{S,-S})
		for(int y:{S,-S})
			a[++n]=Seg(Point(x,y),Point(x,y));
	for(int i=1;i<=n;i++) id[i][0]=++tot,id[i][1]=++tot;
	for(int i=1;i<=n;i++) f[id[i][0]][id[i][1]]=f[id[i][1]][id[i][0]]=INF;
	for(int i=1;i<=n;i++)
		for(int j=1;j<i;j++)
		{
			double dis[2];
			tie(dis[0],dis[1])=Dis(i,j);
			for(int k:{0,1})
			{
				f[id[i][k]][id[j][k]]=f[id[j][k]][id[i][k]]=dis[0];
				f[id[i][k]][id[j][k^1]]=f[id[j][k]][id[i][k^1]]=dis[1];
			}
		}
	for(int k=1;k<=tot;k++)
		for(int i=1;i<=tot;i++)
			for(int j=1;j<=tot;j++)
				chkmin(f[i][j],f[i][k]+f[k][j]);
	for(int i=1;i<=n;i++) chkmin(ans,f[id[i][0]][id[i][1]]);
	printf("%.4lf\n",ans);
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 18
Accepted

Test #1:

score: 18
Accepted
time: 0ms
memory: 3836kb

input:

1 20
-132 -148 7 -48

output:

160.0000

result:

ok found '160.00000', expected '160.00000', error '0.00000'

Test #2:

score: 0
Accepted
time: 2ms
memory: 3864kb

input:

1 40
40 81 118 181

output:

320.0000

result:

ok found '320.00000', expected '320.00000', error '0.00000'

Test #3:

score: 0
Accepted
time: 2ms
memory: 3580kb

input:

1 60
-189 -95 -114 -101

output:

480.0000

result:

ok found '480.00000', expected '480.00000', error '0.00000'

Test #4:

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

input:

1 80
-17 134 -3 128

output:

640.0000

result:

ok found '640.00000', expected '640.00000', error '0.00000'

Test #5:

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

input:

1 100
102 170 -78 186

output:

758.7768

result:

ok found '758.77680', expected '758.77677', error '0.00000'

Test #6:

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

input:

1 120
111 175 178 151

output:

960.0000

result:

ok found '960.00000', expected '960.00000', error '0.00000'

Test #7:

score: 0
Accepted
time: 2ms
memory: 3856kb

input:

1 140
-25 -149 146 -188

output:

1000.8158

result:

ok found '1000.81580', expected '1000.81577', error '0.00000'

Test #8:

score: 0
Accepted
time: 2ms
memory: 3612kb

input:

1 160
-169 -113 -193 -168

output:

1260.1946

result:

ok found '1260.19460', expected '1260.19456', error '0.00000'

Test #9:

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

input:

1 170
-35 195 6 188

output:

1322.2801

result:

ok found '1322.28010', expected '1322.28015', error '0.00000'

Test #10:

score: 0
Accepted
time: 2ms
memory: 3676kb

input:

1 180
-198 -34 -198 169

output:

1248.2004

result:

ok found '1248.20040', expected '1248.20043', error '0.00000'

Test #11:

score: 0
Accepted
time: 2ms
memory: 3580kb

input:

1 110
-136 64 -128 -130

output:

731.4613

result:

ok found '731.46130', expected '731.46132', error '0.00000'

Test #12:

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

input:

1 130
156 -132 172 -71

output:

1011.3482

result:

ok found '1011.34820', expected '1011.34817', error '0.00000'

Test #13:

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

input:

1 150
-193 -166 169 -185

output:

951.7755

result:

ok found '951.77550', expected '951.77547', error '0.00000'

Test #14:

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

input:

1 170
174 43 196 168

output:

1258.9907

result:

ok found '1258.99070', expected '1258.99066', error '0.00000'

Test #15:

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

input:

1 190
83 -192 -106 -199

output:

1331.4995

result:

ok found '1331.49950', expected '1331.49946', error '0.00000'

Test #16:

score: 0
Accepted
time: 2ms
memory: 3748kb

input:

1 150
-162 -155 198 -159

output:

913.5806

result:

ok found '913.58060', expected '913.58064', error '0.00000'

Test #17:

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

input:

1 160
199 192 -200 185

output:

1016.9595

result:

ok found '1016.95950', expected '1016.95954', error '0.00000'

Test #18:

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

input:

1 170
200 193 -200 195

output:

1067.9952

result:

ok found '1067.99520', expected '1067.99515', error '0.00000'

Test #19:

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

input:

1 100
157 -148 58 -126

output:

794.6169

result:

ok found '794.61690', expected '794.61689', error '0.00000'

Test #20:

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

input:

1 50
-72 81 169 103

output:

374.4200

result:

ok found '374.42000', expected '374.42000', error '0.00000'

Subtask #2:

score: 23
Accepted

Dependency #1:

100%
Accepted

Test #21:

score: 23
Accepted
time: 2ms
memory: 3632kb

input:

3 50
-142 -144 -154 -165
-177 52 -97 -1
153 102 24 86

output:

400.0000

result:

ok found '400.00000', expected '400.00000', error '0.00000'

Test #22:

score: 0
Accepted
time: 2ms
memory: 3632kb

input:

6 100
-167 -90 -117 -148
18 114 119 180
-119 93 -147 -96
153 170 155 -192
-134 -100 142 -117
178 138 180 97

output:

200.7031

result:

ok found '200.70310', expected '200.70307', error '0.00000'

Test #23:

score: 0
Accepted
time: 2ms
memory: 3808kb

input:

6 150
-42 -198 111 -196
-54 -157 -179 -174
185 -166 -188 -183
45 199 -74 189
186 -192 -26 -185
49 181 173 193

output:

790.1660

result:

ok found '790.16600', expected '790.16595', error '0.00000'

Test #24:

score: 0
Accepted
time: 2ms
memory: 3772kb

input:

6 149
183 -198 -46 -173
194 112 191 43
171 -77 184 -79
-153 -154 -181 49
75 171 147 152
-161 187 -158 28

output:

666.0134

result:

ok found '666.01340', expected '666.01341', error '0.00000'

Test #25:

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

input:

6 145
168 190 199 -88
-177 -146 -173 -13
-142 -198 57 -148
-148 -22 -162 186
-113 -179 -58 -147
-114 151 19 168

output:

449.6510

result:

ok found '449.65100', expected '449.65102', error '0.00000'

Test #26:

score: 0
Accepted
time: 2ms
memory: 3644kb

input:

6 134
-86 178 82 160
-199 -3 -169 -194
88 -185 -114 -168
143 -134 128 -155
52 -135 157 -178
-177 -114 -198 85

output:

577.6666

result:

ok found '577.66660', expected '577.66656', error '0.00000'

Test #27:

score: 0
Accepted
time: 2ms
memory: 3776kb

input:

6 121
111 -154 -94 -145
-165 -49 -200 -145
-156 -177 -180 -198
-133 195 -78 129
173 182 -6 137
173 -190 149 -42

output:

653.0941

result:

ok found '653.09410', expected '653.09414', error '0.00000'

Test #28:

score: 0
Accepted
time: 2ms
memory: 3596kb

input:

6 115
-118 73 -187 82
-10 140 -81 174
-74 -198 -24 -193
-131 -101 -86 -198
-125 -58 -167 10
111 -151 147 -97

output:

717.6152

result:

ok found '717.61520', expected '717.61523', error '0.00000'

Test #29:

score: 0
Accepted
time: 2ms
memory: 3772kb

input:

6 101
150 -14 105 -169
104 143 145 188
-166 -93 -199 148
-50 -134 -7 -200
194 -137 147 -145
132 -93 175 -21

output:

656.9653

result:

ok found '656.96530', expected '656.96533', error '0.00000'

Test #30:

score: 0
Accepted
time: 2ms
memory: 3776kb

input:

6 113
189 0 118 146
94 163 -67 176
-94 163 -186 29
-189 0 -118 -146
-94 -163 67 -176
94 -163 186 -29

output:

177.0646

result:

ok found '177.06460', expected '177.06458', error '0.00000'

Test #31:

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

input:

6 109
195 0 122 151
97 168 -69 182
-97 168 -192 30
-195 0 -122 -151
-97 -168 69 -182
97 -168 192 -30

output:

183.3740

result:

ok found '183.37400', expected '183.37402', error '0.00000'

Test #32:

score: 0
Accepted
time: 2ms
memory: 3600kb

input:

6 140
-183 -107 -182 148
159 -105 178 45
-171 147 49 153
193 70 111 182
182 -163 199 -48
-172 56 -133 -192

output:

436.5548

result:

ok found '436.55480', expected '436.55481', error '0.00000'

Test #33:

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

input:

6 131
181 190 -48 169
137 -171 189 125
-192 -87 -121 -192
-22 166 181 151
-147 151 -163 -56
-139 67 -125 200

output:

428.1397

result:

ok found '428.13970', expected '428.13974', error '0.00000'

Test #34:

score: 0
Accepted
time: 2ms
memory: 3608kb

input:

6 149
-99 -188 75 -155
-3 192 -180 178
155 189 187 -198
186 -19 161 167
-177 90 -194 -171
-151 167 -189 -185

output:

369.1587

result:

ok found '369.15870', expected '369.15867', error '0.00000'

Test #35:

score: 0
Accepted
time: 2ms
memory: 3648kb

input:

6 76
-184 41 -34 -150
163 -43 -55 -187
138 129 -154 185
-141 79 75 134
185 94 -45 99
-65 174 197 152

output:

218.4358

result:

ok found '218.43580', expected '218.43579', error '0.00000'

Test #36:

score: 0
Accepted
time: 2ms
memory: 3780kb

input:

6 98
-150 -132 198 -153
-101 -127 -151 124
-86 136 174 119
-92 193 164 122
-174 -162 -178 199
-151 -173 -161 168

output:

344.0948

result:

ok found '344.09480', expected '344.09478', error '0.00000'

Test #37:

score: 0
Accepted
time: 2ms
memory: 3640kb

input:

5 100
102 -127 -46 -164
-147 140 -102 196
177 93 73 115
200 -132 -74 -105
-150 187 -164 45

output:

607.0661

result:

ok found '607.06610', expected '607.06615', error '0.00000'

Test #38:

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

input:

2 100
179 9 84 -177
-105 -138 -150 -153

output:

719.9690

result:

ok found '719.96900', expected '719.96904', error '0.00000'

Test #39:

score: 0
Accepted
time: 2ms
memory: 3776kb

input:

5 50
-50 -165 167 -56
196 46 -17 -115
-61 -45 -150 -97
177 35 -98 84
-119 32 -168 5

output:

199.4866

result:

ok found '199.48660', expected '199.48662', error '0.00000'

Test #40:

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

input:

2 50
122 62 -37 171
-52 -57 -50 -126

output:

400.0000

result:

ok found '400.00000', expected '400.00000', error '0.00000'

Test #41:

score: 0
Accepted
time: 2ms
memory: 3620kb

input:

2 100
101 101 -101 101
-101 -101 -101 101

output:

402.0000

result:

ok found '402.00000', expected '402.00000', error '0.00000'

Test #42:

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

input:

3 96
0 -97 97 -97
0 97 97 97
97 -97 97 97

output:

384.0104

result:

ok found '384.01040', expected '384.01042', error '0.00000'

Test #43:

score: 0
Accepted
time: 2ms
memory: 3844kb

input:

4 96
97 97 -97 97
-97 -97 -97 97
-97 -97 97 -97
97 97 97 -97

output:

0.0000

result:

ok found '0.00000', expected '0.00000', error '-0.00000'

Subtask #3:

score: 49
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #44:

score: 49
Accepted
time: 9ms
memory: 3948kb

input:

100 10
-104 -49 -183 -123
-63 103 -60 31
83 172 100 -55
-79 -88 51 -45
17 60 -140 151
14 58 -91 -22
162 150 199 -174
-190 -2 -196 116
141 64 162 85
69 -192 141 86
19 62 16 69
-166 193 93 5
-191 -154 55 -190
-93 -154 35 -77
134 173 116 29
83 -1 93 -67
-145 -61 -124 25
162 -180 124 -124
-113 -189 146 ...

output:

19.7466

result:

ok found '19.74660', expected '19.74659', error '0.00000'

Test #45:

score: 0
Accepted
time: 4ms
memory: 4076kb

input:

100 50
68 180 -49 106
29 51 -9 63
-199 -81 -118 -133
47 -123 194 73
-134 96 -113 187
146 -174 -149 -71
125 75 50 149
85 -16 60 -5
193 -90 144 -151
196 -55 193 179
2 107 -146 0
-157 79 -200 129
150 34 15 117
-177 -37 -8 -96
147 31 73 -56
-46 176 -103 33
113 117 70 168
-39 -191 -82 -169
18 -182 78 -15...

output:

46.9879

result:

ok found '46.98790', expected '46.98792', error '0.00000'

Test #46:

score: 0
Accepted
time: 9ms
memory: 4120kb

input:

100 100
59 -147 193 -137
-177 -58 -135 -144
10 138 98 145
171 135 199 -168
155 181 35 193
-85 -186 94 -175
-106 137 -126 -37
120 -21 130 142
-122 -86 -108 117
128 -17 124 8
49 128 -95 157
-191 92 -186 -12
37 -112 95 -120
156 107 134 -22
-117 -134 167 -118
-84 180 -151 92
-108 -174 -128 -137
-179 9 -...

output:

48.7474

result:

ok found '48.74740', expected '48.74743', error '0.00000'

Test #47:

score: 0
Accepted
time: 10ms
memory: 4004kb

input:

100 150
169 -20 168 -28
111 184 -184 195
66 -166 182 -187
38 -193 -36 -164
-157 -43 -200 166
158 60 170 -178
49 199 183 190
-148 200 -173 198
199 -164 189 -20
-59 -167 -166 -193
198 162 179 79
-177 166 -153 -46
34 173 -79 181
186 -11 198 -184
183 -157 182 -135
-57 -156 -176 -190
-196 -192 -157 -63
1...

output:

54.8192

result:

ok found '54.81920', expected '54.81923', error '0.00000'

Test #48:

score: 0
Accepted
time: 6ms
memory: 4116kb

input:

100 10
2 65 196 172
46 29 125 55
-78 125 -200 29
-68 2 -74 4
-19 -82 -58 -109
7 -170 -66 -103
3 106 -171 -8
123 29 177 56
77 -96 -197 -50
51 60 133 79
52 140 -162 40
140 -140 -77 13
-34 -199 -168 -158
65 -74 167 -13
148 19 151 42
49 176 -167 96
-37 -191 -176 -120
176 176 -177 197
197 -69 191 -111
46...

output:

20.0453

result:

ok found '20.04530', expected '20.04527', error '0.00000'

Test #49:

score: 0
Accepted
time: 9ms
memory: 4116kb

input:

100 50
193 -146 185 91
-167 -6 -151 75
67 66 166 -78
50 -104 45 -109
-107 159 -158 -171
33 -137 -115 -165
-96 -118 -40 -57
-114 -31 -55 94
123 -138 0 -185
178 94 -108 96
107 -130 182 -80
-123 -99 -133 -74
-165 -193 85 -127
33 169 -153 195
-155 -159 4 -96
46 164 -172 163
81 41 -25 89
26 -194 -83 -190...

output:

29.5163

result:

ok found '29.51630', expected '29.51634', error '0.00000'

Test #50:

score: 0
Accepted
time: 6ms
memory: 4196kb

input:

100 100
-55 122 125 115
-58 104 -125 110
190 158 -175 192
106 -177 156 -13
-138 -178 -165 157
-93 -131 -26 -148
7 122 -77 141
-104 6 -156 180
-135 -192 -141 -126
186 100 124 -50
164 157 -168 190
-88 -163 170 -197
-113 -71 -114 -154
-173 -168 -195 106
194 59 170 5
104 -174 86 -162
112 32 105 -117
39 ...

output:

79.8048

result:

ok found '79.80480', expected '79.80478', error '0.00000'

Test #51:

score: 0
Accepted
time: 9ms
memory: 4076kb

input:

100 150
181 -90 164 144
-145 180 -157 124
-101 154 -19 191
-183 118 -195 1
137 190 -83 155
188 182 186 76
-178 -187 -168 11
168 -56 162 61
95 -162 192 -195
98 -153 -13 -198
182 -124 189 21
-28 -179 -31 -182
-153 187 -163 144
79 166 74 168
200 138 196 -197
-92 -180 -151 -176
-159 154 -184 -127
-73 18...

output:

97.0127

result:

ok found '97.01270', expected '97.01267', error '0.00000'

Test #52:

score: 0
Accepted
time: 9ms
memory: 4120kb

input:

100 97
92 -113 -32 -128
-165 -118 -42 -182
100 45 164 -122
138 102 183 112
92 130 -4 156
-1 180 -80 147
-136 -3 -124 136
190 -146 109 179
155 -194 -82 -139
174 -51 171 45
116 194 165 -43
200 74 165 97
-12 -119 59 -98
-93 -111 158 -191
-127 65 -101 -85
-178 133 -86 159
-131 72 -189 100
177 -119 109 2...

output:

71.9914

result:

ok found '71.99140', expected '71.99136', error '0.00000'

Test #53:

score: 0
Accepted
time: 6ms
memory: 3936kb

input:

100 103
-160 194 -56 176
-195 161 -113 26
-49 -121 39 -141
-165 -89 -198 -154
-102 129 -127 177
-37 -186 -189 -142
64 -167 -132 -103
-35 146 117 121
-148 101 180 118
153 54 188 -130
19 -198 -25 -177
170 125 -54 175
102 165 200 180
-148 -19 -147 -119
99 -107 165 -62
-109 115 -50 151
-68 199 89 185
48...

output:

44.3067

result:

ok found '44.30670', expected '44.30672', error '0.00000'

Test #54:

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

input:

100 98
13 158 -145 109
-170 144 -110 -160
-96 -122 127 -121
116 -98 -57 -103
-137 -190 -82 -157
56 186 120 156
-186 -6 -180 -175
172 97 134 -199
-200 81 -193 -7
-157 190 -36 165
-130 194 144 130
138 109 43 141
70 -175 -34 -146
28 -159 103 -156
181 -135 173 -26
-113 22 -117 84
-186 66 -182 -39
-3 149...

output:

32.5958

result:

ok found '32.59580', expected '32.59579', error '0.00000'

Test #55:

score: 0
Accepted
time: 9ms
memory: 4180kb

input:

100 105
141 103 -30 186
-136 -84 -128 147
161 71 124 -91
163 136 167 35
-63 -141 -189 -76
-187 155 -161 -16
-30 155 -143 191
163 103 173 -162
-29 -118 138 -196
114 -122 161 150
170 133 198 -120
-112 137 -125 19
50 119 -168 199
121 -189 -194 -143
-9 182 90 145
28 -113 114 -169
162 -175 151 3
14 173 1...

output:

29.8959

result:

ok found '29.89590', expected '29.89595', error '0.00000'

Test #56:

score: 0
Accepted
time: 9ms
memory: 3952kb

input:

100 113
-137 145 -174 -78
181 -115 -169 -198
159 168 -139 118
144 95 195 -73
-186 -181 -194 -31
143 80 125 -111
122 138 -83 121
-174 -118 -117 120
98 -125 -84 -151
-114 -200 138 -143
-176 138 11 187
198 -67 188 194
196 -131 18 -180
172 -90 149 61
-187 -198 -169 29
-175 -130 2 -121
-181 138 -185 -17
...

output:

18.9952

result:

ok found '18.99520', expected '18.99518', error '0.00000'

Test #57:

score: 0
Accepted
time: 9ms
memory: 3936kb

input:

100 96
-15 182 150 198
188 59 142 -97
-191 102 -114 -2
131 -144 131 21
149 -22 133 -159
-162 35 -96 -150
168 -131 173 -107
-103 -96 -148 12
148 69 136 184
39 113 0 181
119 13 137 81
168 -177 199 71
129 -75 69 -119
0 -112 31 -131
-173 -160 -158 -1
-7 100 -60 153
-18 143 -98 195
-181 -126 -200 -115
11...

output:

114.1892

result:

ok found '114.18920', expected '114.18918', error '0.00000'

Test #58:

score: 0
Accepted
time: 9ms
memory: 3904kb

input:

100 104
118 126 -72 183
-135 -133 48 -109
114 145 195 -120
135 -190 138 -130
134 -3 183 -125
108 59 118 -55
-77 -194 -29 -153
97 156 25 188
118 37 190 -108
-171 104 -123 -45
65 -155 -135 -139
-128 -116 -91 -110
167 161 125 124
-151 27 -138 -66
15 192 193 162
-175 192 13 147
117 48 117 113
-15 148 -1...

output:

57.4328

result:

ok found '57.43280', expected '57.43279', error '0.00000'

Test #59:

score: 0
Accepted
time: 9ms
memory: 3956kb

input:

100 100
-111 -48 -142 9
7 -119 -110 -185
-199 44 -171 -115
-15 148 -187 167
155 -17 119 34
-158 -70 -166 -2
-167 13 -131 129
101 93 124 166
170 156 189 -195
135 -193 138 -111
147 170 36 194
140 166 -57 180
-113 143 114 136
180 -124 158 -184
142 -58 171 -4
71 -154 132 -50
-108 90 -156 -19
-67 133 -16...

output:

44.0119

result:

ok found '44.01190', expected '44.01193', error '0.00000'

Test #60:

score: 0
Accepted
time: 6ms
memory: 4072kb

input:

100 110
-159 178 72 121
46 144 145 184
169 -152 151 36
57 -150 -84 -196
-64 -114 -187 -123
190 99 -195 164
10 -179 178 -188
84 192 -200 185
-139 -55 -174 68
-156 95 -119 -24
167 82 173 -176
181 -23 183 -180
-24 -152 -141 -182
180 56 182 -115
-183 -167 -70 -162
-194 -194 -176 94
-157 93 -119 -101
156...

output:

26.9039

result:

ok found '26.90390', expected '26.90387', error '0.00000'

Test #61:

score: 0
Accepted
time: 15ms
memory: 4080kb

input:

100 107
160 -187 -37 -130
179 163 37 197
122 28 168 -169
-174 56 -188 -99
-48 117 161 143
81 -178 -130 -131
-170 163 82 139
-155 -169 48 -189
109 -7 130 -163
-178 -94 -118 118
-123 3 -167 -162
108 58 146 -108
-56 163 88 178
174 -34 193 173
187 184 174 6
-192 198 29 198
-146 -188 79 -196
-147 -1 -185...

output:

20.1497

result:

ok found '20.14970', expected '20.14972', error '0.00000'

Test #62:

score: 0
Accepted
time: 2ms
memory: 3608kb

input:

10 100
-75 187 -192 154
-160 -70 -119 42
123 196 -26 194
-107 -81 -105 100
-32 188 -81 166
107 -71 91 -181
150 181 173 -57
101 186 162 -168
-141 6 -187 -11
-61 -152 -131 -64

output:

288.9375

result:

ok found '288.93750', expected '288.93749', error '0.00000'

Test #63:

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

input:

10 50
-24 -131 -44 -73
168 140 113 6
-133 1 108 -195
40 -138 195 119
-48 194 -150 4
-88 100 -40 194
-20 -186 13 -175
-165 -50 -89 -175
71 61 4 128
-108 61 -41 67

output:

165.6374

result:

ok found '165.63740', expected '165.63737', error '0.00000'

Test #64:

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

input:

97 95
-138 200 -126 100
-138 -101 -138 -199
-138 -200 -126 -100
-126 101 -126 199
-126 200 -114 100
-126 -101 -126 -199
-126 -200 -114 -100
-114 101 -114 199
-114 200 -102 100
-114 -101 -114 -199
-114 -200 -102 -100
-102 101 -102 199
-102 200 -90 100
-102 -101 -102 -199
-102 -200 -90 -100
-90 101 -9...

output:

15.0805

result:

ok found '15.08050', expected '15.08051', error '0.00000'

Test #65:

score: 0
Accepted
time: 8ms
memory: 3956kb

input:

100 96
185 0 184 9
184 11 183 21
183 23 182 32
181 34 179 44
179 46 176 55
175 57 172 66
172 68 168 77
167 78 162 87
162 89 157 97
156 99 150 107
149 108 143 116
142 117 136 125
134 126 127 133
126 134 119 141
117 142 110 148
108 149 100 155
99 156 90 161
89 162 80 166
78 167 69 171
68 172 58 175
57...

output:

177.5216

result:

ok found '177.52160', expected '177.52159', error '0.00000'

Test #66:

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

input:

97 122
191 0 190 10
190 12 189 22
189 24 187 35
187 36 185 47
184 48 181 59
181 60 177 70
176 72 172 81
171 83 166 92
165 94 160 103
159 105 153 113
152 115 145 123
144 124 137 132
136 133 128 141
127 142 119 149
117 150 109 156
107 157 98 163
97 164 88 169
86 170 76 174
75 175 65 179
63 180 53 183
...

output:

180.4527

result:

ok found '180.45270', expected '180.45272', error '0.00000'

Test #67:

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

input:

96 40
50 50 53 -53
53 -53 -56 -56
-56 -56 -59 59
-59 59 62 62
62 62 65 -65
65 -65 -68 -68
-68 -68 -71 71
-71 71 74 74
74 74 77 -77
77 -77 -80 -80
-80 -80 -83 83
-83 83 86 86
86 86 89 -89
89 -89 -92 -92
-92 -92 -95 95
-95 95 98 98
98 98 101 -101
101 -101 -104 -104
-104 -104 -107 107
-107 107 110 110
...

output:

0.0000

result:

ok found '0.00000', expected '0.00000', error '-0.00000'

Test #68:

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

input:

96 40
50 50 53 -53
53 -53 -56 -56
-56 -56 -59 59
-59 59 62 62
62 62 65 -65
65 -65 -68 -68
-68 -68 -71 71
-71 71 74 74
74 74 77 -77
77 -77 -80 -80
-80 -80 -83 83
-83 83 86 86
86 86 89 -89
89 -89 -92 -92
-92 -92 -95 95
-95 95 98 98
98 98 101 -101
101 -101 -104 -104
-104 -104 -107 107
-107 107 110 110
...

output:

1.4142

result:

ok found '1.41420', expected '1.41421', error '0.00001'

Test #69:

score: 0
Accepted
time: 4ms
memory: 4000kb

input:

100 50
51 0 200 0
-51 0 -200 0
0 51 0 200
0 -51 0 -200
51 51 200 200
51 -51 200 -200
-51 51 -200 200
-51 -51 -200 -200
50 76 160 174
157 184 100 145
178 -138 84 -63
-142 -87 -155 -92
184 -183 198 -153
132 -73 167 -37
-51 -17 -93 -30
79 135 33 110
-156 -147 -147 -105
194 121 114 82
-192 129 -97 82
-5...

output:

118.2115

result:

ok found '118.21150', expected '118.21148', error '0.00000'

Test #70:

score: 0
Accepted
time: 8ms
memory: 3984kb

input:

94 58
59 0 200 0
-59 0 -200 0
0 59 0 200
0 -59 0 -200
59 59 200 200
59 -59 200 -200
-59 59 -200 200
-59 -59 -200 -200
179 116 171 133
-155 -81 -193 -143
82 -75 200 -184
-62 -107 -57 -189
171 190 49 113
113 -186 181 -193
178 30 65 42
147 152 74 117
-69 164 -2 94
0 92 -38 169
-124 18 -89 57
-189 -173 ...

output:

202.4829

result:

ok found '202.48290', expected '202.48292', error '0.00000'

Test #71:

score: 0
Accepted
time: 9ms
memory: 4156kb

input:

98 40
41 0 200 0
-41 0 -200 0
0 41 0 200
0 -41 0 -200
41 41 200 200
41 -41 200 -200
-41 41 -200 200
-41 -41 -200 -200
108 -53 108 -96
-162 29 -145 75
-170 -118 -150 -143
-126 169 -142 180
-96 -161 -162 -200
100 -147 42 -189
-75 -180 -90 -148
56 104 36 69
97 160 39 129
-97 130 -154 164
173 88 98 56
-...

output:

245.9769

result:

ok found '245.97690', expected '245.97693', error '0.00000'

Test #72:

score: 0
Accepted
time: 9ms
memory: 4188kb

input:

100 100
101 0 200 0
-101 0 -200 0
0 101 0 200
0 -101 0 -200
101 101 200 200
101 -101 200 -200
-101 101 -200 200
-101 -101 -200 -200
79 165 80 165
135 176 128 173
164 123 172 127
-173 12 -182 11
32 144 31 148
9 200 11 197
71 -119 72 -121
159 5 160 11
-58 -172 -52 -180
20 130 11 130
-159 -127 -167 -12...

output:

780.6891

result:

ok found '780.68910', expected '780.68910', error '0.00000'

Extra Test:

score: 0
Extra Test Passed