QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#534146#2173. What's Our Vector, Victor?zhouhuanyiAC ✓398ms15868kbC++141.9kb2024-08-26 21:10:452024-08-26 21:10:45

Judging History

This is the latest submission verdict.

  • [2024-08-26 21:10:45]
  • Judged
  • Verdict: AC
  • Time: 398ms
  • Memory: 15868kb
  • [2024-08-26 21:10:45]
  • Submitted

answer

#include<iostream>
#include<cstdio>
#include<cmath>
#define N 502
using namespace std;
const long double eps=1e-7;
int read()
{
	char c=0;
	int sum=0;
	while (c<'0'||c>'9') c=getchar();
	while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
	return sum;
}
struct reads
{
	long double a,b;
};
int d,n,sn;
long double A[N+1],B[N+1],dA[N+1],dB[N+1],ans[N+1],X[N+1][N+1],delta[N+1][N+1],G[N+1][N+1],res[N+1],dis[N+1];
void gauss()
{
	long double d;
	for (int i=1;i<=sn;++i)
		for (int j=i+1;j<=sn;++j)
		{
			d=G[j][i]/G[i][i];
			for (int k=i;k<=sn+2;++k) G[j][k]-=G[i][k]*d;
		}
	for (int i=sn;i>=1;--i)
	{
		A[i]=G[i][sn+1],B[i]=G[i][sn+2];
		for (int j=i+1;j<=sn;++j) A[i]-=G[i][j]*A[j],B[i]-=G[i][j]*B[j];
		A[i]/=G[i][i],B[i]/=G[i][i];
	}
	return;
}
int main()
{
	long double tA=0,tB=0,tC=0,dst,rest;
	bool op=1;
	d=read(),n=read(),sn=min(n,d);
	for (int i=1;i<=n;++i)
	{
		for (int j=1;j<=d;++j) cin>>X[i][j];
		for (int j=1;j<=d;++j) res[i]+=X[i][j]*X[i][j];
		cin>>dis[i],dis[i]=dis[i]*dis[i]-res[i];
	}
	for (int i=1;i<=sn;++i)
		for (int j=1;j<=sn;++j)
			for (int k=1;k<=d;++k)
				delta[i][j]+=X[i][k]*X[j][k];
	for (int i=1;i<=sn;++i)
	{
		for (int j=1;j<=sn;++j) G[i][j]=delta[i][j];
		G[i][sn+1]=0.5,G[i][sn+2]=-dis[i]/2;
	}
	gauss();
	for (int i=1;i<=d;++i)
	{
		for (int j=1;j<=sn;++j) dA[i]+=A[j]*X[j][i],dB[i]+=B[j]*X[j][i];
		tA+=dA[i]*dA[i],tB+=2*dA[i]*dB[i],tC+=dB[i]*dB[i];
	}
	tB--,dst=(-tB-sqrt(tB*tB-4*tA*tC))/(2*tA);
	for (int i=1;i<=d;++i) ans[i]=dA[i]*dst+dB[i];
	for (int i=sn+1;i<=n;++i)
	{
		rest=0;
		for (int j=1;j<=d;++j) rest+=ans[j]*X[i][j];
		op&=(abs(rest-(dst-dis[i])/2)/max(rest,(long double)(1))<eps);
	}
	if (!op)
	{
		dst=(-tB+sqrt(tB*tB-4*tA*tC))/(2*tA);
		for (int i=1;i<=d;++i) ans[i]=dA[i]*dst+dB[i];
	}
	for (int i=1;i<=d;++i) printf("%0.6Lf ",ans[i]);
	puts("");
	return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 390ms
memory: 15868kb

input:

500 500
60.00268893933372283 70.35885554610950976 -8.98574176457012186 46.16014112676185732 66.31422279348288384 29.03050764912902082 -35.06996828144599476 -59.10319321730690234 67.85808505028276727 20.30232033048615392 62.38784996896146140 59.92659390534240060 -36.26787439344059294 30.8251981981496...

output:

20.276644 6.611226 20.496150 54.202626 -88.967690 92.953437 73.119617 12.383683 -48.714357 39.063451 49.509236 7.048772 0.372590 -36.280461 -95.848995 -68.078943 -6.487227 44.475894 -28.457728 18.831860 30.733092 12.408579 3.074566 -3.742915 -41.487346 -33.532048 -98.912568 -26.089219 -17.968202 49....

result:

ok accepted

Test #2:

score: 0
Accepted
time: 386ms
memory: 15620kb

input:

500 500
-20.46791708061053328 -78.90373004342441732 -47.09421721341704625 49.96697218958462372 48.99528416466444014 -46.87780686216100889 73.68284736943891744 -53.69249802982882613 -92.37158007019175443 -97.95346943385396798 -47.79109018973426259 82.31965483504592385 -72.09718577745493917 -32.376534...

output:

-2.236556 4.309288 -53.620360 -31.518524 -4.583771 -40.693423 -97.434824 -70.730627 33.850507 40.756936 -79.921132 28.289981 73.941638 98.393393 63.085137 14.080487 88.689457 -79.011977 -94.977138 -18.316925 -5.999319 -63.047115 -82.165047 4.803882 39.491523 -81.864630 -88.578277 96.910833 36.567706...

result:

ok accepted

Test #3:

score: 0
Accepted
time: 398ms
memory: 15860kb

input:

500 500
91.75754360584323877 -74.07465057030329092 -30.06919963013949371 -22.45376960826932589 -94.33818252302211249 95.43185666705545600 -35.93139380204742395 -46.28091101025437837 20.25588702053946122 -31.98355965847254367 96.27926708531694544 17.21195108047088240 -16.00480323252260462 -14.1553994...

output:

26.238904 -85.410279 32.912364 55.431160 95.609594 1.716249 47.212587 -9.661435 97.095812 88.482030 53.147940 47.970586 -45.775642 -37.662805 20.553182 -80.210083 -81.609206 81.831004 63.585904 -30.342209 -2.614514 69.501414 -42.306523 30.756310 35.071802 -46.992295 -86.762542 -8.448026 -45.081733 6...

result:

ok accepted

Test #4:

score: 0
Accepted
time: 392ms
memory: 15816kb

input:

500 500
53.59239375857157484 1.29576452891167548 -55.60357761919549802 2.89491049833583247 -72.25117082444128869 -44.92736039007480997 6.81675337705620166 -46.20517542139523925 20.56179110027964896 99.93596620202598046 -30.87710828002636276 60.42621397022924157 79.91458345844398536 94.56182305252031...

output:

28.360969 4.360563 40.806027 -78.278588 78.173597 82.169862 92.419992 -33.265084 -33.305506 -88.458669 62.935332 22.853066 -91.862197 75.296897 27.531693 -41.665495 18.165541 80.455138 25.768106 -12.778134 67.545607 -4.467014 22.354773 57.281600 19.300313 78.148402 -70.439761 32.833828 92.871881 -42...

result:

ok accepted

Test #5:

score: 0
Accepted
time: 383ms
memory: 15708kb

input:

500 500
-63.61543927507285190 43.87221058298641196 8.16924114047013461 -34.92232278546450175 91.80142804719758942 -76.82013016900501157 25.06001121373941487 48.24958448628115093 65.82846176112221315 33.19899446519090702 84.05389321600614494 -78.49637158041961982 87.99406312213668002 -60.859516869891...

output:

8.134857 -23.757280 -99.866784 78.596821 4.686765 -52.354958 -60.652581 45.108683 75.545161 -86.722210 46.029248 -47.954222 -96.315571 1.058144 63.371793 96.969246 99.731048 87.265359 4.438199 4.153335 77.959912 -84.932434 -31.316507 28.628955 37.732379 -1.335632 -49.792763 13.584584 -52.040695 -56....

result:

ok accepted

Test #6:

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

input:

24 114
19.60728784212125220 62.05571106800468328 -77.66722345143722350 83.32150488873739391 85.61849285200199233 -61.26186974500755866 54.01645372221616981 -19.69713224000579999 -10.16958551834513003 -18.69109461054532062 9.59051520125903778 91.21514401069063638 89.60632230190051928 -51.201061482129...

output:

8.327924 27.932654 97.448548 38.207239 85.804989 55.070135 -74.250153 86.457297 -48.880037 -27.280581 97.358297 4.232461 37.098004 -34.464352 -1.523639 -92.855376 -54.070803 -60.133603 -22.704205 45.517584 65.460633 66.091305 97.782307 -58.664804 

result:

ok accepted

Test #7:

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

input:

46 97
43.01678189681189224 87.56570778950447220 9.14039085211038582 26.33206129795307504 -24.34885933455943530 0.05861471454515765 -70.42820734313679054 59.02215026766580763 -79.72741868434044932 35.60017247547804686 25.77535585268205409 92.78420121683043931 50.59296099595243845 -61.7776387073462913...

output:

64.517294 -56.630659 59.529028 55.245520 -29.447260 87.758960 96.897819 75.662891 -36.870826 -61.233033 0.552811 -9.889132 29.953122 -41.158646 -49.737787 -30.590514 -66.743075 -7.513753 84.515676 55.348988 -92.895952 -84.333955 -7.936380 -95.554897 -88.310484 -30.219802 -12.224962 95.564449 85.2854...

result:

ok accepted

Test #8:

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

input:

15 284
21.00862660821213979 21.01836955459566525 -92.59898566394279840 72.83891547702586422 37.19660542291052252 58.75752575321905624 -58.77746253675046972 -75.78702662529354939 -51.08831966203057817 37.59103345051687484 78.06776201507187807 -47.64951581683278903 86.22301376779532234 87.983435491574...

output:

33.509675 75.442494 25.672060 -29.474750 86.909873 -24.142676 -91.911409 -79.698153 60.522349 -92.832407 -0.599784 17.592794 31.743537 35.913695 53.435798 

result:

ok accepted

Test #9:

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

input:

19 424
-16.81700811299913312 -99.00108212106096062 -91.34139981256581109 60.88738598253169698 96.60168904677493629 25.16047301803423863 39.17587188905130802 -88.89020758325538907 16.66405739466397051 14.19779632163533734 -12.13768283737013576 94.71465700089734696 -4.46422341014425683 99.590922359294...

output:

-4.635003 -62.570890 -96.332119 95.044782 -54.665628 83.476583 -88.330762 34.736204 -64.051056 -25.607523 46.197265 2.372630 -10.059198 -13.782827 22.203613 59.367909 97.251818 -57.762745 -81.963641 

result:

ok accepted

Test #10:

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

input:

39 240
-17.49573620249577743 -14.20168813856275847 3.40454276185926119 75.25294275126461230 3.64382503532986846 -66.13690704428722711 9.54219281803891306 4.33429550843416678 -93.68468592834675235 -17.02270905586702554 18.67022731122480650 63.43606748481644786 14.80457613629361902 -82.867111145937784...

output:

-88.197448 -18.160433 61.746127 -72.313775 -79.029839 92.291434 42.057515 11.756414 82.458544 -5.800327 -82.159552 70.777912 3.160694 -87.670017 77.549916 -33.806110 -31.922199 -7.741266 -6.062712 -25.270814 -0.867182 23.479581 48.643234 -62.690854 -64.366493 25.811552 -98.888466 64.260982 -77.25932...

result:

ok accepted

Test #11:

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

input:

94 37
-97.74217056704389961 -34.72707124177070170 -5.18996578341727854 89.27537859475728510 -15.17925192708750615 -58.80623411956585045 6.67768502706442746 9.27371520989450460 -0.76898730002019988 -12.16379417034083588 -97.04781848445374237 -4.61915628555445323 67.16463977789777573 -98.0799613713748...

output:

39.487853 -51.417004 10.508146 112.130210 142.177774 -25.785444 -14.085256 66.630076 -27.545983 -82.763196 13.547958 -22.580040 3.579169 -0.004146 28.674290 -27.426590 73.762043 -31.410080 14.723978 -79.549397 2.518947 -22.263221 43.693669 43.199768 -32.600341 -1.457766 -51.754506 -30.887458 108.965...

result:

ok accepted

Test #12:

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

input:

81 31
51.81180666086186193 4.42519101702015405 -99.52683614255568045 -78.73219118895721635 79.13631206663259832 -62.14210001674649675 77.01555907099057663 96.10429867603977527 -71.63979952372569926 31.92804200050832719 2.39923469427824898 -15.81312766092013078 -3.78675758288882491 -96.89700984284483...

output:

-19.081197 55.944884 -37.297666 1.928560 -55.418573 14.335727 -42.308720 -18.522232 56.890674 -19.056410 4.175914 -54.898624 75.459861 0.530099 44.359113 -72.615144 -16.224602 54.924413 -56.327237 -15.139942 10.369681 45.035172 25.934571 -7.148621 18.948680 -77.459627 11.142492 61.344749 111.763760 ...

result:

ok accepted

Test #13:

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

input:

368 15
22.30119005935810605 43.42786705247092982 -32.28926734891730632 -57.98761219344181939 -45.31478884634214666 53.04804763990063066 46.08811206966319673 -45.60493877541469487 -14.51504417311522843 85.52370945799654578 92.80145323913885136 94.08183990667501462 96.53825049915519685 -51.75960693925...

output:

10.767239 53.230031 68.544172 40.974532 -11.340345 -40.512526 14.032203 37.209200 3.106553 -0.023951 -23.180183 -74.884141 -87.800947 33.772511 67.040127 63.183535 28.528244 82.105345 -50.721055 -48.819686 -115.715961 -16.693788 -19.148062 -20.743057 0.583607 59.207424 -19.692779 -40.625025 68.71934...

result:

ok accepted

Test #14:

score: 0
Accepted
time: 12ms
memory: 6316kb

input:

417 40
44.68655184642963718 -99.57530073803870607 -14.93036383109003395 23.41593487735389090 29.30749689971099770 -12.17392273069064856 79.34058425615467058 -35.84876537980680666 72.50759393990819035 83.68078753407559134 -5.69786294576199737 -6.93653269724951826 87.39999249217245847 64.6174490928109...

output:

40.681627 27.207877 56.775705 30.786574 -23.843570 -16.155748 28.787355 22.190157 46.644921 -30.238961 59.206206 -12.098051 -22.437343 -27.887131 -21.736038 -57.633132 8.945433 -3.284726 0.043710 80.004908 79.564096 149.770313 -30.515468 18.972315 -38.826612 -20.463857 45.895629 -34.640249 -38.29739...

result:

ok accepted

Test #15:

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

input:

117 39
93.39662242328662956 49.47614796316665320 88.12818584496389462 -41.60092472064344804 -93.31577807190411988 40.70668323938937760 97.74228125485441865 16.47170421620938896 19.20357999198667187 6.73479762799897230 51.00910155069405505 -23.32922732808970068 12.15698653971175247 26.846191807017191...

output:

-31.861316 -5.183570 -84.157983 65.129217 61.674426 68.684927 -82.361920 39.824579 -115.665020 87.199220 27.583634 -110.119481 32.450348 -44.498794 -61.945092 -1.176959 -30.415706 -2.589805 4.020147 40.595265 33.402499 -39.552162 65.738306 -46.023266 7.766449 -14.264489 -36.743177 4.158513 -27.60610...

result:

ok accepted

Test #16:

score: 0
Accepted
time: 72ms
memory: 12456kb

input:

241 283
-19.74999113405426954 79.74118587123592761 -66.12366621234484398 23.16116059608839350 -90.51891922181988548 -16.33163848510163518 -55.57111970452539396 13.82071494892652197 0.16803096716331822 -90.49296540512135323 95.43035627948418664 39.25164085774440537 85.85545452213210638 86.25017616286...

output:

45.129941 -55.082365 4.818013 42.531819 -10.492005 17.478256 70.020972 -23.976482 -58.774758 43.265642 53.160338 -92.933321 59.338445 -85.742038 88.212434 -96.807452 44.091584 62.027441 -78.213964 -81.471665 -96.800956 -70.661459 -63.853985 68.217550 31.731127 -79.958964 -99.709239 67.854037 -25.803...

result:

ok accepted

Test #17:

score: 0
Accepted
time: 34ms
memory: 11960kb

input:

234 170
17.48242787918205465 -6.23520728156945836 -58.20418797754270201 72.96983900160395820 -57.35562673978773773 23.50789751949704964 -93.48884020852364074 -58.58187880824885241 -6.27698524763198407 30.85797535881991394 15.89004512612999065 47.23272911191250500 46.93072199569382974 28.367228113369...

output:

-33.250993 -4.131142 140.065902 -49.900355 -35.906299 -75.632396 -43.890605 72.526614 -29.147502 -37.348039 -105.306724 64.167853 -100.633033 -68.561463 -28.802843 -12.537636 90.518927 3.949934 10.996205 -93.642038 19.161522 -43.413480 32.638593 -15.094633 -54.841172 83.568635 -20.485502 -73.745273 ...

result:

ok accepted

Test #18:

score: 0
Accepted
time: 108ms
memory: 12040kb

input:

426 246
71.66651361980424895 -37.13107603142846358 -28.40069303830554759 -10.19303738189702813 -40.17751195221595140 80.86389914715766736 1.66282015418795481 26.86828575747655634 7.53315494638275140 5.60609191203955959 16.16504461034760709 19.69955383812136063 -60.18599916098141733 57.91579148537024...

output:

16.800276 -15.927796 -50.409781 -96.417316 14.114788 -105.024749 28.907115 -13.721654 58.280141 42.058547 -48.396892 -100.572919 108.455570 -49.774496 -24.326977 -84.299266 -31.477662 -14.944541 -127.555734 -43.908915 -53.641815 120.672111 -37.805920 10.807695 17.422347 -24.376043 57.855257 17.27142...

result:

ok accepted

Test #19:

score: 0
Accepted
time: 49ms
memory: 12240kb

input:

190 284
95.33837930303232611 -41.86466971541977955 34.60737779146913340 86.42312952325917763 -62.09721991997125912 52.95486745168355469 -60.47601569570841917 52.36070938755642601 78.02362095964224409 -40.03509120445565372 -83.80692034017873482 -22.71023924588195086 -96.86106094837492719 -40.94740162...

output:

64.133824 85.416033 52.968967 -47.513426 27.058411 44.711186 37.388885 -85.930586 74.399774 4.273763 4.614370 -81.227355 -30.587407 75.288024 51.573014 -37.445038 -90.906795 77.412075 -85.355483 -74.909575 -67.957476 66.320415 -84.345693 18.562571 25.072678 -16.607449 22.550668 83.618126 45.671923 -...

result:

ok accepted

Test #20:

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

input:

355 70
-56.70334470987275211 83.83574979083198286 -5.81321312184857675 -19.10716154891068186 16.13137087617899113 -92.96665311525518405 -24.53366679341564804 -37.69497211956019100 85.70887749812533229 -4.68107417305449758 73.65067115386159458 11.42163179112867510 -40.68482028628190506 99.62559275702...

output:

136.676325 -6.007878 -72.707903 7.006101 -97.849383 96.695067 12.327454 24.559320 -53.088882 30.830741 91.257382 -48.240707 40.009674 33.530192 37.968304 -75.102146 -18.923927 18.813058 -41.309398 -4.786964 19.762690 66.192172 13.828971 65.213842 5.476447 17.030880 -47.200304 46.128346 -7.828999 -51...

result:

ok accepted

Test #21:

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

input:

3 256
-78.12078435409665644 -85.08018381555004339 87.27205179005167679 223.75860580275852385
21.40601932440704047 9.30524175131506581 97.69241472114146063 183.70431698693087696
20.78669854557880114 -66.93205030620063667 -81.82893737964754166 71.55186936559947242
73.33954619520272900 -79.946056691508...

output:

88.223100 -57.545165 -59.831479 

result:

ok accepted

Test #22:

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

input:

5 62
65.67809116043918038 -6.95511245917114707 -65.58594103434151634 -24.98238854102574180 -67.64097332382888794 228.65240929183204344
-28.14639570969237070 81.15495829921940185 52.15853584132665333 -60.21000033537702478 17.11911053485283674 185.00177462895109670
97.86755108938794478 -40.32231891383...

output:

-32.568654 -43.891553 32.453979 51.135411 93.167781 

result:

ok accepted

Test #23:

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

input:

2 288
67.61542933343602613 47.25973109181069276 55.13980825108462369
-3.30426408588533604 -40.66692809464620240 167.60932009470940329
36.89409537586234933 30.54619728617115015 86.81691326794248198
-52.65998100097790768 -80.55976539875601361 229.44900096368024833
-36.19022124198538393 -30.51418398431...

output:

94.794119 95.235947 

result:

ok accepted

Test #24:

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

input:

2 285
-73.49177140120454510 -27.45921977176388395 71.97435646756392202
-11.36332241290563161 -67.41256152462275963 79.18940613722345745
-83.02790342763361764 -3.00818194921774307 95.64056891698483298
-76.94037376060684608 69.82459223195203890 168.62048209786297548
-22.19881633373093166 -56.253430626...

output:

-84.134625 -98.642347 

result:

ok accepted

Test #25:

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

input:

3 90
-80.47872995421107589 43.14208059911129567 57.43992229711068376 57.74639348045803899
-28.84828191978905920 86.94632424083388855 -50.35702772129035765 140.97797732099354562
91.43729149053109495 91.54935218332136060 -80.66735336723134253 227.76796873221641704
97.48224581178627091 28.6090833518682...

output:

-70.952021 -11.495005 41.356493 

result:

ok accepted

Test #26:

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

input:

189 1
58.20260994210622130 68.67758954964745044 -19.59536415957194322 -12.42121673471461918 3.64325992063163540 -30.46552521233776645 -46.87401011352478974 88.94910269066244268 53.50792334672570405 90.68612616445304297 -40.41474055830889256 -30.43526744898518643 72.26612568067025677 62.3780757071544...

output:

-25.983718 -30.660122 8.748068 5.545274 -1.626481 13.600895 20.926227 -39.710047 -23.887843 -40.485516 18.042580 13.587387 -32.262172 -27.847795 24.774187 -29.176885 43.192613 -0.521134 18.812903 15.240746 2.530341 16.791982 -32.924728 19.546530 -32.760157 19.843377 -37.432798 39.009762 29.535722 -3...

result:

ok accepted

Test #27:

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

input:

176 2
64.69868387712475055 -27.91921028014630224 -35.62410375680170205 46.95212302978166008 46.20202416344471885 11.91453444287495245 44.88399112031871141 33.90929126197823962 6.50449209474628276 -22.99563630094168332 66.75691023795118895 98.45710690993425374 11.03714286060825600 38.3844801382377056...

output:

14.896641 -24.855499 20.580856 1.092223 3.875607 29.751743 -11.581719 29.750288 21.576437 -29.894452 -60.880674 -45.820340 -36.975458 -15.206433 -33.712519 -68.460480 14.200064 48.948477 -14.215297 -11.904254 -17.905786 -0.136167 1.647260 -36.077026 -9.948315 -1.322213 21.491080 -46.841153 20.059723...

result:

ok accepted

Test #28:

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

input:

142 1
2.61917874832131758 -44.49335970449552491 -89.95075503127318939 12.71322648591490179 -52.43006486889640883 30.50437191800213554 34.55669292055185338 -99.07301933969634433 54.67370989914240909 82.56871783156776701 35.28440404839267330 23.24306531642055518 2.32687053783197939 96.1049017411075396...

output:

-1.059923 18.005464 36.401051 -5.144757 21.217270 -12.344434 -13.984318 40.092626 -22.125223 -33.413706 -14.278806 -9.405947 -0.941632 -38.891496 29.664132 35.211355 6.796719 -40.145246 35.088278 22.416224 -25.480156 -25.306779 -31.470804 23.681543 -14.068824 -33.486185 2.835815 -37.169149 -37.13303...

result:

ok accepted

Test #29:

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

input:

269 1
-18.11564699214282825 48.89329814876245450 10.25015011623035832 25.32240200911952854 75.51469006374665582 -76.79568060899211446 -19.63802183502471621 33.17947978970394729 -48.94987597943094215 -73.78919575498612460 70.21565201752056851 -39.47666698703496024 -21.62615675669682958 86.27099155645...

output:

5.910947 -15.953373 -3.344517 -8.262436 -24.639656 25.057630 6.407682 -10.826118 15.971834 24.076645 -22.910635 12.880825 7.056389 -28.149325 -26.286124 -16.122131 -5.734580 -22.663846 -10.713714 -23.585276 -18.024889 -27.623804 -20.854482 -9.391183 -14.918611 15.672033 6.414017 -4.775365 28.478952 ...

result:

ok accepted

Test #30:

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

input:

365 1
23.10990626783959101 -19.34586909615229899 -6.96875501077262527 0.34456297554396542 -68.98648584155537833 45.25601970715359812 68.60001376171371135 36.16207162122566388 -10.16330581679738998 -75.81533995340706156 -6.26078062613449049 -22.83426846904002616 -0.38841161702536908 -54.0019017863873...

output:

-10.916475 9.138449 3.291846 -0.162762 32.587292 -21.377682 -32.404734 -17.081954 4.800862 35.813053 2.957418 10.786272 0.183475 25.508993 -2.546106 24.669071 42.761656 12.767242 10.848927 -38.990254 -46.301588 0.682477 -24.876776 -27.913204 5.665590 7.051099 33.177234 -25.020985 -12.307018 -0.91616...

result:

ok accepted

Test #31:

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

input:

1 50
64.85923222597955373 142.33999735768676942
50.35893895506274021 127.83970408676995589
22.25990417897902773 99.74066931068624342
31.69844616118842850 109.17921129289564419
41.11605242885241296 118.59681756055962865
-14.53903472845199474 62.94173040325522095
7.16711415864197932 84.647879290349195...

output:

-77.480765 

result:

ok accepted

Test #32:

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

input:

1 35
-63.96499900778515979 92.42594280702650167
-97.65209571809808153 126.11303951733941631
-16.94036411896613004 45.40130791820746481
31.27236822709244279 2.81142442785110802
59.66364729851866855 31.20270349927733378
-13.91940073632100905 42.38034453556234382
84.38071434215464706 55.919770542913312...

output:

28.460944 

result:

ok accepted

Test #33:

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

input:

4 40
-78.88287946648640059 -16.62811043870746630 55.42580123616482979 -27.60828113441841936 42.27328257616783702
-4.44671157404496853 76.96604175426281813 -89.54380830984523243 41.72058886140729328 191.53589735859455345
72.64002654217250665 -9.32083710196556581 70.57806486032919224 13.08783991774646...

output:

-70.568456 -19.609882 59.428433 13.537663 

result:

ok accepted

Test #34:

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

input:

5 13
-30.20478063995581408 -21.92814177313326240 -42.44461805817634570 53.26364498645679646 -38.29485661681562192 178.49998050244400360
79.33616890572326952 -36.55946469637649443 70.66985014615084992 -35.10446941162146572 -27.84666177369450679 231.22874657286951106
-36.45626834700239272 -47.12700376...

output:

-64.032669 -44.481989 -78.799637 -83.618857 62.455996 

result:

ok accepted

Test #35:

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

input:

4 30
-52.27220939583720849 -21.57455471727385543 -92.94275176104298453 -2.08091573560969323 222.18345742802782183
31.93363561461731592 79.52292552785885960 20.52784410115411617 -75.35177279991810906 148.93820933276847995
90.67502095256182315 6.20398392101894558 -47.20102188425261147 -70.824847184737...

output:

81.767499 42.549299 62.679087 53.316016 

result:

ok accepted

Test #36:

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

input:

32 3
65.85785916178218713 6.85831609194293890 -15.30976888031534600 -75.30692283941316134 -65.15190131352440517 4.24801038535771625 -39.15741921390454650 -29.82560345081593312 53.72937478242073439 -11.81599701215840525 -4.05299000922640573 -11.25984288284671209 65.93865938982881403 -58.2166489679021...

output:

-14.719819 18.091703 -7.203703 37.003885 -41.243634 -48.261908 -11.749928 47.125663 -70.741307 56.113651 -10.725286 3.045121 -10.546179 27.821987 64.074628 6.664894 -3.926621 17.033877 -7.702109 -29.591608 35.632991 -1.886526 19.064095 34.283951 -8.785926 -14.974403 19.574993 11.539386 34.385245 -12...

result:

ok accepted

Test #37:

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

input:

38 2
-11.00959245879337800 -98.54947151225621838 87.90194151190249272 79.43936287611617786 -74.90189040412091970 -11.83750916384980201 17.01024400929949820 47.32337864655207227 -50.71076964359703965 88.34814581531549038 -57.48722708019155903 69.10969047227212059 -63.64323574333847944 46.273308018178...

output:

18.734718 40.824866 -33.087030 -45.879924 74.060973 49.960676 9.832170 -18.898536 19.023892 -18.050169 30.132307 -41.004403 -0.414268 -19.678238 47.002186 -59.826455 23.801248 -29.741818 -9.228424 -20.221105 -5.835550 42.710768 -28.124453 -77.947955 6.061972 -58.082404 -28.058967 -23.369878 0.737525...

result:

ok accepted

Test #38:

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

input:

13 3
72.24227664015296568 -18.55475164866786031 -43.11613144157464461 -19.60013839034118632 -49.91944199079070188 56.95177036488686895 36.13145534554163874 24.03291645605759186 -2.76856941433743486 6.55848694395515963 95.16901416342369657 88.75458089509112369 64.94847015738687901 255.715363806645768...

output:

-0.044710 -13.092306 80.878872 27.527193 13.840635 -3.962667 -5.677845 -30.220707 29.905019 -39.472067 34.132577 -7.358666 -53.044695 

result:

ok accepted

Test #39:

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

input:

7 3
50.23373989604388612 -69.88780252595731213 -57.22906978031703318 72.98567895437884090 -79.89238323261915298 95.92483451230395985 73.09642064722774535 325.02755887566917181
-43.98084472900853825 -62.70100814910448861 51.85828895150689277 27.97126637152686612 50.19393264295089807 -27.7406974710397...

output:

-63.086642 23.787167 42.311102 -48.726734 32.524642 -80.893999 -51.007409 

result:

ok accepted

Test #40:

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

input:

19 3
-95.01393013899175344 31.59516925395340081 -3.67075244178249704 -89.77833166653650210 -18.85584753567273708 -50.84872526166284246 -87.16802093411190810 -32.09059765388832375 61.26348422715224729 23.73763770129502859 -97.41812087078032789 31.23032882316439895 -76.51134982540250462 67.44597527526...

output:

7.757491 -31.869376 -24.280233 40.565952 8.420966 2.115076 8.553438 14.342598 -48.128497 9.924565 23.770293 27.495679 49.388114 10.347505 -21.712677 8.131773 17.588657 4.867934 -49.767758 

result:

ok accepted

Test #41:

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

input:

22 28
62.22846464524795351 5.52663569851108605 59.49083017069543189 -96.51619459249974398 14.39031059433443716 -72.01045224882811624 95.36731661679002059 62.99349464476318872 -65.24414346153614019 -97.86066379894597844 92.43138700007429520 -28.20042145250897647 76.61643639268277184 -57.8696335739639...

output:

-29.922342 -99.744779 60.939773 -50.333277 -0.852151 97.904191 -36.611607 28.170979 67.286374 -92.041856 -71.089406 -93.614294 -41.865660 35.205900 1.882781 -98.874173 -86.206678 -34.927153 -73.568641 -41.804774 -72.732155 -61.273077 

result:

ok accepted

Test #42:

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

input:

33 29
60.98557245693638151 -18.07931759228927149 47.71722790226277766 60.44200815872247290 15.78747444985293669 27.02244757659153152 -68.15148066296292484 -14.75753957216141998 -81.13645066198384370 69.20252380370021683 -84.97403737237749510 42.69315642512637510 -61.23527084314732605 -22.48730719942...

output:

-34.574802 8.539905 -82.548793 -46.031882 50.455737 -73.432443 51.644793 -58.432764 -17.653115 81.087173 6.048135 -158.609723 36.496460 47.536029 -66.577171 43.968229 22.475005 -105.827706 15.077268 54.711077 -54.237262 96.379111 -55.003987 -61.681739 66.493931 -33.600762 -65.044038 -25.467086 84.52...

result:

ok accepted

Test #43:

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

input:

24 14
-17.40138662805254910 55.03045505086637945 49.70539016308549662 15.26128344392927261 77.78369228783481049 75.64393879487477079 -92.13067565639920531 81.94847875525715608 -72.78803589017901743 -63.06606871805424674 49.23417172729224944 -78.33066588806227060 -55.64576453861675986 -94.46348476940...

output:

-59.075793 -63.142563 42.604892 44.245981 -10.371414 19.455612 33.987346 -39.631349 42.400629 16.221325 -11.685635 28.831777 -0.203849 45.820348 -24.520182 72.517801 19.013864 -32.220681 -28.466081 -57.868164 17.293158 45.709639 -30.521947 81.986147 

result:

ok accepted

Test #44:

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

input:

12 6
90.76755547853997541 40.86624230264283142 17.87869966661719445 98.08085221620558514 62.38376631439496123 42.38025343316073190 76.29870786465647825 -27.10931954515942266 80.08309062453179195 50.50807728486387305 96.60736437520210984 -75.85430013538719152 315.04833172222373605
82.1123285886446865...

output:

-31.412340 31.760161 82.929238 11.154116 -5.788329 -18.175650 2.679987 -23.392036 -68.949283 -24.388857 -57.120651 9.329532 

result:

ok accepted

Test #45:

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

input:

24 18
-87.49764639603955629 -47.74586257973560777 48.59043969065740498 -80.41410235408326912 28.89032206299071959 -47.13669365527315591 28.49575702908228436 73.78279256909192441 -13.32054095999075116 50.44405826937537540 -12.24037261107096697 -75.85092891984008645 85.28969143528902919 -68.7066743703...

output:

-58.585918 12.739421 -38.856157 51.689106 45.643249 -3.803592 73.304677 46.493243 -69.867514 18.934336 -8.568930 38.741548 47.207945 26.833041 83.977443 25.050591 -59.519449 -76.710013 -96.175492 91.342187 -9.050339 -50.353793 103.948424 -13.335431 

result:

ok accepted

Test #46:

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

input:

5 1
-98.92874737593162138 61.13121144302337484 -55.35187132540717414 31.04973951571832913 -12.86232323817209533 153.48461134875867629

output:

15.145827 -9.359087 8.474280 -4.753664 1.969200 

result:

ok accepted

Test #47:

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

input:

5 1
74.45601861721232240 -88.25221705818179885 -21.89425418617103958 51.81808193090810732 -65.37432640384588467 220.12839308526943682

output:

-39.268252 46.544394 11.547073 -27.328959 34.478549 

result:

ok accepted

Test #48:

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

input:

2 2
4.14909935574205235 -78.28709659608364291 49.35646372696943018
-45.22408328403919597 19.66777996170694109 106.04657364268864228

output:

39.613308 -43.959988 

result:

ok accepted

Test #49:

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

input:

3 3
78.43191720848898285 -62.52454077645417385 -29.56285570729887979 202.64545693825559169
-94.21198895074385860 -45.13275298277459058 39.17395136772466913 167.87300349011442790
-8.34170007575511363 1.09250804587503580 -60.95208781815404109 173.09105656783955851

output:

3.167807 80.907010 92.206948 

result:

ok accepted

Test #50:

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

input:

2 3
-39.02285862135088479 96.05974306394270457 192.78968611015349666
-92.31646382797036665 95.94080691707665665 202.03332590641781508
80.44236050212563782 -92.11837389867663717 111.53034736239179381

output:

-30.999393 -96.562912 

result:

ok accepted