QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#69810#5174. 青蛙思直线ynycoding100 ✓1001ms49212kbC++176.0kb2023-01-01 22:24:572023-01-01 22:24:59

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 1ms
memory: 1736kb

input:

100 100
2 -83858883 861333371 661061160 -36361 661061161
2 -532239730 -922334866 -601732740 34691 601732741
2 435055696 355222897 -13400664 5177 13400665
1 467023120 -892412460 -149231532
2 -144866214 -906803104 515493940 32109 515493941
1 -189225996 -528898393 -977898040
2 384013409 479885502 23339...

output:

112770071 375154894
448466645 615321617
136296103 188519266
753978971 307529669
464263489 417472847
967235693 670671324
898492556 245574178
489201249 912205294
217317832 293377572
71676569 463049938
897010602 680630200
896018703 764607822
633595334 179613322
548187858 628842862
97720933 983039131
20...

result:

ok 39 lines

Test #2:

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

input:

100 100
2 -8707061 -698854750 221614404 -21053 221614405
1 -493241664 -671774466 386156567
2 406369035 -892336356 -41733 870821644 870821645
2 -719311291 745349826 -10157 51582324 51582325
2 -507581835 -766162770 -122512 495 122513
2 717216052 -489487324 -636424164 35677 636424165
1 -764548879 -8730...

output:

537902090 20665174
914763446 486778863
715923139 41076082
202361267 328271833
663291283 18486594
428867933 617259887
82834551 436940488
804696725 943638316
617008570 988106644
67809899 781756527
709844447 641389980
832851171 823406117
576230034 368053436
347791486 216966120
887300868 445447
99531751...

result:

ok 36 lines

Test #3:

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

input:

100 100
2 -514977264 -134950646 -61600 -351 61601
2 256668375 741455283 -363663480 26969 363663481
2 468409299 -607034661 517229284 -32163 517229285
2 -312102810 9926660 43623 -951483064 951483065
1 519204965 -293764509 -388913781
1 672240773 476598341 693213162
1 364639136 -388304610 -668484674
2 -...

output:

52085690 346833362
974296848 772299462
845023614 940492895
393581447 442003555
384970682 13567295
381443012 296619745
145132968 176010594
288656575 979893596
284660597 171383889
494694961 632782793
360626434 196453592
271591957 545489922
161392032 842340374
486022531 285758847
312571865 165117554
66...

result:

ok 44 lines

Test #4:

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

input:

100 100
1 -425242946 -992048175 689952320
1 -267560133 -26450535 361963906
2 257638778 290389317 2002000 -2001 2002001
2 -552608453 521355580 17953 161155104 161155105
1 -263398448 989004792 -431463918
2 -682165566 -786526835 -205254060 -20261 205254061
2 579703401 -857131598 -266550960 23089 266550...

output:

399630486 716121410
377317276 499827686
113694308 240642926
406625474 779684613
477619539 160059108
572562993 257709281
456370845 857272243
23298680 489388969
76105213 527948480
14803936 845204380
715615123 78448011
766819557 573215402
408098045 428555546
612747231 433423908
836028434 580598350
7127...

result:

ok 35 lines

Test #5:

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

input:

100 100
1 -847248913 -864138113 -704498105
1 -888183295 168694792 620342083
1 440006339 -120273382 44646172
2 -643984319 440718760 18909 178775140 178775141
1 -452372002 -635102847 17190430
1 588126919 -640031128 428666660
1 -822569246 645125492 310289240
2 606755191 -784387904 -2304804 2147 2304805...

output:

144678237 54639051
11737045 620056438
298175064 191544406
176564118 943438697
879440893 803048426
645330687 762371306
936240032 822381358
918433616 89028160
715359234 903057293
504489564 727644057
850645754 78543508
828753134 417061674
653987994 500169418
708009548 834035341
931145733 397753023
9122...

result:

ok 39 lines

Subtask #2:

score: 10
Accepted

Dependency #1:

100%
Accepted

Test #6:

