QOJ.ac
QOJ
The 2nd Universal Cup Finals is coming! Check out our event page, schedule, and competition rules!
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#151556 | #2444. Closest Pair of Segments | hui | AC ✓ | 4756ms | 18012kb | C++20 | 3.3kb | 2023-08-26 23:21:26 | 2024-10-07 15:39:30 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 4756ms
memory: 8544kb
input:
200 2 0 1 1 2 1 1 2 0 2 0 1 1 2 2 2 3 1 2 -1000000000 1000000000 1000000000 -999999999 -1000000000 -1000000000 -999999999 999999999 2 -1000000000 -999999999 -999999998 -1000000000 999999998 1000000000 1000000000 999999999 976 762204047 -845100676 793583283 -898570853 51751856 -31503230 55236959 -296...
output:
0.70710678008430516428 1.00000000006995537483 0.00000000027105054312 2828427121.27603626251220703125 34.98571135920892061222 1.01954631288045738380 50.15974481256679951002 24.59294383590216170887 12.52996408452472465456 10.80310608764928304026 30.41381265757314622533 13.94749637399078778799 27.58622...
result:
ok 200 numbers
Test #2:
score: 0
Accepted
time: 1ms
memory: 7836kb
input:
2 2 0 1 1 2 1 1 2 0 2 0 1 1 2 2 2 3 1
output:
0.70710678008430516428 1.00000000006995537483
result:
ok 2 numbers
Test #3:
score: 0
Accepted
time: 1283ms
memory: 8872kb
input:
100 2 0 1 1 2 1 1 2 0 2 0 1 1 2 2 2 3 1 2 -1000000000 1000000000 1000000000 -999999999 -1000000000 -1000000000 -999999999 999999999 2 -1000000000 -999999999 -999999998 -1000000000 999999998 1000000000 1000000000 999999999 94 -784907362 105272290 -911718556 -49359734 -464003871 -251365241 -402807888 ...
output:
0.70710678008430516428 1.00000000006995537483 0.00000000027105054312 2828427121.27603626251220703125 42.23287419433118827783 83.38465088547630443827 66.70832030861161854318 19.40856608241558944883 65.19202405338985784056 59.99999998576588211563 114.12712209307730404362 13.06868280693401729309 92.195...
result:
ok 100 numbers
Test #4:
score: 0
Accepted
time: 1370ms
memory: 8620kb
input:
100 2 0 1 1 2 1 1 2 0 2 0 1 1 2 2 2 3 1 2 -1000000000 1000000000 1000000000 -999999999 -1000000000 -1000000000 -999999999 999999999 2 -1000000000 -999999999 -999999998 -1000000000 999999998 1000000000 1000000000 999999999 97 527364455 -449811116 522687656 -399388686 929791244 -786838165 928261167 -7...
output:
0.70710678008430516428 1.00000000006995537483 0.00000000027105054312 2828427121.27603626251220703125 158.60787551391644001342 144.13882191977035063246 39.33847596629402687540 67.14297203294638904936 85.44003744087592622236 27.00000000487035123342 70.00714247890061869839 54.23098746112908941086 76.27...
result:
ok 100 numbers
Test #5:
score: 0
Accepted
time: 2044ms
memory: 11580kb
input:
3 20000 378914883 -86049300 377860724 -88431648 320203589 740131071 319864698 739728449 -50468358 -514751905 -50307447 -514627852 197677720 -399908707 196282934 -400020772 388884883 -614017098 390214113 -615004209 -935297820 337643411 -941345480 329738594 288237677 -473248777 291297399 -475112335 21...
output:
77.66329818831297870929 415.91465479995372334088 478.26770752101845118887
result:
ok 3 numbers
Test #6:
score: 0
Accepted
time: 1890ms
memory: 11580kb
input:
3 20000 -56110240 320049747 -56331432 319583713 492854585 -334405509 491439191 -333851013 -147610530 272720181 -148609607 273421463 818413533 208467228 817685372 210801075 -248070185 -50755437 -247766642 -51613072 436710677 14325547 436295833 8861320 -336916878 501228152 -335957338 500863094 5949237...
output:
14965.23859056963920011185 41904.99632628075778484344 41048.82000532938400283456
result:
ok 3 numbers
Test #7:
score: 0
Accepted
time: 1697ms
memory: 11892kb
input:
3 20000 822431210 -682438568 823062665 -684220411 -112472570 -235013410 -114172082 -233040963 -435944435 -142777795 -444099447 -147417032 -389003785 256679625 -389583410 257794296 203889916 169131286 206083423 165837458 242297350 88953639 236042750 96899573 604141062 -370737835 603774274 -370271856 ...
output:
24693.65784740773233352229 24699.76602803569403477013 23533.12640757110057165846
result:
ok 3 numbers
Test #8:
score: 0
Accepted
time: 2122ms
memory: 13236kb
input:
1 100000 -498468914 434347942 -498299396 433491164 553071910 -630721726 551920199 -633649653 -290129028 -512322043 -288944828 -511895805 -116881283 -57641097 -117149530 -55472349 406684359 -99855717 406769315 -100013525 606184484 -51115043 603558954 -51901064 604278626 -22954305 604970382 -22166726 ...
output:
18.86796227069942233356
result:
ok found '18.8679623', expected '18.8679623', error '0.0000000'
Test #9:
score: 0
Accepted
time: 2770ms
memory: 13324kb
input:
1 100000 244655687 902003929 242182612 895149553 -359743789 -498648276 -367192781 -506193938 220781220 -745178500 213913918 -749844446 86040003 -210817961 81359988 -215260918 8263253 124946294 8753877 123659668 -217490681 -755096591 -215186617 -753863712 339009546 262090907 334630842 254720993 -2398...
output:
59.15426268612856119944
result:
ok found '59.1542627', expected '59.1542627', error '0.0000000'
Test #10:
score: 0
Accepted
time: 1159ms
memory: 13280kb
input:
1 100000 99990624 -1369691 99990619 -1369691 18694926 98236957 18694927 98236961 92310828 -38454024 92310823 -38454022 44258923 89672452 44258921 89672447 45494196 -89052108 45494198 -89052113 99227926 12402406 99227921 12402406 -46091861 -88744240 -46091863 -88744245 -61206270 79080923 -61206273 79...
output:
998.24646243584788862790
result:
ok found '998.2464624', expected '998.2464626', error '0.0000000'
Test #11:
score: 0
Accepted
time: 996ms
memory: 13376kb
input:
1 100000 -374985637 -621530497 -374985638 -621530498 -154964058 208849687 -154964059 208849688 -976457805 346927012 -976457805 346927011 574004801 -336615979 574004800 -336615979 833702938 611324998 833702937 611324999 459201095 -880970046 459201094 -880970047 -739947475 291609456 -739947474 2916094...
output:
12129.58053553592253592797
result:
ok found '12129.5805355', expected '12129.5805369', error '0.0000000'
Test #12:
score: 0
Accepted
time: 842ms
memory: 13380kb
input:
1 100000 -449585604 -900000000 -449585456 900000544 226313066 -899999066 226313565 899999565 481734000 -899999685 481734706 900000000 567216620 -900000000 567216000 899999028 461808609 -900000000 461807018 900000000 -207395749 -900000000 -207395497 900000000 453005912 -900000000 453006000 899999219 ...
output:
16009.00002340921491850168
result:
ok found '16009.0000234', expected '16009.0000265', error '0.0000000'
Test #13:
score: 0
Accepted
time: 4110ms
memory: 17920kb
input:
1 100000 -899999128 117990872 899999657 117989657 -899999139 598589139 899999890 598590110 -899999489 -641771489 900000280 -641771720 900000000 -122111129 -900000000 -122111270 -900000000 578520893 900000444 578519556 900000000 490625475 -900000522 490626000 -899999266 -320183266 900000043 -32018404...
output:
16004.99999643289993400685
result:
ok found '16004.9999964', expected '16005.0000007', error '0.0000000'
Test #14:
score: 0
Accepted
time: 1975ms
memory: 13308kb
input:
1 100000 628394029 637494241 627874763 639486115 -764110631 355113269 -767155937 360542111 -458229899 -569509380 -457826723 -568526494 -619604886 -97129379 -622262081 -94298646 379744806 530492999 381793398 529279642 308020579 -749465217 307968141 -749426026 -905390782 -92840235 -906535399 -95462218...
output:
18361.35081312307011103258
result:
ok found '18361.3508131', expected '18361.3508044', error '0.0000000'
Test #15:
score: 0
Accepted
time: 1634ms
memory: 13260kb
input:
1 100000 -654352253 -82918491 -652590759 -82118878 780460336 408123973 778278527 406985359 -649242307 369823406 -647575816 367180897 422169029 270170335 422086204 269505534 -575562573 580653407 -575566519 581853735 -609469659 -699333538 -610896148 -700612565 -323288414 87233635 -323515643 87773612 -...
output:
10049.36212023466214304790
result:
ok found '10049.3621202', expected '10049.3621225', error '0.0000000'
Test #16:
score: 0
Accepted
time: 2245ms
memory: 13232kb
input:
1 100000 -641003454 969484792 -646409960 970290794 699630553 -696083736 701035053 -696270356 386752032 -316775493 389387799 -320177556 -597157285 164338013 -597074856 164404355 -397908648 599044531 -397844864 598940755 -645872916 45325850 -645830881 43931006 369953234 -30059319 370479845 -29682322 -...
output:
5384.55467102849615912419
result:
ok found '5384.5546710', expected '5384.5546720', error '0.0000000'
Test #17:
score: 0
Accepted
time: 2064ms
memory: 13184kb
input:
1 100000 -133617409 216798863 -133270452 217933708 -340815754 -139609658 -340616844 -142005926 -486499755 338615736 -485966990 338968910 466009737 -691040834 463693936 -690763584 337997281 32140610 338113476 32773124 558218231 -416263950 559645883 -416867543 -542170828 -710593828 -543585757 -7107014...
output:
10834.86775410591508261859
result:
ok found '10834.8677541', expected '10834.8677571', error '0.0000000'
Test #18:
score: 0
Accepted
time: 1577ms
memory: 13216kb
input:
1 100000 -19720950 682521858 -20464192 682295749 710441478 -304079043 707958828 -301505435 668522634 257957064 669226249 255945326 -463555051 -222218208 -464248659 -222241897 -266822786 768095782 -267670802 767289522 -916964217 316202666 -913584706 320002429 388563595 -105231929 388462889 -105772521...
output:
6029.50256167744737467729
result:
ok found '6029.5025617', expected '6029.5025626', error '0.0000000'
Test #19:
score: 0
Accepted
time: 1672ms
memory: 13372kb
input:
1 100000 364813964 -267895084 364663940 -268050493 -232491125 666235054 -230327577 667514014 576513763 -117182583 575798700 -118116108 120573679 -352779404 120651404 -352855470 429770334 -667297784 429386388 -667226750 672999808 -698317087 672646357 -697414175 20983040 -305539531 21413466 -305123578...
output:
10694.08915643777072546072
result:
ok found '10694.0891564', expected '10694.0891546', error '0.0000000'
Test #20:
score: 0
Accepted
time: 2144ms
memory: 13296kb
input:
1 100000 -132396955 -237276419 -133533129 -238129333 553333437 -84067860 553074614 -84380542 -317073782 853641744 -311672333 853764030 -712800641 19202185 -714106493 18431621 293033993 -527716859 289710834 -528214373 649601097 70828067 649315615 71734080 453867463 305976659 455250140 307056021 -8148...
output:
8787.04577766953298123553
result:
ok found '8787.0457777', expected '8787.0457792', error '0.0000000'
Test #21:
score: 0
Accepted
time: 850ms
memory: 13320kb
input:
1 100000 -197351015 899999015 -197352285 -900000285 769572037 -900000037 769571982 900000000 709398031 900000000 709397931 -900000069 709073405 -900000595 709074782 900000000 -329723432 900000000 -329724662 -900000000 -390149931 -899999931 -390150000 900000777 -872820413 899999587 -872820238 -899999...
output:
16006.00044948663344257511
result:
ok found '16006.0004495', expected '16006.0004536', error '0.0000000'
Test #22:
score: 0
Accepted
time: 832ms
memory: 13304kb
input:
1 100000 109386415 -900000415 109385971 899999971 192348941 -899999059 192348000 900000067 -261486577 -899999423 -261485097 900000903 192564000 899999524 192563141 -900000000 751032880 900000880 751031099 -899999099 -271403532 -899999532 -271404588 899999412 544752578 900000578 544751256 -899999256 ...
output:
16005.00125764625772717409
result:
ok found '16005.0012576', expected '16005.0012602', error '0.0000000'
Test #23:
score: 0
Accepted
time: 1291ms
memory: 8524kb
input:
100 2 0 1 1 2 1 1 2 0 2 0 1 1 2 2 2 3 1 2 -1000000000 1000000000 1000000000 -999999999 -1000000000 -1000000000 -999999999 999999999 2 -1000000000 -999999999 -999999998 -1000000000 999999998 1000000000 1000000000 999999999 91 -708414995 -55279885 -680666090 70348923 218962804 -207841230 157152509 -22...
output:
0.70710678008430516428 1.00000000006995537483 0.00000000027105054312 2828427121.27603626251220703125 109.50123304626080766866 72.67048917486417280998 69.87131030006256082743 192.37983268916013912531 41.04875149860131955393 60.41522985014702840090 116.63745910078793599496 112.39638181975709585458 114...
result:
ok 100 numbers
Test #24:
score: 0
Accepted
time: 1206ms
memory: 8528kb
input:
100 2 0 1 1 2 1 1 2 0 2 0 1 1 2 2 2 3 1 2 -1000000000 1000000000 1000000000 -999999999 -1000000000 -1000000000 -999999999 999999999 2 -1000000000 -999999999 -999999998 -1000000000 999999998 1000000000 1000000000 999999999 98 17192113 441711444 26219992 432918273 -163367925 617577264 -172395808 62637...
output:
0.70710678008430516428 1.00000000006995537483 0.00000000027105054312 2828427121.27603626251220703125 53.08483775820494088293 26.38380811569030015562 26.90620369734386940763 157.54681843838102395239 119.21828722144533685423 38.94868419104801660069 84.48076706940588564976 39.54201877390262609424 19.60...
result:
ok 100 numbers
Test #25:
score: 0
Accepted
time: 4350ms
memory: 15628kb
input:
1 100000 -39053963 -321000277 735554864 -321000277 -114617508 858909636 -688421678 858909636 -291585020 694104623 967435933 694104623 -461925773 158176885 -759929530 158176885 -106267594 156607353 -567559290 156607353 484488671 -384308183 452461136 -384308183 885690440 583218631 37449132 583218631 6...
output:
0.99999999898575309132
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #26:
score: 0
Accepted
time: 4571ms
memory: 15708kb
input:
1 100000 -477393799 -142745263 -199882249 -142745263 193888362 -110934870 155155963 -110934870 -326292634 16598403 820996648 16598403 -793024297 278807731 77809429 278807731 -481383167 -343520031 164777051 -343520031 98703472 141131484 -373529843 141131484 899080599 -294620328 848062866 -294620328 5...
output:
0.99999999898575309132
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #27:
score: 0
Accepted
time: 1065ms
memory: 13312kb
input:
1 100000 -273112923 -842794554 -273112923 684421296 -651823113 -999702708 -651823113 -118206312 -835346838 -855930104 -835346838 -501015947 -848596934 54797875 -848596934 -112252907 527698262 -135654697 527698262 -678607248 362429447 -826154992 362429447 -389332973 -984111914 912620509 -984111914 -6...
output:
0.99999999898575309132
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #28:
score: 0
Accepted
time: 1047ms
memory: 13168kb
input:
1 100000 366516283 629693529 366516283 413814987 -919339641 -259888739 -919339641 -229054985 560572103 675838884 560572103 572051235 390430496 341598308 390430496 202630573 -734650228 915110458 -734650228 -979829707 -618291107 -698676528 -618291107 -516346168 24953408 -178998610 24953408 644943331 4...
output:
0.99999999898575309132
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #29:
score: 0
Accepted
time: 2515ms
memory: 13332kb
input:
1 100000 -951702 -834246 -947553 -834246 -392539 236728 -391130 236728 -777748 859382 -777934 859382 -812517 745082 -815031 745082 -964887 -483282 -950346 -483282 -705653 -938180 -705426 -938180 -327619 70106 -320680 70106 38439 -460200 33187 -460200 -650963 236728 -653983 236728 -501180 402629 -503...
output:
1.00000000006995537483
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #30:
score: 0
Accepted
time: 2576ms
memory: 13316kb
input:
1 100000 -716374 -707001702 -713970 -707001702 149600 -922098058 151136 -922098058 -891731 96589334 -892969 96589334 687533 963988313 685171 963988313 -357155 692313282 -355886 692313282 -409146 981191566 -412782 981191566 16345 -245397999 10035 -245397999 -146595 -295031457 -146135 -295031457 -9854...
output:
1.00000000006995537483
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #31:
score: 0
Accepted
time: 3015ms
memory: 13336kb
input:
1 100000 -7416755 -423092638 -7684996 -423092638 932307933 -450818040 931133462 -450818040 720816756 407695385 724622509 407695385 965180713 -46104323 961711928 -46104323 668104471 169582813 669983216 169582813 698717708 394768026 693343290 394768026 -826708168 -624632656 -830685414 -624632656 67892...
output:
9.00000000306905434400
result:
ok found '9.0000000', expected '9.0000000', error '0.0000000'
Test #32:
score: 0
Accepted
time: 2385ms
memory: 13436kb
input:
1 100000 423556 325833 423556 329565 923242 -431491 923242 -426877 -118664 -770012 -118664 -778054 724643 174010 724643 156460 -281162 590818 -281162 588025 926531 -777097 926531 -779557 822049 -713642 822049 -721346 -501327 935091 -501327 924261 386448 641763 386448 645620 380398 -810373 380398 -80...
output:
0.99999999898575309132
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #33:
score: 0
Accepted
time: 2241ms
memory: 13268kb
input:
1 100000 -782885 -677402694 -782885 -657288036 -241619 -407432066 -241619 -410286447 586334 -155833171 586334 -155100246 -641055 -487192069 -641055 -484157770 92589 56433844 92589 66073940 243829 -750806074 243829 -746211126 -110213 984618197 -110213 991872471 1113 -46667002 1113 -48472631 193351 -4...
output:
2.99999999993881516502
result:
ok found '3.0000000', expected '3.0000000', error '0.0000000'
Test #34:
score: 0
Accepted
time: 2449ms
memory: 13332kb
input:
1 100000 28389992 -227241550 28389992 -205948593 247308834 855209830 247308834 868280638 -684760996 356584062 -684760996 359287556 -920075070 -159312682 -920075070 -165024029 233934665 505165179 233934665 499724499 426399045 915359423 426399045 911045270 519236633 -274211773 519236633 -255624843 -58...
output:
87.00000001665708282417
result:
ok found '87.0000000', expected '87.0000000', error '0.0000000'
Test #35:
score: 0
Accepted
time: 4540ms
memory: 15588kb
input:
1 100000 833197217 824145714 115405317 824145710 565886479 -94743932 145099813 -94743932 445727317 467373613 784155200 467373605 -537274557 758486615 -549396896 758486619 -843169135 95853163 708924694 95853163 -420388555 504660672 671167980 504660668 862280609 -628334041 -123791665 -628334037 -66581...
output:
0.99999999898575309132
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #36:
score: 0
Accepted
time: 1066ms
memory: 13192kb
input:
1 100000 -440471097 68305887 -440471093 -683128710 767603880 -802174351 767603880 -69062513 -627384447 -616148374 -627384451 -813582130 -655353526 188348746 -655353522 -589560633 845566825 -43647295 845566817 487062796 -294076134 -167477315 -294076138 167140444 -383028620 159115797 -383028620 -49005...
output:
0.99999999898575309132
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #37:
score: 0
Accepted
time: 2735ms
memory: 13220kb
input:
1 100000 -794961573 -370739901 -791657874 -370739902 760057871 -436762729 757934294 -436762729 -164726070 874885192 -172460329 874885192 -704667151 578180384 -700711177 578180384 -863596317 403591590 -867055689 403591591 525290614 393935929 525060215 393935928 630201439 -408919822 621777745 -4089198...
output:
100.00499987145028057967
result:
ok found '100.0049999', expected '100.0049999', error '0.0000000'
Test #38:
score: 0
Accepted
time: 2743ms
memory: 13308kb
input:
1 100000 -135521536 541636454 -135521536 539430654 -174223439 788831548 -174223440 786790469 484278955 -82222597 484278954 -84713663 718225993 -367306748 718225992 -366512483 -202277304 3444755 -202277304 2911668 537528121 -466325789 537528120 -470769243 -601348163 -283160864 -601348163 -292874172 4...
output:
11.99999999975526066009
result:
ok found '12.0000000', expected '12.0000000', error '0.0000000'
Test #39:
score: 0
Accepted
time: 2341ms
memory: 17388kb
input:
1 100000 516 400010000 400010000 0 -809 400020000 400020958 958 -879 400029121 400030000 664 0 400040249 400040886 0 -899 400049101 400050000 0 -958 400060000 400059342 0 706 400070000 400069999 1 -350 400080000 400080000 0 0 400090000 400090000 399 721 400100000 400099075 -925 -260 400109740 400109...
output:
4294.97512111076684959698
result:
ok found '4294.9751211', expected '4294.9751218', error '0.0000000'
Test #40:
score: 0
Accepted
time: 313ms
memory: 13312kb
input:
1 100000 499989391 400010609 499990704 -400009296 499980000 400020416 499980000 -400020815 499970298 400030298 499970626 -400030000 499959461 400039461 499960556 -400039444 499950000 400049458 499950206 -400050000 499940000 400060740 499939464 -400060000 499930639 400069361 499930276 -400070276 4999...
output:
8004.00083322827595111448
result:
ok found '8004.0008332', expected '8004.0008348', error '0.0000000'
Test #41:
score: 0
Accepted
time: 1841ms
memory: 18012kb
input:
1 100000 0 -499995000 -499994530 0 31 -499985000 -499985000 0 0 -499975718 -499975350 350 59 -499965059 -499965225 -225 -567 -499955567 -499955972 0 522 -499944478 -499945033 0 0 -499935803 -499935000 -551 0 -499924561 -499924640 -360 13 -499914987 -499914584 -416 -566 -499905000 -499905000 0 -104 -...
output:
4266.70019426644830673467
result:
ok found '4266.7001943', expected '4266.7001932', error '0.0000000'
Test #42:
score: 0
Accepted
time: 304ms
memory: 13296kb
input:
1 100000 -499995638 -499995000 -499994376 499995000 -499985266 -499985266 -499984471 499984471 -499975518 -499975000 -499974679 499975000 -499965000 -499964030 -499965000 499965895 -499955000 -499955202 -499954891 499955000 -499944688 -499945000 -499945912 499945000 -499935968 -499935000 -499935818 ...
output:
8012.02991285165990120731
result:
ok found '8012.0299129', expected '8012.0299127', error '0.0000000'
Extra Test:
score: 0
Extra Test Passed