QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#858117#4748. Polesov and workrotcar07AC ✓999ms3584kbC++23626b2025-01-16 14:15:302025-01-16 14:15:32

Judging History

This is the latest submission verdict.

  • [2025-01-16 14:15:32]
  • Judged
  • Verdict: AC
  • Time: 999ms
  • Memory: 3584kb
  • [2025-01-16 14:15:30]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;
int main(){
    int T;cin>>T;
    while(T--){
        int a,b,R;cin>>a>>b>>R;
        a=abs(a),b=abs(b);
        if(!a){cout<<b*1ll*R<<'\n';continue;}
        int l=0,r=R;
        long long ans=0;
        while(l<r){
            int mid=l+r+1>>1;
            long long w=mid*1ll*b/a;
            if(w<=R&&mid*1ll*mid+w*w<=R*1ll*R) l=mid;
            else r=mid-1;
        }
        for(int i=l-100000;i<=l+100000;i++)if(i>=0&&i<=R){
            int z=sqrtl(R*1ll*R-i*1ll*i);
            ans=max(ans,i*1ll*a+z*1ll*b);
        }
        cout<<ans<<'\n';
    }
}

詳細信息

Test #1:

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

input:

3
10 -10 2
2 3 3
5 1 3

output:

20
10
15

result:

ok 3 lines

Test #2:

score: 0
Accepted
time: 491ms
memory: 3584kb

input:

1000
6 -296931296 524009225
-1 972627002 764802696
-2 946703681 888419140
-7 -675988065 804932647
-5 -946342799 988485092
-3 157301616 813213206
5 -819493698 947276462
5 -288968700 652784433
-2 -298340514 868832401
-8 403761891 573885445
7 636715143 809602706
-7 239261086 816019131
1 -937979277 8065...

output:

155594738295205600
743867753331997392
841069670108854340
544124862500858055
935445748733052508
127919751456340896
776287090872736476
188634268984247100
259207905094194114
231713072490576495
515486302723976958
195241623479836266
756485600553104205
267572738077251300
204015467943568320
460058527091013...

result:

ok 1000 lines

Test #3:

score: 0
Accepted
time: 469ms
memory: 3584kb

input:

1000
4 252938650 855981689
-9 96632531 772049930
4 -472354288 906040228
-9 -914389582 504126345
6 878496428 940680745
1 251357903 777466162
-10 -163447355 923953752
-6 -869475747 808954936
2 623680785 823956519
4 -883188289 997895218
-3 839991910 606745619
-9 -561107293 850839070
-8 -631813067 92777...

output:

216510852840379850
74605138794272830
427971986796297664
460967877879737790
826384674370878860
195422264133778286
151017796906725960
703366697267937192
513885848575787415
881329370186702002
509661411387942290
477412007346337510
586181820142352966
19975697946865800
626568458779499635
67353488105273374...

result:

ok 1000 lines

Test #4:

score: 0
Accepted
time: 475ms
memory: 3584kb

input:

1000
7 -183760515 539863220
-7 -975715532 506063945
10 -144495610 687569018
8 652503285 518636870
-8 -378015789 684991068
-1 888428456 805794798
4 -550796255 612008467
4 153533065 667604407
4 -191791354 503474912
7 -615420559 740626550
0 209993839 998068835
-8 390850240 745919978
-7 574315897 896304...

output:

99205543336758300
493774451321693740
99350704673010980
338412261397117950
258937439027972652
715891028239971888
337091971651891085
102499350814217455
96562135077510848
455796805411241450
209588306247907565
291543002422094720
514761817228511452
188549331249645989
307251430660403115
311644988093185496...

result:

ok 1000 lines

Test #5:

score: 0
Accepted
time: 475ms
memory: 3584kb

input:

1000
-5 49179929 546818034
-5 800193306 808234965
-1 36335103 506648758
2 -99504669 975925701
3 714374015 810209275
-1 -2626606 598836746
9 -899655156 853174866
-3 -20421008 939800747
-1 512262706 793196858
4 640615501 981557834
8 -557483998 857403820
5 -171918802 630083950
5 -930644440 771996852
5 ...

output:

26892472088039586
646744208668144290
18409134806752074
97109163846597969
578792452771989125
1572908190064076
767563167166509096
19191678572892976
406325168869777748
628801163588384834
477988909474072360
108323277843427900
718454578011302880
511431136724213392
73930454747099730
536488054907360625
165...