score: 10
Accepted
time: 3ms
memory: 1784kb

input:

1000 1000
1 -688493041 -34676380 -807675251
1 -246734297 -967532271 949440723
1 -429982204 -556363291 -788572454
2 -239328851 860082047 33859 573215940 573215941
2 -314933245 409182866 14037 98518684 98518685
2 815835187 448245997 8511 36218560 36218561
2 777652100 -895346785 -226525612 21285 226525...

output:

183924538 580381026
141666620 104774061
263910551 929345261
980957693 465699256
184419662 941374595
227314712 523864542
301657124 852982682
251909570 391797967
461324658 700100306
4194915 64690629
380217284 464473450
578561199 94571681
108000840 571195647
68853655 420383040
187290788 848486352
23380...

result:

ok 337 lines

Test #7:

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

input:

1000 1000
1 83732518 472073626 432807387
1 629317119 406701703 471601642
2 -9686139 613092403 12177112 -4935 12177113
1 689004582 134667728 304784885
1 937317852 -846979938 -486483463
1 915383231 -178849275 891413582
2 876049555 717676886 -75509760 12289 75509761
1 513362709 -27236062 -447390204
1 -...

output:

609088757 314685964
828797681 327382738
355157172 106663403
691716562 825260881
400203480 181258440
922199709 301425820
42006172 318874026
221048553 604424181
263536028 422505173
157876357 787666721
537718376 14825978
586510617 598194700
955495161 488357561
698083208 643373543
49688141 66762071
9237...

result:

ok 308 lines

Test #8:

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

input:

1000 1000
1 -529111236 -149864883 -246584272
1 741032192 -120714322 196692843
2 815455198 -867972868 -55444 -333 55445
2 -896165294 895187963 16493 136009524 136009525
2 -909807417 699026706 -273335580 -23381 273335581
1 456466703 -955408135 -36431142
1 -211423834 -176325564 751934183
1 -353045306 -...

output:

825407310 930804294
398546478 325428202
382198066 103086404
858889576 914288378
984943357 941807744
518604280 346051939
869319612 394951279
57174909 428413210
835791532 358415476
639631156 355030610
745935997 776576070
590401490 712440406
710753279 966689537
968800331 799026527
460939788 145675402
4...

result:

ok 354 lines

Test #9:

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

input:

1000 1000
1 885017443 -749892693 154518370
2 438176645 -381379235 203717112 -20185 203717113
2 -319357718 243272333 5955 17731012 17731013
1 -189528781 -187395852 626788557
1 77060803 -520279482 -576199858
1 726484671 740876803 -575051510
1 -543269595 -568260043 -920010409
1 -310635724 133103122 691...

output:

558297999 251888865
749289813 103107045
678171550 479258991
711753936 16119490
259388891 395931607
68181127 801126955
548650181 2521730
261171772 417472150
127290066 95387785
711105356 592000401
548880329 717373606
183869602 456274805
31655345 874975006
636560035 473068238
345257911 16662590
5700368...

result:

ok 334 lines

Test #10:

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

input:

1000 1000
1 242203496 -23292191 306549544
2 509347373 -552518417 23255 270397512 270397513
2 203004566 -334228572 26913 362154784 362154785
1 -293078369 261961366 -470134545
1 -352559190 896968322 500066842
2 -245766163 -740888176 2723 -3707364 3707365
1 -975468755 -788213602 66881452
2 -152639966 6...

output:

669656423 307349535
244422176 105726054
391036902 519621062
895756478 856133490
294120648 477104600
592821343 41227900
220391171 29978795
80128698 575663178
31506736 270010322
410328448 324282140
580757610 606070008
363467911 157282937
329776212 734486276
25452970 717612884
726252783 195375372
97456...

result:

ok 360 lines

Subtask #3:

score: 15
Accepted

Test #11:

score: 15
Accepted
time: 873ms
memory: 49192kb

input:

