Ticket 15198
Problem 1661 -f
View hacks & all small testcases

Unable to dry run this testcase?
Try making a new request with small values of n_high, t_high, *_high, etc.


Retry
Input
200
537574 5233887 13867741 18438992 22130659 22814574 28799714 33285546 34018507 35423979 41302347 44707952 52125081 57711484 58215285 65744028 69631380 72223720 81773257 83023218 86992727 95858002 96670244 100568736 111790054 121558909 122689704 127937979 132780949 133692233 135783676 145865982 146916399 150871443 163182863 180194552 182305922 182932241 188398700 199450142 199550590 203152252 211329486 215823917 223739902 228347788 235172325 240858928 241813493 244600994 248336776 250632738 272724373 280670143 286011422 293910532 298743376 299485508 310112852 311934742 316804383 318775179 319276928 319710560 321832829 326330347 335182282 339250902 346081043 364424342 368973956 379971702 381834889 382402931 386328809 387715265 392841995 395634192 396321037 398164796 398606435 400697536 403063109 403516752 406420384 411792285 430455169 432643607 438169777 440323583 440523586 446387526 467509436 477799096 479632385 482732194 489657507 492644205 500799975 516962462 519287845 522395591 523781106 548335457 549502358 562972507 570463763 583677869 584198657 585313615 587056788 592427554 599514807 600861721 603589653 613903966 625090772 639351928 644054930 652248621 653505747 656899553 659971412 668920445 677963418 679299629 681800106 684997377 686446787 693176375 694049164 698119564 702068925 707037924 708314383 713049677 714532106 717639720 717984422 718242846 720668540 720685200 722938877 732710966 739030382 741611249 745179232 749988097 756453918 765155892 767333725 774317040 778798562 788180726 793413569 793622403 797356059 802919335 814028655 826010605 841346593 842720736 849373952 852847438 853885327 855386427 859990347 860579889 862859197 864379988 865395359 867838591 867858945 877199171 878426289 879414279 888602525 893996835 896421369 902821034 904259251 904672930 911258112 914175473 918252586 926365738 932823934 941675420 942974062 948691928 954006067 955204152 960834754 969376116 979670805 979752416 986020431 993613991 994654397 995433798 
995433798
Expected Output
995433598
Generator Parameters
--m_high 10000 --m_low 1 --n_high 200 --n_low 200 --val_high 1000000000 --val_low 1