result:

ok 1000 lines

Test #6:

score: 0
Accepted
time: 501ms
memory: 3584kb

input:

1000
-61 386944871 649192474
-46 -656140524 926169424
-19 -733129546 729377613
22 -931298262 558933003
100 -265205237 618535468
-34 -647806756 534320453
-93 -239444675 572833732
75 -662355295 981038409
-5 -923957941 869807027
-7 460056701 541895655
-72 -644870256 824100774
21 -980280815 547188292
-3...

output:

251201698106100854
607697291176138176
534728278281253698
520533334268340786
164038845383845916
346136399322380468
137161986787777100
649795984799525655
803665109734251407
249302727325534155
531438077099178144
536398184840217980
425165407941995200
436748505915804369
271984041898011978
243832413635184...

result:

ok 1000 lines

Test #7:

score: 0
Accepted
time: 490ms
memory: 3584kb

input:

1000
21 -422945936 873089483
-28 654101027 999946831
10 848068905 642082306
-38 461542000 694007542
-58 -643316273 862526702
21 223305581 661598712
-8 723812863 593874964
21 -42833226 983620753
40 851498453 915600647
-46 -653950294 825365135
87 647162909 552808231
46 341979009 830971100
-16 66016582...

output:

369269648599191088
654066249102495437
544530038169294930
320313628949764000
554877463293621646
147738684772011672
429854337956861932
42131650011539178
779632534486299091
539747772690599690
357756982893103979
284174673285639900
617951590529399354
122256406582158960
168595558202230790
3059003593146181...

result:

ok 1000 lines

Test #8:

score: 0
Accepted
time: 490ms
memory: 3584kb

input:

1000
-19 311191845 555299499
-4 -946534687 556252548
77 500499301 826935638
58 -594049287 501691989
-27 -676345862 725555598
-23 277929186 981160271
41 552428676 839526000
-6 230406315 716820769
-6 -715648321 528926477
40 -109665787 655668613
-18 -837234696 868454476
-53 -552719800 622390824
1 38171...

output:

172804675621385655
526512331414132476
413880708790989038
298029768359061843
490726526358235476
272693075454569406
463778236647576000
165160031900756235
378525345197495117
71904414455843431
727100219203699296
344007731763115200
197381558263999800
556737380219455171
371388956358959725
1944552651371787...

result:

ok 1000 lines

Test #9:

score: 0
Accepted
time: 530ms
memory: 3584kb

input:

1000
-44 372511384 963470488
470 955450690 923389004
-114 -427743762 522014899
387 -647037884 723613285
156 589734269 613088781
-18 361019896 762565643
-682 -771801066 653591818
802 833623948 559682025
768 -995883446 815933929
-469 -943285478 970513538
-350 -502649264 519438520
724 -967368391 911322...

output:

358903724928035392
882252661010212760
223288616718310038
468205208760688940
361559464095136089
275301369129033128
504442861861277988
466564339305134700
812575092920839334
915471326597801164
261095389771249280
881584182918688799
413819983113718665
483761830056854649
363881046409741372
473721874604216...

result:

ok 1000 lines

Test #10:

score: 0
Accepted
time: 503ms
memory: 3584kb

input:

1000
27 -93410256 532983730
-1000 374621438 715106134
-396 -783601065 824489018
351 -284801380 726066996
656 -250080433 911014493
757 260243069 996523153
-744 -740812449 811088340
-377 -812726908 550842694
-63 -108181792 938716774
-834 -722880823 573176813
-450 356310091 836205071
543 -315008327 866...

output:

49786146663134880
267894088241700692
646070472585604170
206784882433254480
227826898878715469
259338243666276557
600864339510744660
447684679489010152
101552062791779008
414338526305957099
297948304942671461
272955667930680848
702489047904104580
893190362266627110
681250238916868656
3738973107675472...

result:

ok 1000 lines

Test #11:

score: 0
Accepted
time: 562ms
memory: 3584kb

input:

1000
-295 -979125408 767129953
872 -417647845 563081694
-862 -397967803 612162863
328 351866724 900123667
-800 -219996101 635735507
-152 839624532 642878305
-670 761420562 925457656
123 290270260 784237969
-114 -649753216 956174324
-936 704757362 666557136
-173 -257296685 879233297
-994 360289895 89...