100000 100000
1 -192197612 115190605 767194240
1 -198216180 -511433295 95040803
1 -203884367 -410636373 529475286
1 -587263021 -518957051 -289336078
1 75253754 687544707 363669312
1 -824939819 -978504413 201885662
1 -163357186 -589177000 264718223
1 -875813550 497550093 -797162432
1 -108811248 -9249...

output:

110357117 282199239
83023765 335844861
874027218 78280627
402040772 118259715
791070254 166397501
727252832 84333155
574992353 887633486
74793701 136635101
268454690 23619609
343380975 799224962
566796961 270689228
142376769 197397957
535401691 121440085
110711521 630154333
114573516 39462330
729776...

result:

ok 49904 lines

Test #12:

score: 0
Accepted
time: 835ms
memory: 49212kb

input:

100000 100000
1 -120890745 -666837610 -690686681
1 -491702705 723294724 -389102589
1 575587268 -219286844 -67198394
1 -753872909 247820233 -216777468
1 331649259 -107336185 -444632348
1 997242255 408858107 205429389
1 -931145920 -298880153 -439866981
1 -857374167 -548201739 -614051185
1 644120449 40...

output:

215912078 503873363
107531966 157420371
255319993 885807363
28579503 659330403
132603934 821969018
162974356 382204259
697863181 22929102
777955401 557972188
210756884 423449496
520388489 440295223
189850337 435744234
292527243 224468936
105714895 614131570
279189724 725862684
243084853 457574726
88...

result:

ok 49972 lines

Test #13:

score: 0
Accepted
time: 859ms
memory: 49212kb

input:

100000 100000
1 -126360045 -621984365 -839394401
1 810350334 -537015623 244048991
1 -153418915 259961144 -703460429
1 819526700 -284183637 -135904287
1 -43318121 -843396396 659798319
1 933149795 -698704058 740097718
1 -922261233 232348870 608428344
1 493423521 -980407036 443587914
1 775258349 533857...

output:

759312648 601755230
554216422 194678250
484967553 995805826
766184449 124863727
352787714 230193509
339312210 360845206
826770354 354675101
21439192 82090726
593616717 642709857
508413017 142096281
523351096 603427198
727651450 753138665
893192942 567597461
694360058 378307901
762122626 122791570
66...

result:

ok 50012 lines

Test #14:

score: 0
Accepted
time: 866ms
memory: 49196kb

input:

100000 100000
1 172743483 -944810596 144453042
1 -539010588 -588898834 310168869
1 -259849808 721242963 434399526
1 -527589587 714737764 -489148019
1 -484575123 441643797 446576725
1 -71390303 -117801093 -397217565
1 -766292721 -26877167 -189844318
1 -503107978 -645246502 -8894460
1 539545943 -14207...

output:

667502683 504047053
582971393 185060314
236374424 521299618
698839465 630936562
540048308 238118634
625508296 484644527
893110404 348880146
374748139 988280088
478202291 219888882
477135044 743116717
567564384 567547983
571442008 324401478
241422838 469879975
537240196 143340513
751778028 623226888
...

result:

ok 50046 lines

Test #15:

score: 0
Accepted
time: 870ms
memory: 49168kb

input:

100000 100000
1 482379186 -908468806 995745702
1 -449338174 213420503 699637008
1 268679020 -782610210 56846356
1 85947967 822576462 -506891446
1 -475596614 150921074 -400875572
1 -589759908 994696192 -907080512
1 -305772680 983312153 -813261838
1 51162212 -374465108 111215469
1 466061529 896856134 ...

output:

244378955 576795806
369285941 617046865
19577283 478319889
985679023 489503825
170995854 301115406
863951161 803635795
925489890 65576479
9978506 936831073
27580017 655380609
120377069 548883138
241783253 118358330
817322284 734426368
852132497 16246739
541703494 868851940
174772239 623185120
533775...

result:

ok 50014 lines

Subtask #4:

score: 15
Accepted

Test #16:

score: 15
Accepted
time: 880ms
memory: 48668kb

input:

100000 100000
2 404809633 -19259508 -21747 -236466004 236466005
2 -660732477 817220029 33793 570983424 570983425
2 861959162 -761827146 -22357984 6687 22357985
2 -202139172 147507338 -325967044 25533 325967045
2 485261767 778145842 43241 934892040 934892041
2 607873212 479867690 879523740 41941 8795...

output:

324353430 572978305
252977441 636679051
64906745 74606352
750676202 776210549
632654290 647388389
761188435 631628439
337180931 686433660
108045813 103132504
282294025 570865520
751601288 955927215
693305572 734623958
106005090 240881603
123218044 976463018
847883243 387782654
492886020 435735772
32...

result:

ok 49868 lines

Test #17:

score: 0
Accepted
time: 894ms
memory: 48708kb

input:

100000 100000
2 -668444744 674195792 -1529 -1168920 1168921
2 -173775240 653252168 -17045 -145266012 145266013
2 95936039 -110102232 845057160 41111 845057161
2 668079161 121157338 437162880 -29569 437162881
2 209017444 -469283067 -725919304 38103 725919305
2 -675728444 831092895 242242060 22011 242...

output:

277874638 22677915
855291385 150033772
330063921 485828528
720557798 363647252
221352721 570289218
446545727 830912836
521326860 149462685
38427437 306073878
44932667 321408694
624598648 690906956
9993958 479223445
286058446 239853234
224707395 71315692
100606025 262776608
154478003 455398652
628478...

result:

ok 50231 lines

Test #18:

score: 0
Accepted
time: 880ms
memory: 48696kb

input:

100000 100000
2 94831598 -158254664 -32061 513953860 513953861
2 -645851549 195921871 699744 -1183 699745
2 102252841 764992457 24895 -309880512 309880513
2 541550379 -544087534 643005660 35861 643005661
2 -449315831 795233427 -4997 -12485004 12485005
2 -533120078 919145334 -37057 -686610624 6866106...

output:

762969447 834248776
693789272 842531136
752784948 16006948
862516762 593769695
306290078 567656478
255427250 786326811
745443593 637471239
268181593 239585936
153056035 538055033
49434820 712127942
586566779 647690081
129555923 237973988
448379186 19805445
503107432 492369912
505034231 667411704
893...

result:

ok 49993 lines

Test #19:

score: 0
Accepted
time: 895ms
memory: 48700kb

input:

100000 100000
2 -68035479 -11986500 -38497 741009504 741009505
2 -950804266 962749979 650053624 -36057 650053625
2 724516229 327358935 -799880004 -39997 799880005
2 -983546208 74252010 38239 -731110560 731110561
2 -395491350 443359450 12923 83501964 83501965
2 932650601 865525988 -440599612 -29685 4...

output:

331669891 617230068
413122514 300398711
921202584 582675350
175681623 304356672
475718762 129692229
5214985 516174794
789528117 361290599
931147343 892931382
326691907 504344862
134416149 659705646
806958967 758474555
78801780 626980297
902258542 683562216
47054997 732023546
852043479 505620759
9170...

result:

ok 50158 lines

Test #20:

score: 0
Accepted
time: 898ms
memory: 48680kb

input:

100000 100000
2 -413907447 -887754660 4633 -10732344 10732345
2 -923663215 637041894 -34909 -609319140 609319141
2 -297267371 -694570371 -18809 -176889240 176889241
2 -716139132 866638623 26303 345923904 345923905
2 -483643669 -447517678 42357 -897057724 897057725
2 -791028166 412464214 -175824 593 ...

output:

876571751 952409087
209699964 732795429
359149361 568436107
572108105 767189679
935344784 549201156
503162644 240367246
535329439 352675084
34650303 666767206
91602474 385928242
455056831 720754440
521750439 167063679
529749132 902821939
399452380 287161250
156760219 617703156
212544325 125906611
95...

result:

ok 50105 lines

Subtask #5:

score: 15
Accepted

Test #21:

score: 15
Accepted
time: 226ms
memory: 47164kb

input:

100000 100000
1 -109326083 -252045233 -753228979
1 54024079 690286325 776569314
1 826611314 -911535025 -823690431
1 -355380330 -552996520 -850686699
1 649346459 -852374490 90437104
1 -294870656 595413398 808089519
1 399638191 519980860 565184319
2 -644934515 -209540084 -395001724 28107 395001725
2 -...

output:

552415227 948498653
956038420 98682956
994098267 402635356
356618613 612376558
77382305 51497509
513057564 541174297
582727445 14500865
255428579 680584682
939824955 676694888
423138002 6968775
545400319 529731423
206843123 249021137
348432938 619418681
902448830 178805727
904036520 36114150
4761339...

result:

ok 100000 lines

Test #22:

score: 0
Accepted
time: 211ms
memory: 47088kb

input:

100000 100000
2 403048 -953877450 29867 -446018844 446018845
2 525100699 74382339 347240304 26353 347240305
2 781476041 279030959 34536360 8311 34536361
2 512872227 837860402 178623900 18901 178623901
2 -734737559 -212977985 -38831 753923280 753923281
2 -962276684 -496355715 826333204 -40653 8263332...

output:

853295516 269178788
461499077 450530718
856617652 298371798
336977932 840085951
109448216 993857775
458624009 378098643
859307871 311415019
296695075 168182042
896213596 302793225
903150312 236280415
597820533 170770156
880193207 33354785
520902452 475635332
639786021 926653237
318563587 664980135
8...

result:

ok 100000 lines

Test #23:

score: 0
Accepted
time: 213ms
memory: 47140kb

input:

100000 100000
1 289130240 -270850298 990077565
1 27546030 -407978535 631684432
2 -120550573 -257418235 -34403 -591783204 591783205
1 96971172 -669733959 -277187342
2 -531893563 -147746735 -532325820 -32629 532325821
1 255056370 123582163 -226365814
1 -877485119 -351652822 101965837
2 972370717 -6988...

output:

306678969 149081272
902764788 507681352
622171186 688132591
322238221 666986936
626070286 635480998
977944037 550237892
742931577 449868323
718815935 590416125
274915750 858049350
927685503 618458683
54942033 274197313
614750753 817940104
240372820 233871096
187093076 364981594
718660991 755076816
4...

result:

ok 100000 lines

Test #24:

score: 0
Accepted
time: 210ms
memory: 47164kb

input:

100000 100000
1 -330845879 -569868992 -407549992
1 302572571 -729144001 139642218
2 -494748809 -602469273 908786344 42633 908786345
2 344910074 -649464363 -14879 110692320 110692321
2 -334413419 669933053 38627 746022564 746022565
1 -998923494 -639820129 -59255645
2 -398742551 -209456788 -599653080 ...

output:

211894655 967076478
91082630 845734675
229277374 813469918
443982315 523917497
709328939 489251635
762197866 704338870
994554804 33524263
659527556 10890265
947655403 251573825
347852331 673858107
805533786 849348732
983082526 682280296
590091151 94383160
943466413 998164271
745957565 496490060
2826...

result:

ok 100000 lines

Test #25:

score: 0
Accepted
time: 223ms
memory: 47136kb

input:

100000 100000
2 -43355511 862697708 -16410720 5729 16410721
1 -374058922 753724403 683601267
2 -625118146 -38065446 236944680 -21769 236944681
1 639413098 431423728 100212485
2 -997801273 -5449010 33366280 -8169 33366281
1 -881323971 646326299 478084353
2 544455014 -694718413 -10601 -56190600 561906...

output:

886489104 989219459
278712918 883745306
141505831 355222512
518214173 757808670
106954934 289248823
98417705 416836480
353039396 97895976
505908242 686163372
666273487 943709433
760339882 924560883
616072451 139641035
770135915 997112295
970911121 767818383
247599418 658977441
211720307 767892738
34...

result:

ok 100000 lines

Subtask #6:

score: 35
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

100%
Accepted

Test #26:

score: 35
Accepted
time: 1001ms
memory: 48872kb