output:

751116428220145824
235169856058049430
243621109666299989
316723565902156908
139859332807258207
539776395968578260
704662488538722672
227640959163501940
621277342075625984
469761048789635232
226223812659720445
322879531344306615
173104762449215488
235612876664494798
383104096174189212
231627734345426...

result:

ok 1000 lines

Test #12:

score: 0
Accepted
time: 781ms
memory: 3584kb

input:

1000
-83600 -870745285 718583141
64321 903089325 812185387
-54062 -591762283 633143909
17864 994821915 626829222
-73876 -323195115 683700343
93809 -795830655 504414261
-34302 -412422622 711014075
2764 3073195 977054802
-42865 240448561 715730495
-79317 319219034 667312836
-38162 -47509221 925743114
...

output:

625702884783347530
733475954780619162
374670686614154706
623583447008000130
220968616753948635
401428334498771251
293238290094850764
3002681146668497
172096370320462319
213018965458817631
43981348381013433
795918876643644735
417433438235176247
276569557130268448
92948453230131050
4039412288479893
20...

result:

ok 1000 lines

Test #13:

score: 0
Accepted
time: 780ms
memory: 3584kb

input:

1000
-56287 547537865 840834891
-35240 520757026 883207354
-80935 744512082 600894055
-13699 -695757169 698379174
-45397 353765416 767184763
-51073 132271936 617377528
91084 729916465 626232845
88638 -98880844 694987111
-66165 -947541291 798183516
-61458 487169785 929240956
53811 -838076351 62386111...

output:

460388943461930847
459936436063415032
447372886582890537
485902316990798406
271403439064760665
81661726958866804
457097668047551856
68720939715297052
756311841049063734
452698120347302529
522843251204986371
533267648324906022
292185136858756326
657318560674041102
519485542576716394
31797297231539686...

result:

ok 1000 lines

Test #14:

score: 0
Accepted
time: 787ms
memory: 3584kb

input:

1000
10253 -621625070 963054535
-47461 213722355 888510651
23183 -219425946 515679443
-31336 771631835 535844573
-73287 -364991337 574183407
-40317 -993219477 945402712
-97275 852896306 652701470
-61859 -701050409 624649067
-20714 216222123 936052014
12770 -707617960 646376981
-58742 -516389424 9838...

output:

598658842733192450
189894593456542598
113153450244281432
413474731392964916
209571973627336758
938992387926906258
556686676301276096
437910485591739700
202395154633103220
457387960686178760
508034266543084260
154870052074717248
345019607141334345
694455757832919700
929376441549085146
269444779808758...

result:

ok 1000 lines

Test #15:

score: 0
Accepted
time: 779ms
memory: 3456kb

input:

1000
95704 -779559166 530280393
-54056 733025518 795875378
-14505 -526306074 955688295
44109 -120283585 921842266
90272 356602018 621815866
-33050 -146124988 745906085
72167 495523862 694814484
95170 -433427711 891248760
66751 755371362 797307078
-17294 -926539098 559129978
67111 -454929691 86337685...

output:

413384944028388502
583396962805792400
502984554617041851
110882500014453695
221740799744774348
108995520507609108
344297160134164883
386291919289327009
602262935791819065
518055785480879844
392775771953244832
79962493493442528
216942855107905590
66113653495524830
369773950473246748
36436659753576801...

result:

ok 1000 lines

Test #16:

score: 0
Accepted
time: 932ms
memory: 3584kb

input:

1000
54406225 370948415 817791372
-142490998 240343860 584317017
-608797378 243359917 600724550
-127306011 -155682936 899645890
-96408133 838158306 555831933
-547711132 -675399847 967336955
-181565640 78275176 711180525
-61894313 852320234 744426823
-556194530 -82561907 654580854
267286934 527119571...

output:

306603895470197265
163262875317306420
393856518362470649
180925022363463801
468946897975990100
841167447671081767
140614409109754512
636160824030405317
368063558034100229
550243964900720134
627991503842748654
788994565065809139
267617942793506961
466108401960223679
334466589318653620
356932462392108...

result:

ok 1000 lines

Test #17:

score: 0
Accepted
time: 977ms
memory: 3584kb