input:

100000 100000
2 272238974 418852481 501209460 31661 501209461
1 117015042 -190426489 -750429929
1 -135756210 223262635 -356837321
2 -408456248 437408294 -11012124 4693 11012125
2 -943126923 540522005 5673 16091464 16091465
2 951408173 -915040319 902232720 -42479 902232721
2 -154320589 378823772 -206...

output:

24884536 825159290
725890432 83323766
651694253 596171510
570855644 654061885
938434460 879123284
520844298 527414794
928424091 571231600
51732681 715344861
658162261 876924221
566885710 772984373
92208609 904331874
336836755 42922513
29019269 453625172
964891838 306451542
258334485 657881363
637966...

result:

ok 33202 lines

Test #27:

score: 0
Accepted
time: 999ms
memory: 48920kb

input:

100000 100000
1 -533609789 283375148 557393491
1 -707151320 451404036 -147113677
1 599692432 520342904 -384834810
1 -761756312 -710734561 815649578
1 53565684 -203255765 -749022405
1 -653435902 302326721 -985627095
2 329026207 -606612325 -30079 -452373120 452373121
1 -662142410 236704111 64295247
1 ...

output:

86710543 422954598
465292497 353676224
446886185 398527750
237195587 16046572
144326627 85522938
757304266 780422217
616633890 213442977
465697427 746916307
408599159 159056409
558357735 794105903
711002781 86519614
866608503 598088612
600872970 661809359
125032484 579362399
590072447 846574815
3164...

result:

ok 33300 lines

Test #28:

score: 0
Accepted
time: 999ms
memory: 48904kb

input:

100000 100000
2 -672770753 -492045927 -333413664 25823 333413665
2 405344262 -701755747 -21127 223175064 223175065
1 -681956010 453337097 196561540
2 -670541887 622921267 -29483520 7679 29483521
1 867065813 164303931 -642058862
2 -812721015 304357370 18708844 6117 18708845
2 327241765 -362732696 -61...

output:

186276654 660650217
351451875 69736381
294447633 458672184
375988531 411036020
57574410 476665771
974566646 930919168
868511040 722192440
647547679 243177996
445782233 59828427
296090715 966468362
989072966 329294993
238208057 572781085
962831572 169660471
543530481 409964944
597453279 754428402
641...

result:

ok 33324 lines

Test #29:

score: 0
Accepted
time: 972ms
memory: 48868kb

input:

100000 100000
2 -136636299 -293364062 -24675 304427812 304427813
2 466601324 758410577 6233 -19425144 19425145
2 -598143086 908566954 149766124 17307 149766125
2 -303856801 338888449 322453012 -25395 322453013
2 219058177 616041664 965933104 -43953 965933105
1 -927885137 -473056931 -60789346
1 -1227...

output:

327753183 524011878
486725972 117972092
419883716 454106976
702076961 214284493
983180207 811303769
18285032 97317245
911366545 352018753
838902645 398524610
703296989 155973017
318603987 405543740
816349517 424159267
929429383 893167694
592839598 632663561
766957931 369663805
773593628 519801117
25...

result:

ok 33303 lines

Test #30:

score: 0
Accepted
time: 985ms
memory: 48904kb

input:

100000 100000
1 -962276171 -454329890 -909789264
1 -610313558 -752736473 666368801
1 56169835 -178916001 210554098
2 219354238 24666288 99531940 14109 99531941
1 -23012700 -709516977 467766678
2 504418279 -990715471 -23515 276477612 276477613
2 -630592467 -273396658 96952812 13925 96952813
2 -461916...

output:

795885372 874289972
819342371 469539350
225376466 536688367
709430769 304768744
875036086 704283919
220663402 688122804
685232316 10388299
648804880 915179691
433338420 712284614
411792556 980109995
806997362 274960191
5357393 260898473
822888519 922732741
554920264 285329975
657772912 53963672
2948...

result:

ok 33329 lines

Extra Test:

score: 0
Extra Test Passed