input:

1000
-875936739 -908214024 823011264
879978121 801913936 585454550
941954907 302903964 893222565
-893127448 -726605480 930100063
-944583012 -667994479 833190398
-728171145 -389712359 801535099
-968160376 -931805124 879898528
560565512 -62682549 529623936
542858633 466688899 632362628
-654965195 3169...

output:

1038468648186221493
697017377543430449
883807442458580076
1070880942518638760
963930963817357678
661986930442674314
1182341134567477908
298739260254230557
452700108308296382
638706565201457572
418886130260462502
664797257420639158
353331123324534744
1179428109767793981
492243658865065668
65441201248...

result:

ok 1000 lines

Test #18:

score: 0
Accepted
time: 933ms
memory: 3584kb

input:

1000
979540723 -628676245 857734001
82647465 116507000 502335913
258902577 902752683 668426636
932721551 -618156036 619888060
-751065816 232389409 871928727
-58107480 127171422 616106272
-772478736 -186679487 822910649
-133301733 900571603 776043424
-84261055 183321320 927678559
-233431677 -80975284...

output:

998342632081568596
71755805113382905
627749397839667327
693634069399417683
685507180755878523
86142695361981438
653979797394678715
706497319045548508
187167355102024730
555859682023562168
359560426435281748
651899843603694234
1065688977244000652
1034594227867011111
741771023157191194
401815273548804...

result:

ok 1000 lines

Test #19:

score: 0
Accepted
time: 925ms
memory: 3584kb

input:

1000
671058320 747000056 598167326
-216982183 -43219457 616119162
-861045646 697131522 809939428
-264435366 458032922 536529132
597269747 -304844874 598759902
-148527867 -160461097 768932954
469552055 -890322067 669517624
-225909434 -883085095 553115919
753915911 -198127356 509838703
966284348 40896...

output:

600653035438676904
136313060069091236
897313452411724384
283762654917747104
401509276958445892
168128014053809041
673906161472043571
504177935794939197
397426921418322642
617067922047469285
544213165072370542
230476436271395047
179706979567395792
860042221304901887
1001225678656834625
80477086954884...

result:

ok 1000 lines

Test #20:

score: 0
Accepted
time: 933ms
memory: 3584kb

input:

1000
731310267 -865699671 736515425
987198350 391989969 570989724
760583278 -76947223 577695871
753760395 622424908 926015783
117212828 -782688007 500732063
440940005 -394795622 717044492
-147881723 -52648851 962439138
835500003 -869361471 617827017
175550409 -20823696 831502903
999369634 -284195413...

output:

834654501549376449
606491275489504115
441628675170532246
905209439025465763
396287391138200471
424385962031105688
151078132262791337
744949168353804891
146994033352639995
871346312341463355
670116961261008077
407808307044833633
1124116392566359082
745312930861274862
561647611071568916
18353779008829...

result:

ok 1000 lines

Test #21:

score: 0
Accepted
time: 931ms
memory: 3584kb

input:

1000
534150606 490588104 968318762
396017084 -378780945 846175130
176417995 -342763965 994201349
471717749 528731226 785326511
-63419632 802211520 782349861
-430084029 22112383 885299819
86164663 556583613 978874798
89487564 -888523106 848905438
428047643 81522396 682331802
636569102 790375402 56557...

output:

702277184363669574
463704384379318505
383264871055515150
556460412508932288
629568250986052416
381256224381327800
551315692944268644
758087924686396506
297320307098442525
573973474327290576
902057443245119130
327473138426731488
124253027380767138
666353499050949689
780342514508011221
494233215230721...

result:

ok 1000 lines

Test #22:

score: 0
Accepted
time: 969ms
memory: 3456kb

input:

1000
605839539 -38875956 700539003
-400503098 71712184 795804191
187043989 363754925 686637130
-874109037 -574350510 712613421
-170125562 -329191217 881184483
-315761028 599223055 586919609
341729247 974734547 715739482
223810147 -779707213 902726734
898638110 -123691417 917862255
-369017428 -904125...

output:

425287118597772363
323790975254548582
280853135909309280
745335426919847667
326525599371091871
397537118226176746
739288664052953598
732285739212862511
832602772470076906
833435094487934266
635154217404290362
783220456644639262
570892111037477324
663309798083065908
253280977310002489
694687421296008...

result:

ok 1000 lines

Test #23:

score: 0
Accepted
time: 934ms
memory: 3584kb

input:

1000
555180386 235778521 888275927
-557554295 -936665866 993927816
580788673 100957272 591587132
637439469 -67943256 672963452
-777790567 879356086 606927267
750149157 68441145 929817669
505668178 -292575784 599966818
-349905431 -569697652 513951650
-518289963 529503412 807089073
981993682 924836895...

output:

535783395984441999
1083431350423114592
348739411796248942
431403357467892351
712519504007629983
700398975502566735
350506394727877816
343613953964167696
598007990153498374
814132507245144804
681983859179240486
621602319663186295
559511273356213626
691790205614468163
940568437928295575
63074660570640...

result:

ok 1000 lines

Test #24:

score: 0
Accepted
time: 924ms
memory: 3584kb

input:

1000
-227108235 350463935 827271033
486866009 -923526785 602475111
796405002 -212580716 899228591
348874372 -613578425 556963952
-652150570 233163916 793812251
941608630 -980229239 545346373
211739987 -263164885 977551058
-134181923 -757812319 688722388
-712812256 498061518 888678549
-671247842 -506...

output:

345481616433361465
628985237375245758
741223762864932704
393120217890459538
549777755981111252
741245128314098842
330188876449354350
530040812129530993
772775667824959432
493567902732805592
814643931043092206
278777832179035983
686634221248944256
502677618115973442
484141386601611023
585804016121051...

result:

ok 1000 lines

Test #25:

score: 0
Accepted
time: 934ms
memory: 3584kb

input:

1000
303725204 404856431 808668512
607755467 -897209107 975152698
409509990 338140018 838807725
267267927 438880758 652178160
-647248504 -382799925 534240054
411295632 -751847373 612799566
451953388 -524949749 670198449
-435558781 -581554957 908307655
317912893 -14514985 536924168
302184582 82183876...

output:

409283526881633976
1056748322726145519
445467007483470408
335125962529792974
401735167407155973
525165498761924532
464246859352315002
659957627992523768
170872936078212845
772134491628317952
600186877941589456
1134907907209192200
678291653677299352
459129726957667412
461615744942692776
8201870275351...

result:

ok 1000 lines

Test #26:

score: 0
Accepted
time: 925ms
memory: 3584kb

input:

1000
-521319361 -375523201 743542046
999224238 422501215 685258687
78175908 -985355612 747939686
-273133102 -615472977 882407365
-469952149 52640633 935891273
-226950976 -205954383 971203744
403651136 -220243577 736886828
524921960 -798179989 698450392
-867448163 -613651747 657775531
-913665464 -463...

output:

477717258961327744
743420835680854040
739302402227633532
594174538781683399
442574719010472851
297644957964816078
338840942520937239
667242918033262901
698926286560703245
728344290268505856
256235121168182997
360759558075240069
91059210227238279
638851588715291758
692260780438517067
8789551675688039...

result:

ok 1000 lines

Test #27:

score: 0
Accepted
time: 982ms
memory: 3584kb

input:

1000
738564156 -35534988 740461195
404091335 -346751554 586925392
695579057 -754985221 743864257
306206845 -82002244 839736638
279023120 212799358 847560301
936268195 965277137 969584017
-491413368 -911178959 803533664
462530028 633942023 645616195
-724271696 -817907797 669494623
-636677316 89904152...

output:

547510721014722708
312521346389081028
763623999873078146
266193865149434184
297416950658258372
1303850097465265966
831854977779622111
506640707953752141
731418709740462862
803810544998463324
404391005578880234
413298296440545862
298254395197650763
157438553857161334
830309690883966740
71626075728330...

result:

ok 1000 lines

Test #28:

score: 0
Accepted
time: 925ms
memory: 3584kb

input:

1000
291729657 692172637 655099322
-926085100 576939277 820105540
-440965480 461326362 650801961
-864465995 -555369400 991617214
-611644097 764804372 783055375
-667563452 786845998 768063255
-726694229 -556388170 685635298
824598756 -439309168 577028769
-660854626 158050554 795808773
861639137 11443...

output:

492070368302036168
894814648669404752
415328211355673096
1018877218465893570
766848423136671046
792545856074476116
627516370533960411
539130072531631480
540745364662221552
593129519702218362
726858659723682813
762807341385228859
525201880293569130
281237530506907840
528464354550153970
79525033662909...

result:

ok 1000 lines

Test #29:

score: 0
Accepted
time: 925ms
memory: 3584kb

input:

1000
880192270 -457562408 970525911
132492841 -590919288 941496041
491017270 -82285920 687049083
-258985112 512952512 639192417
-318684051 -609984317 620322806
129365895 857802178 800935003
348423180 -605943010 775131144
-578022796 837405182 923910054
-297039624 826085292 789737483
-798830066 605555...

output:

962780189206989144
570161139181158214
342057259661855260
367295763071300952
426915687577124079
694812897639816179
541797065761972310
940101880018871388
693284015375530092
846437770895334421
528410890373419729
580967417242941304
1338837091896055670
951974198627491129
1022395278190875634
1602092773068...

result:

ok 1000 lines

Test #30:

score: 0
Accepted
time: 938ms
memory: 3584kb

input:

1000
297210466 -259337820 584163617
-802467685 786264537 822971264
156943016 515159521 825658158
-391657362 -869636612 744138669
-321114413 848189553 834523820
61212562 956522006 626005612
271923013 -614369506 799455434
193087697 -79884145 723175792
928443295 -107992328 684224926
612213201 -18462914...

output:

230422867397057888
924576737881336666
444646196435365102
709731721032528970
756862950705716394
600013014927485832
537119840452142714
151114906515063524
639546943404449430
608891313860336183
302624336421081176
228034000648098388
1031253198840360872
836478366653686581
561332710331967110
48786352767487...

result:

ok 1000 lines

Test #31:

score: 0
Accepted
time: 931ms
memory: 3584kb

input:

1000
526190248 -751903641 625540735
-228403825 52609338 513304340
910880587 -372495723 774189864
679631547 312311580 557108876
-443089368 540031741 677982275
-204900798 -442773354 768501224
-86212939 229040148 759124743
-431711272 124038068 544182019
-710052708 500191454 973142011
-775223035 -251907...

output:

574079853557058967
120310532765990351
761881699540640957
416692697322287400
473599843405797006
374940855099828372
185779493066383300
244434099664275324
845215343257756452
475834531244174286
720228158019342700
572697256704736272
513480962318121330
419152570390480592
847883126496374806
524037952271318...

result:

ok 1000 lines

Test #32:

score: 0
Accepted
time: 925ms
memory: 3584kb

input:

1000
-256216101 -518115475 873755112
74949191 -522840342 986821293
80563524 10236417 791554317
-382844736 -829709174 841645506
-765024798 804859540 995251739
468811283 -924027818 916553456
14283975 -638968094 746116870
-780189640 329207860 661316419
98652974 974897403 927357700
797804968 -410629953 ...

output:

505035243621307281
521224214198857178
64283108244241719
769075844808346598
1105160541534793588
949688900170756545
476863982509432890
560004090546990000
908695733593469397
772244041620809752
870333783148815236
386287713649278528
493857039006807552
397092513708679568
30606522317275252
3954554836498982...

result:

ok 1000 lines

Test #33:

score: 0
Accepted
time: 962ms
memory: 3584kb

input:

1000
-247667206 148378853 923006346
-346787263 176148012 918979470
744710207 -266119912 963334066
442856912 -569825646 791853548
-719417203 828871428 833257894
362903224 -356072869 853486735
-589592433 -401172946 534466775
48952570 -484612322 965180544
510967855 -110639240 798347640
675935677 666230...

output:

266484143093923758
357445836827156985
761834095223278441
571465685382356100
914531934723846661
433926151520084268
381146004813155360
470118683259280984
417383285349179820
488991872721485932
650022399171484794
798045547199221692
759879226469472510
435039426302494065
415031286604115652
703363401133251...

result:

ok 1000 lines

Test #34:

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

input:

1000
474174789 -680546740 614451652
-183005755 -888027936 886389728
530649784 -999611306 628129122
802396645 605725190 956779174
219936577 -64698443 886239727
-443983902 258970365 727895321
-321030230 -611629490 685329614
738665432 -298813810 749368434
578735280 -894704230 590902978
-212758354 51984...

output:

509656290611825886
803679707943508742
710872339088464148
961904965632945865
203175142600066702
374132073813751815
473399109630451860
597109028778125330
629645923889802440
402740483504808052
648099110386312797
459100774642256970
269110296629037620
576359206313455586
817658960342071928
418073284893342...

result:

ok 1000 lines

Test #35:

score: 0
Accepted
time: 937ms
memory: 3456kb

input:

1000
372753156 238773728 551610494
708194098 -818894541 775738512
-40629200 -553817856 910034544
-125787571 -216995522 834607220
-153140109 -544294683 739136212
-539652305 76770837 962336583
-367628941 989527781 688617638
-565959076 -657928313 864378138
559473964 -52480998 715592109
-681930973 -3265...

output:

244182090016177764
839851912556419611
505347802994892720
209334348097646327
417928160887789287
524555867043423062
726912902838289012
750158394706704380
402112703510013550
710109197909280871
684489164689539188
182762511368152944
506986893394584524
823313315048189504
287225965652446880
565140096900907...

result:

ok 1000 lines

Test #36:

score: 0
Accepted
time: 942ms
memory: 3584kb

input:

1000
-748469329 -793645484 564270603
886208931 265827463 575159203
706936413 -65342148 661706780
-228465636 84794277 743656234
-575280378 537379333 646285299
407490131 171210309 800651877
-914957858 -919587664 845319460
-528105552 -674073394 991313748
-511928917 172584893 863799222
973811020 9764868...

output:

615567114870091865
532148319463955942
469778582050393662
181224334347079056
508772297611487827
353885572583656829
1096568446006720408
848873958434794246
466656896041989232
1279303452527080680
27392382711875284
127505829944791564
310496904424568928
456387949083500928
592941802962619272
55375775575987...

result:

ok 1000 lines

Test #37:

score: 0
Accepted
time: 932ms
memory: 3584kb

input:

1000
-439464475 -990755171 703802310
291610014 -417296763 740852178
-762081981 -467456246 882435982
244892958 414941188 677011006
399043898 207339681 703965012
518007802 -511439799 605346991
-790668207 -811673473 873875655
841590581 763890407 810454720
-837861050 -817113115 777571512
-133591741 6154...

output:

762814189249100833
377160697660706715
788921599087909865
326196204988288046
316569689169015922
440658828017384860
990209493488662623
921142762100179539
910019477593179135
145957254075847964
635403335168449131
449392942413000576
381067937556079749
627042927323077718
533408914929911048
311509952981520...

result:

ok 1000 lines

Test #38:

score: 0
Accepted
time: 952ms
memory: 3584kb

input:

1000
744857231 -721672952 709759131
-517286073 574577279 784073771
418810730 385545362 968080004
516165830 -50903572 606745240
-200086350 526280350 710836170
-221682650 76359097 601412870
-585053282 147216758 589014318
188990008 680943834 890181733
132686705 989936586 958949195
222783595 -599585171 ...

output:

736107528490142790
606187878613525829
551081320465403076
314700418401349920
400223839496271550
141010361907214837
355347078870071676
629076842864230430
957788262508130830
562986676109953037
585905697810063489
476910054578932638
781092536915768426
451577174825072972
611263784475136455
420794836170050...

result:

ok 1000 lines

Test #39:

score: 0
Accepted
time: 925ms
memory: 3456kb

input:

1000
-309893372 -240486541 758319572
-57503878 -46526823 776938619
-512671520 819219012 665152309
-970281784 -939486492 953295106
-828372820 571590534 612621624
460176035 -256313067 967510333
611268832 231603290 890030360
-849184079 -50590036 531147994
-471268328 -496615251 529692724
-922674506 -190...

output:

297458213778232705
57469521242292718
642811078020091660
1287506694269756348
616565627118241454
509629463816985309
581789685552475564
451842123326627314
362644422317273841
696456392402448942
257831163377072024
570017766222742116
747827455611773764
721587695630778441
442379426974633274
693990962051942...

result:

ok 1000 lines

Test #40:

score: 0
Accepted
time: 935ms
memory: 3584kb

input:

1000
-60222419 441067729 754103162
981268049 186805492 919837302
-564410476 -843776249 861228951
-69338299 790798685 781587012
660146639 -272903171 753631364
880249927 -392458639 659903708
557814189 -772389718 646552033
922144277 -545275847 992164177
873306798 -330238001 678174608
-946442040 -289148...

output:

335696610786794173
918817223587860010
874271488368711963
620449330145416329
538342746041296040
635999198301520043
616005836889437138
1062901837063885549
633184833233262860
873408234702866922
466555535088097650
540441289543265911
485908823894115039
306375536442505827
480574423623884478
88576885060099...

result:

ok 1000 lines

Test #41:

score: 0
Accepted
time: 504ms
memory: 3584kb

input:

1000
-782427651 9 597736910
388846935 4 585298203
-852219126 0 568495989
590565434 8 647848817
321025052 -7 594094358
239373353 -8 879081297
-718412808 4 840166576
453094184 7 960141001
223775532 3 594630648
970377824 -10 511853985
25646800 -2 794161393
-56921738 4 553447803
367185869 -5 890300697
-...

output:

467685886407298410
227591412297557805
484483154880085614
382597117777991578
190719172169856616
210428637622478841
603586429051905408
435034303373038184
133063789599704736
496691756170028640
20367698413992400
31503210839041614
326905835099250693
882209253391537996
469884210683092158
48229543119500083...

result:

ok 1000 lines

Test #42:

score: 0
Accepted
time: 523ms
memory: 3584kb

input:

1000
-459371824 2 770465756
-817074001 -6 646142343
-56105817 4 869133201
785358169 -10 986819140
-314554851 -1 988719796
-890259538 8 619660393
827619979 -7 564891854
938101085 -10 787819706
-218981139 -8 880708379
417277687 -4 548983166
-473720348 3 986529021
-510057490 7 759321523
-991367090 1 57...

output:

353930259663258944
527946109410524343
48763428323930217
775006472924554660
311006608111530396
551658575189078434
467515784344751066
739054520982981010
192858523960263681
229078425710417042
467338871140219308
387297630124357270
567335373704713110
240179429641940225
711860488185179526
5955036180770804...

result:

ok 1000 lines

Test #43:

score: 0
Accepted
time: 508ms
memory: 3584kb

input:

1000
313409731 45 616884267
-109214475 601 617818244
898882886 636 677487458
665607153 987 816147677
199715477 -232 506458869
437014534 207 592413549
89003173 -320 913504113
300027490 -391 792201317
738054328 -652 668511196
-574935019 -341 544219294
647107467 351 825303992
-219090005 -669 985645935
...

output:

193337532178602177
67474695163881900
608981881475843788
543233731715533581
101147674603215513
258893331051521166
81304764605550549
237682172714204330
493397581524256288
312890730136056586
534060375768108264
215945172827379675
763701140747276325
231277401192634278
904445664361232724
68497936735533828...

result:

ok 1000 lines

Test #44:

score: 0
Accepted
time: 507ms
memory: 3584kb

input:

1000
-741058884 -321 660690723
-254446509 60 821478340
404632217 860 565060761
-108486808 -522 516671863
380314292 -593 562453169
735088648 685 962976852
-369502367 -884 726440548
-241586867 -962 923216043
638537712 56 749048819
775886725 -396 864209062
284505668 -899 692994317
-9159978 -798 6285595...

output:

489610729855533132
209022295832115060
228641788463137137
56052081200283304
213908978751391348
707873352191976096
268421501970777116
223036871392507281
478295919060562128
670528338830501950
197160811078288756
5757591790462974
146296243205777035
153975372105815442
141668221427647200
365899761015857728...

result:

ok 1000 lines

Test #45:

score: 0
Accepted
time: 518ms
memory: 3456kb

input:

1000
276166628 81147 953992355
-738521989 6182 653281182
-6312677 67922 779914677
713584314 -75711 522639679
-24986954 53089 711212136
-686689774 -6841 541486241
-556878471 13674 757594402
365675259 26773 951382664
-685375329 -41547 502627594
408347360 -89132 922754219
858657405 19521 953793218
-100...

output:

263460863191382769
482462517906910998
4923634421823287
372947478907306842
17771065037555658
371833064456399534
421888012223919342
347897102992064668
344488553234100732
376804258233700524
818981609474479290
92392451555882948
238511959417657385
500090699406652994
404173548507648222
568073982474174063
...

result:

ok 1000 lines

Extra Test:

score: 0
Extra Test Passed