QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#617540#7844. Enchanted FortressdreamwaveAC ✓1277ms5680kbC++142.0kb2024-10-06 16:05:182024-10-06 16:05:18

Judging History

你现在查看的是最新测评结果

  • [2024-10-06 16:05:18]
  • 评测
  • 测评结果:AC
  • 用时:1277ms
  • 内存:5680kb
  • [2024-10-06 16:05:18]
  • 提交

answer

#include <bits/stdc++.h>

using i64 = long long;

void solve() {
    std::string s;
    std::cin >> s;
    int n = s.size();
    int l = n / 2, r = n - l;
    std::vector < std::vector < int > > val(n, std::vector < int > (n));
    for(int i = 0; i < n; ++i) {
        for(int j = i; j < n; ++j) {
            std::cin >> val[i][j];
            val[j][i] = val[i][j];
        }
    }
    auto lowbit = [&](int x) -> int {
        return x & -x;
    } ;
    int ans = 0, Tans = 0;
    std::vector < int > f(1 << l), g(1 << r);
    std::vector < std::vector < int > > p(l, std::vector < int > (1 << r));
    for(int i = 1; i < (1 << l); ++i) {
        f[i] = f[i ^ lowbit(i)];
        for(int j = 0; j < l; ++j) {
            if(i >> j & 1) {
                f[i] += val[__builtin_ctz(i)][j];
            }
        }
        if(f[i] > ans) {
            ans = f[i];
            Tans = i;
        }
    }
    for(int i = 1; i < (1 << r); ++i) {
        g[i] = g[i ^ lowbit(i)];
        for(int j = 0; j < r; ++j) {
            if(i >> j & 1) {
                g[i] += val[__builtin_ctz(i) + l][j + l];
            }
        }
        for(int j = 0; j < l; ++j) {
            p[j][i] = p[j][i ^ lowbit(i)] + val[j][__builtin_ctz(i) + l];
        }
    }
    std::vector < int > dp(1 << l);
    for(int i = 1; i < (1 << r); ++i) {
        if(g[i] > ans) {
            ans = g[i];
            Tans = i << l;
        }
        for(int j = 1; j < (1 << l); ++j) {
            dp[j] = dp[j ^ lowbit(j)] + p[__builtin_ctz(j)][i];
            if(ans < dp[j] + g[i] + f[j]) {
                ans = dp[j] + g[i] + f[j];
                Tans = j | (i << l);
            }
        }
    }
    std::cout << __builtin_popcount(Tans) << '\n';
    for(int i = 0; i < n; ++i) {
        if(Tans >> i & 1) {
            std::cout << s[i];
        }
    }
    std::cout << '\n';
}

int main() {
    std::cin.tie(nullptr) -> sync_with_stdio(false);
    int T = 1;
    while(T--) solve();
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3616kb

input:

ABC
1 -1 2
2 -3
1

output:

2
AC

result:

ok ok

Test #2:

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

input:

@
-1

output:

0


result:

ok ok

Test #3:

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

input:

ABDFHORSU!?
1 -1 1 1 1 1 1 1 1 1 -1
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1
1 1 1 1 1 1 1 1 -1
1 1 1 1 1 1 1 -1
1 1 1 1 1 1 -1
1 1 1 1 1 -1
1 1 1 1 -1
1 1 1 -1
1 1 -1
1 -1
-1

output:

9
ADFHORSU!

result:

ok ok

Test #4:

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

input:

A
0

output:

0


result:

ok ok

Test #5:

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

input:

*
1

output:

1
*

result:

ok ok

Test #6:

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

input:

!?@*
1 2 3 4
5 6 7
8 9
10

output:

4
!?@*

result:

ok ok

Test #7:

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

input:

!?@*
-1 -2 -3 -4
-5 -6 -7
-8 -9
-10

output:

0


result:

ok ok

Test #8:

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

input:

BA
-5 0
10

output:

1
A

result:

ok ok

Test #9:

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

input:

BA
-1 -8
6

output:

1
A

result:

ok ok

Test #10:

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

input:

CBA
7 6 -9
4 9
0

output:

2
CB

result:

ok ok

Test #11:

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

input:

BCA
4 -2 -5
-2 -7
-10

output:

1
B

result:

ok ok

Test #12:

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

input:

BCAD
9 5 -4 -7
4 5 5
7 -7
-2

output:

3
BCA

result:

ok ok

Test #13:

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

input:

CDBA
-6 -4 5 10
-8 2 6
9 9
-7

output:

3
CBA

result:

ok ok

Test #14:

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

input:

BDCEA
578 354 -120 90 852
494 -479 176 791
375 -393 -604
124 60
-300

output:

4
BDEA

result:

ok ok

Test #15:

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

input:

BCADE
-378599 627719 605863 385700 900008
-255132 -615654 34362 899491
339568 -940805 998872
745003 616051
-748394

output:

5
BCADE

result:

ok ok

Test #16:

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

input:

DBECA
840329 915177 802208 844961 364360
593863 148430 529188 809632
460076 567952 593488
933986 409773
320989

output:

5
DBECA

result:

ok ok

Test #17:

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

input:

EDCAB
-640316 -556181 -155810 -721221 -316868
-230635 -54757 98031 -344055
-17763 -633076 -59491
-481365 -706312
-337940

output:

0


result:

ok ok

Test #18:

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

input:

EDBCFA
-769 -471 -912 -910 81 25
-914 -583 860 362 378
-623 795 940 544
-949 -890 -187
622 -75
-110

output:

3
BFA

result:

ok ok

Test #19:

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

input:

FDEABC
-974809 793226 863847 649261 528337 -69648
-848846 -440250 964982 -451573 -178000
986930 -821923 23999 25910
-280034 224626 274668
-974827 333690
-865644

output:

1
E

result:

ok ok

Test #20:

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

input:

DAEFCB
543661 921857 939441 96024 235965 815135
464821 860585 230154 899058 797096
470959 80936 776686 540219
102015 322484 654667
347272 522595
26115

output:

6
DAEFCB

result:

ok ok

Test #21:

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

input:

DABFCE
-124356 -457769 -681405 85717 -871027 -874873
-75221 26316 60984 -584669 -163862
-481270 -285663 -574083 -350159
-597429 -336849 -205235
51133 -952802
-601747

output:

1
C

result:

ok ok

Test #22:

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

input:

EBGCADF
356 513 -665 244 68 637 685
-8 -234 401 147 336 687
255 247 -730 -997 953
-7 -560 460 25
-228 793 -104
860 281
-939

output:

6
EBCADF

result:

ok ok

Test #23:

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

input:

AGBFDEC
212115 -84025 -855099 -471702 -150046 371235 233862
224957 -771417 -617497 -29976 -908141 -681029
-487087 445737 -124742 -565399 -21406
-568066 276389 951681 -905028
-303468 362456 -666378
693926 728015
471101

output:

3
AEC

result:

ok ok

Test #24:

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

input:

GFCEDBA
681486 915666 210585 972310 540136 681765 364074
824268 386504 453634 422445 162900 503226
98804 769660 308101 122305 128418
975921 372884 426702 431683
43195 658080 548942
120438 537379
327987

output:

7
GFCEDBA

result:

ok ok

Test #25:

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

input:

DFEBACG
-55875 -550162 -530787 -233421 -760509 -824107 -945682
-929575 -301003 -959060 -480846 -616906 -214606
-876092 -583857 -973549 -407338 -281296
-902171 -897969 60518 -359630
-649372 -670732 -447577
-338968 -161233
-160291

output:

0


result:

ok ok

Test #26:

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

input:

DHFBGACE
504 -459 -880 -24 -572 -978 776 226
-106 201 -395 343 -392 -980 648
243 209 776 437 -784 -570
909 300 -945 -629 -354
644 -450 215 -63
966 -190 -843
678 945
945

output:

5
DBGCE

result:

ok ok

Test #27:

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

input:

HCGBEDFA
474950 249703 156543 239471 -421463 602542 379320 -188092
459374 -391552 -919808 592819 -134376 6936 -87273
-990525 -564716 315562 999024 -930786 -66249
-692777 -116792 -276718 87496 186201
-404603 -432927 888084 439965
-585906 -100013 -200392
-808421 -290896
598139

output:

5
HCEFA

result:

ok ok

Test #28:

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

input:

ABEFGHCD
370039 174886 211402 855994 434091 551928 670809 447463
963222 843183 468888 531255 349903 974703 665371
649686 380982 490480 842666 232129 757928
139625 44744 543708 995390 672966
688915 89541 913648 539714
456070 452116 377346
382419 408319
771223

output:

8
ABEFGHCD

result:

ok ok

Test #29:

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

input:

CGHAEDBF
-153680 -941934 -739222 38166 -574973 71698 -977709 95485
-704654 -943063 -38885 -339212 -171158 17166 -508481
43617 -308524 -911947 -812796 -620760 -831710
-286155 -871441 89770 -871105 88096
-509415 -926003 -227815 -799085
-288764 -205773 -984401
-305317 91635
-858642

output:

1
H

result:

ok ok

Test #30:

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

input:

GFDICEBHA
-595 -729 -159 -998 -167 245 -290 -285 609
-383 183 -663 336 825 -646 472 -2
773 -20 294 -540 38 -886 -599
748 -636 22 -773 558 -329
-354 -70 694 585 317
-679 -414 -321 -475
819 -222 -368
-340 -989
803

output:

4
DCBA

result:

ok ok

Test #31:

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

input:

HBFIDCEAG
-455238 -945606 704817 -60004 -229576 -464468 -949779 690496 -513846
582105 426613 524327 -554120 821437 901646 803263 -330209
-787052 -449065 -350975 732528 -943397 -473895 -445460
-785333 746288 -79653 -753791 -49272 956200
672689 -11354 519619 -787270 39782
118830 -451675 457859 802230
...

output:

7
BIDCEAG

result:

ok ok

Test #32:

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

input:

GHDBFAECI
174516 599041 611445 394667 157530 285877 500734 282380 992240
539539 442557 829224 41173 786190 579142 381454 400305
8934 526658 174527 679024 76843 849394 733848
352405 693402 7709 894225 862804 860262
965915 136032 635430 821270 85747
853047 524919 788430 951720
1697 405673 263064
24772...

output:

9
GHDBFAECI

result:

ok ok

Test #33:

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

input:

HICEBAGFD
-780150 -285136 31358 -190871 -839185 -579020 -258059 -612894 -274728
-47947 -873144 -802213 -583533 -150018 -309357 -904581 -950325
-622160 -805147 -528112 -596001 -726233 -76984 -100674
-40876 78838 40638 22933 -998613 -127855
-789573 -845863 -364000 53837 -314382
-474534 -138346 -284937...

output:

1
D

result:

ok ok

Test #34:

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

input:

EBFCAIHDGJ
-190 112 -830 -349 299 78 517 -129 -434 959
722 533 730 641 -856 -915 430 605 -325
464 465 -61 -726 955 126 -323 961
94 -159 -932 879 773 -102 -30
835 -602 517 -667 712 -61
-828 65 556 517 934
-76 106 259 -800
769 153 -590
11 626
106

output:

7
BFCAHDG

result:

ok ok

Test #35:

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

input:

AEBGIFDJCH
-363704 -796971 62880 -372810 -946917 -829644 195821 -863897 -981891 950523
383964 -636486 838461 -415013 426479 -738181 -743052 -421355 822832
934800 -339770 -232331 -86952 514625 832033 -405571 -52923
568485 712202 -525415 916380 -449825 657463 -982885
-616268 114372 230427 -249406 -689...

output:

4
EGFC

result:

ok ok

Test #36:

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

input:

FAIHGBJDEC
529189 431610 23839 21526 956216 697687 487484 550476 42489 830703
326422 217377 146326 626666 21949 739986 343425 218649 139308
57689 120298 289264 656069 686382 876217 669144 710527
950208 302517 671251 354778 782897 852071 8845
851530 356426 647001 210125 897213 611821
790482 794674 35...

output:

10
FAIHGBJDEC

result:

ok ok

Test #37:

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

input:

DAGBCEJFIH
-894703 -759541 60652 -572239 -708414 -67895 -342909 -395194 -780909 -407016
-6733 -943045 -649016 -615214 -34963 -645454 37355 -405546 -347335
-910674 -907425 -433591 -417344 57381 -775562 -596527 -352875
-63717 -911589 -499196 -226853 -823850 -887883 -944215
-957227 -516168 -940475 -369...

output:

2
AF

result:

ok ok

Test #38:

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

input:

GKFHJIBADEC
-625 281 -55 616 497 887 -508 -715 959 -909 -427
-862 210 -722 -164 72 -210 -83 -287 -886 597
545 8 -104 -147 -161 918 -994 -622 359
375 670 991 -438 -794 -54 49 983
611 141 -806 -401 -675 -929 36
-693 -275 -873 810 922 807
603 704 -217 717 -535
-68 819 -798 -942
114 -928 -476
416 -28
917

output:

6
GHJIDC

result:

ok ok

Test #39:

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

input:

EFJKBGDCAHI
754639 -138864 -547857 426877 -74965 90732 63453 -597413 915366 473920 124452
475595 -644966 114626 853447 -881347 268834 687750 -936059 -950147 -924393
-7349 872551 539763 508800 832543 -383375 111080 -836639 -781819
777459 718784 -485833 -738575 438975 551696 -261087 -546331
-334017 45...

output:

6
EJKBDA

result:

ok ok

Test #40:

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

input:

CIAKBEDHGJF
556910 759378 704138 61663 587071 525321 560891 131404 786996 290165 624657
72477 254100 230425 686463 228247 159740 631677 583730 587143 654019
42015 420895 365398 588082 933424 680959 228779 248576 704930
934254 211011 271500 160250 274074 72249 64978 190252
855828 805456 896084 363928...

output:

11
CIAKBEDHGJF

result:

ok ok

Test #41:

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

input:

GADIFHJBEKC
-584627 -249475 -368123 35430 39612 -174552 -134625 -157697 -213515 -151152 -113273
-628521 -501938 -884377 -461145 -277788 -73265 -509083 -985126 -911598 -607820
-735049 -423621 -36774 -397986 -529635 -211384 14806 -638928 -983219
-22270 -421321 -498761 -266539 -503377 -494411 -571409 -...

output:

1
J

result:

ok ok

Test #42:

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

input:

CKDLGFJIBEAH
618 415 -329 41 228 -482 -317 -818 414 915 913 -622
-889 291 301 846 17 -993 57 285 51 -987 971
-601 -787 635 -880 402 432 171 -90 -315 -666
667 -112 -527 -380 -490 605 -280 -512 -228
-197 -408 526 -549 721 643 542 85
979 871 -257 164 -986 -409 -539
706 853 -673 373 -838 -601
254 -604 -...

output:

7
CKLGBEH

result:

ok ok

Test #43:

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

input:

JHKAECGIFLDB
-677601 738018 -66240 -742241 945150 -721552 593785 -576202 -459938 640381 -731790 -676185
566613 -844376 -976502 285241 497197 -85455 922758 117914 -574563 -567287 -10040
35713 769042 -771233 836562 500686 872439 857500 -216601 -105158 248968
938568 539250 -190714 509229 258274 -983404...

output:

8
KACGIFLD

result:

ok ok

Test #44:

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

input:

AKFIJBDEGLHC
544665 816440 376453 605556 26462 838301 279858 497942 166464 279946 152648 649144
76810 944313 961746 52949 476934 80735 206551 81763 144553 878070 227840
820116 891978 447195 192311 632149 607094 639738 13287 133223 512486
749242 239468 832473 87590 381436 667825 478758 225900 86349
9...

output:

12
AKFIJBDEGLHC

result:

ok ok

Test #45:

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

input:

KHICFGJLBDEA
-385831 -510299 -691114 -609477 -338413 -985695 -864770 85988 -703112 -896521 -457582 -75584
-911236 -828693 -805654 -48642 -336348 -132600 -574642 -393642 -663539 -546378 -303929
-898227 -597170 -896642 -745182 -143294 -914734 -436357 -692815 -584585 -7586
-601682 -256509 -330536 -7116...

output:

2
JL

result:

ok ok

Test #46:

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

input:

CIMEHBADJGLKF
358 -814 44 551 -596 -943 967 -106 -896 -686 386 266 706
-665 -16 -905 891 -701 300 -687 -534 67 -497 -126 952
129 -153 326 -931 -761 -868 943 -508 -455 719 -22
-176 -11 -645 -49 909 -525 535 790 774 294
-293 297 85 781 -561 -21 -456 763 -272
-859 251 -378 -734 -318 -310 -587 -311
988 ...

output:

8
CEHADGKF

result:

ok ok

Test #47:

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

input:

DMKLIBAFJECHG
664000 235311 596143 892191 459080 -175466 334573 -36482 127610 557707 766867 293641 -772006
210910 -288383 662991 -974094 -638385 660365 -25728 92877 -575962 -490894 486124 667431
164470 247451 115305 665069 -954281 -671659 868108 -659100 670579 811944 293066
409301 -614786 -961126 82...

output:

5
DKLIC

result:

ok ok

Test #48:

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

input:

BHLIJKDCGAEFM
758929 770808 352541 386427 350298 767677 147937 16427 712877 223080 735621 395473 490667
511959 671369 100094 119648 706411 748867 925271 349245 101514 244596 499466 540856
52033 702553 154142 883995 701729 125311 790788 89737 749652 962463 392209
350272 416652 182677 89265 604653 114...

output:

13
BHLIJKDCGAEFM

result:

ok ok

Test #49:

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

input:

KHDMCEBGJLIAF
-612396 -116189 53185 -547515 -594425 -287354 -307256 -363438 95986 -361157 -564816 -678658 -521080
62175 -64689 -390089 -338679 -285194 -983971 -883694 -825268 -985946 -630343 -446070 -459577
-676897 -620603 -146369 -80295 -738340 -482287 -489035 -318246 -293283 -547853 -354700
-65272...

output:

1
H

result:

ok ok

Test #50:

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

input:

MICHKDABJLNEFG
-188 -127 715 -375 21 -320 -861 -809 -561 608 446 112 -600 -937
-100 613 -40 -153 993 -437 990 635 -363 -501 -861 -108 96
-307 168 -830 -252 -113 -878 -132 -619 365 -837 -246 794
693 41 219 -521 -900 128 377 -884 37 -267 -212
80 -400 -553 993 -948 -390 853 -77 -239 555
-511 960 -58 31...

output:

8
KDABNEFG

result:

ok ok

Test #51:

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

input:

FJEIBGLANKHMCD
256481 651721 -319487 830409 444283 996355 -638240 -795803 699984 159861 566251 -137744 -5686 -116114
884569 -548905 -120906 217848 134365 123204 -667451 881900 689860 -989641 -494842 393735 -933711
-471556 -303628 578542 175775 408202 -486078 195832 -803060 278797 -224561 -547703 -61...

output:

10
FJIBGNKMCD

result:

ok ok

Test #52:

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

input:

NDFEGMCKBLIAJH
345726 927277 665655 94284 790342 41965 43771 512402 803963 459390 18010 266663 228967 756364
832767 583170 719937 132335 918238 782991 547786 712225 567543 899593 602046 580473 563007
214085 262001 130773 748513 606954 273324 549840 978299 561940 135206 765214 32507
842501 479361 629...

output:

14
NDFEGMCKBLIAJH

result:

ok ok

Test #53:

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

input:

JLCNAEHGIFBDMK
-669496 -677585 -653544 -76861 -326491 3631 -626295 -431975 -20985 -75857 -157379 -79213 -33199 -758666
-614926 -342740 -61698 -890048 -970803 -715475 -410164 -924021 -540703 -792052 -690971 76590 -267014
-196352 -309239 -720700 -224411 -263231 -747525 -483010 -958748 -238196 -60464 -...

output:

1
H

result:

ok ok

Test #54:

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

input:

HKNJDACLEMIBGFO
-667 852 387 494 -286 -984 68 -65 -371 108 779 842 -634 -934 357
671 -749 -302 378 -815 -421 900 687 585 -118 923 -529 178 -672
-262 -796 -347 -881 -164 829 205 741 -326 690 942 -161 217
358 898 160 410 72 -996 855 -626 -695 -741 580 19
-605 608 538 570 139 355 296 -844 665 950 254
-...

output:

11
HKNJDCLMIGO

result:

ok ok

Test #55:

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

input:

NJABOKFIEGHMLCD
-715771 -528260 -808964 -192566 -217533 440005 -36478 -605048 -64129 569158 -406513 314522 -497690 468938 -720948
870500 142196 971795 942991 667164 531005 816472 -746622 -295154 -328368 53334 897998 -853409 204100
-727293 -198639 -1100 -242360 335503 34670 -282871 -148676 117785 341...

output:

8
JOKFIMLD

result:

ok ok

Test #56:

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

input:

KFMICOEHABNGLDJ
734366 107417 747004 390055 31593 455043 895740 999548 457349 169851 916973 62699 550897 416995 159893
495493 422246 150453 962310 300484 167868 801980 856046 399419 441480 361396 379122 991976 395037
879174 491549 376253 339407 625117 640968 305328 207650 227839 384854 581481 260595...

output:

15
KFMICOEHABNGLDJ

result:

ok ok

Test #57:

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

input:

MBAHJLOENCGFDKI
5557 28561 -518708 -497318 -778038 -635798 -63006 99740 -264086 -92830 -27165 -969192 -586148 -593682 -450224
2369 12830 -122264 39461 -833808 -782442 -608060 -266038 -681005 -472050 28464 47981 -288631 -52870
-414119 -972607 -98763 -539066 -597946 -631585 -642036 -180611 -75044 -695...

output:

1
L

result:

ok ok

Test #58:

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

input:

NHLCBKMAPJFGODIE
522 -162 746 488 -130 -680 -855 -513 -844 219 292 -29 535 682 -978 -339
485 -742 757 -856 -660 888 625 -984 201 854 -625 -577 -447 295 50
161 670 -549 208 -992 396 762 -608 275 780 -241 -979 318 -240
338 -304 -88 131 873 608 -562 -785 331 -467 653 733 417
272 -514 779 -764 -867 436 ...

output:

10
HLCAPFGOIE

result:

ok ok

Test #59:

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

input:

NGBCIDLFEHPAJOKM
-435044 743350 781319 912394 309612 723143 -818654 913438 -111768 -713064 720718 -639078 354847 -390724 -741609 -628540
20853 418592 -278558 708629 645944 -640509 351458 -480122 -322463 -646594 611937 974770 374317 -119900 -694799
-294559 681225 -914619 -842188 493875 -725695 -41772...

output:

9
NGDFEPAJK

result:

ok ok

Test #60:

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

input:

GDHPNFEMKCJLAOBI
12339 580929 728047 345409 863769 910045 658055 891132 577329 474286 839452 751275 868249 627506 543303 101615
221278 568799 687136 84859 87307 68850 241489 163451 996413 311941 428091 887253 479554 64497 385882
203447 370004 672336 961053 787913 558140 311087 50255 399800 216306 75...

output:

16
GDHPNFEMKCJLAOBI

result:

ok ok

Test #61:

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

input:

OGKPEJIDFMNCLBHA
-102814 -203906 -458401 -904684 -268323 -643582 -696082 -540784 -607821 -614393 -663738 -55739 -836739 -575607 -436973 -957794
-945669 -841559 -625601 -558804 -223848 -854287 -608240 97646 -759104 -673043 -619383 -55835 -743736 -721273 -930322
-325870 -636631 44099 -519894 -721948 -...

output:

0


result:

ok ok

Test #62:

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

input:

AKPIGDEONHMBLFCQJ
436 990 -447 622 -556 -726 -648 811 662 -459 -480 831 753 505 954 -583 477
121 897 -728 760 395 -500 798 -556 268 -299 -870 622 889 -319 -638 531
179 -481 976 -567 972 540 -269 984 812 588 679 457 872 38 -212
-767 53 687 235 -819 -207 -355 319 -735 886 441 -67 -831 -554
657 -131 -6...

output:

11
AKPGONBLFQJ

result:

ok ok

Test #63:

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

input:

AJNBKCDQELMGHFOIP
462785 242680 -968242 -260553 275080 886669 502111 209187 -965051 -846670 435372 -60745 -785788 445072 -458687 -386880 -991210
-245551 -283586 -668479 -129801 508166 222741 565046 823365 -48591 74399 437374 119692 337161 31196 -66372 639286
-644920 793840 -237336 -710555 -287784 -3...

output:

8
JNKDEGFP

result:

ok ok

Test #64:

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

input:

PQHLKNEAICGOMJBDF
133776 374492 343211 567631 103720 1846 374571 983510 783185 405459 207356 84324 245840 748728 960054 960825 463683
576901 23019 262846 469221 121712 328159 378549 786296 252000 557694 926269 540643 353258 67282 433356 693042
65854 446884 910111 768794 169863 908115 614795 416565 8...

output:

17
PQHLKNEAICGOMJBDF

result:

ok ok

Test #65:

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

input:

MQDAEGCJHFPKONBIL
-455955 -783760 -301021 -572332 -959138 -611180 -657097 -164173 -309556 -107706 83612 -831102 -452892 -10711 -816807 -806328 97974
-808045 -951430 -937064 -535524 -847463 -223798 39657 -929473 18420 -365682 -622419 -992080 -74933 -287079 -729716 -919806
-146425 -798911 -634017 -766...

output:

1
B

result:

ok ok

Test #66:

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

input:

DEFBHONLRAPKGJCMQI
114 296 791 200 -234 275 -129 -719 253 239 359 -17 513 784 -275 201 280 -279
817 -701 244 -71 663 292 762 -473 -518 -456 -42 -723 865 23 -539 -197 414
791 95 344 -312 476 -173 15 -589 -965 751 413 916 309 920 -543 475
-399 920 186 -797 145 -173 50 356 420 -632 -820 419 -232 -385 -...

output:

9
DFHNAKGJM

result:

ok ok

Test #67:

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

input:

IHLEAMRPBFJKGCNOQD
210806 -257892 -78541 907233 597286 -116244 -12482 258922 -687725 924675 -847469 795549 -779027 888340 -432980 48113 920637 541897
495524 223254 -630596 -423714 402676 961016 -772563 -468980 353319 -882157 -647910 -996099 -899543 615188 128105 -307211 -916671
-789602 -313826 89032...

output:

12
ILEMBFKCNOQD

result:

ok ok

Test #68:

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

input:

OLDKEPGAMBCIJQFRHN
10407 177761 197209 194106 753333 460529 647769 734422 25920 486173 585449 561847 846782 678554 250680 653747 139976 645331
38782 477297 136219 120902 533116 291415 391679 449430 927803 978817 246162 571845 966811 834385 417066 220683 464518
598309 174076 18385 235158 241486 97499...

output:

18
OLDKEPGAMBCIJQFRHN

result:

ok ok

Test #69:

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

input:

PIFRJDHCQEALGMOBKN
-194144 -970074 -38894 -899034 -804691 13455 -48709 -141745 -928174 -317136 -739035 -515797 -913417 -523904 -196123 -951700 -32785 -13231
-334670 -100586 -829818 -897872 -94313 19473 -104642 -444528 -226324 -312848 60136 -923257 -731090 -48787 -458697 70010 -941364
-196454 -508507...

output:

1
L

result:

ok ok

Test #70:

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

input:

CFBMGKQLSORADNHIJEP
-335 -199 881 -744 -562 -524 -895 -523 -840 -768 -1 -45 607 315 -17 -990 367 916 -891
-9 -475 -641 -349 -835 -361 500 -641 -826 -557 -44 53 735 483 -203 -62 350 -359
101 -957 -555 92 -342 154 731 611 -876 268 954 -847 651 -527 -57 -382 -385
745 644 700 621 -746 189 536 -576 -807 ...

output:

10
BMKQLSODHI

result:

ok ok

Test #71:

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

input:

JMKBNOEHQDASLCGPIRF
310774 37441 -647157 783167 -915143 90439 -304237 -192447 721645 -270711 -207508 385795 972363 365131 734592 -532301 -276790 283231 246926
220450 230956 488554 -122577 879572 -32450 742103 -3227 600958 -666865 -79513 -560130 -674205 343838 -623912 797402 217629 816093
105434 7690...

output:

14
JMKBNOEHQDSLRF

result:

ok ok

Test #72:

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

input:

QDFIBGANKCMJPEORSLH
812375 999772 856706 373965 502652 824933 760541 873974 225170 267902 89932 351125 893933 297820 53699 673929 397352 769905 773564
130 408117 95220 202437 54276 362042 732902 575055 741323 668099 963801 363265 689032 269035 684983 144690 38948 722645
751937 183174 689433 236580 8...

output:

19
QDFIBGANKCMJPEORSLH

result:

ok ok

Test #73:

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

input:

KRCABSNPHIQJGOEFDML
-947096 -15005 -740362 -983253 13993 22399 -50665 -912699 -580756 -685003 -53587 -878694 -699914 -435374 65306 -332971 76116 -514984 -778323
44964 -919 -767191 -363569 -321166 -612234 -557116 -617442 -613068 50918 64651 -242179 -337261 53652 -717233 -572794 -37056 -967630
-686834...

output:

1
R

result:

ok ok

Test #74:

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

input:

AGRTFEJCSBDHIONQPMLK
66 977 -648 494 -619 -746 -570 649 -711 -690 48 907 783 -598 -240 -736 928 514 202 -55
732 546 -310 352 -782 500 629 -94 -506 277 530 766 -431 457 -573 643 957 312 -257
343 -570 402 -769 -339 -860 480 667 -257 106 -850 -661 512 800 863 -375 853 584
-82 -877 -451 740 50 -617 -252...

output:

13
GRFEJSBNQPMLK

result:

ok ok

Test #75:

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

input:

FPOKJAHMBSLICDGRNEQT
999937 801004 -279435 -934075 -703687 36796 960596 -637852 -793396 -303429 -289804 -598585 385133 -956142 377892 298494 407412 -534875 288552 -89365
506000 971197 805382 -709068 476972 -3897 736497 -631959 -440041 762854 707748 -273667 716182 -677319 -125528 -595663 -90703 61289...

output:

12
FPAHMBLCGNEQ

result:

ok ok

Test #76:

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

input:

HMEIFABLKGSNQRPTJCOD
987978 566256 547948 23984 632164 139053 241883 785466 594101 541222 917550 699397 380304 590952 167726 920767 425231 5339 9275 559827
467342 587178 220151 882476 728282 932336 655814 73298 663818 844751 357278 155909 921761 866386 244792 836421 784471 648151 631388
223004 40127...

output:

20
HMEIFABLKGSNQRPTJCOD

result:

ok ok

Test #77:

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

input:

PRKNAQJTOFHELCDIGSMB
-414960 -413616 95593 -289447 -427579 -694300 -958716 -436292 -100717 -365653 -421891 -850698 -428424 -588689 -784739 -68040 -306016 -809408 -413492 -366672
-887548 -315953 -407029 -171219 -898798 -677436 -139295 -598044 -693366 -516489 -522687 -691687 -400645 -795722 -269155 -5...

output:

1
M

result:

ok ok

Test #78:

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

input:

QTSNGDOPUCMHFBIAERLJK
-126 -872 391 -629 970 -34 -301 -708 -284 -601 713 604 -346 83 702 -760 370 -366 721 -718 -651
-821 738 -692 -387 -253 509 -887 -382 100 -693 -119 139 -244 340 -649 761 708 -231 39 -483
-510 714 -574 -411 879 774 -672 879 920 198 -932 -791 971 222 317 208 646 252 -831
-574 989 ...

output:

13
QSNGOMHBIELJK

result:

ok ok

Test #79:

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

input:

KPCBMANQRIEHOJTLDFUSG
-197535 504260 381728 -265034 -920724 443648 255971 65393 -788877 632247 -578992 348463 258889 -954595 535322 652921 955886 16185 250714 -165009 803835
83989 785814 928075 -246559 -56800 628041 980301 75484 225967 449688 788556 430078 -526707 -550461 -365267 29727 373321 -68533...

output:

12
KPCMNQIEHDSG

result:

ok ok

Test #80:

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

input:

AMRPUKTCENLODSJGQHFIB
941113 494629 951972 521709 793698 130699 348260 559622 817180 102031 419761 379366 490464 104000 407654 806774 884120 915448 488099 529849 726213
127579 125769 504359 824613 446142 708896 90455 335187 34584 794463 313405 814399 266792 816548 900427 425521 594190 570823 369695 ...

output:

21
AMRPUKTCENLODSJGQHFIB

result:

ok ok

Test #81:

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

input:

GBSLOFRQICPJETNMKHAUD
-77236 -402241 -611688 90543 -343972 -91937 -583475 20347 -166674 -519164 -735152 -411330 -840311 -80953 -326573 -478922 -739790 -450452 -889032 40303 -667925
-388091 -214128 -471322 -62036 -80768 -122973 52302 -236199 -414925 -709997 -220830 -121245 -819905 -457111 -811388 -79...

output:

1
H

result:

ok ok

Test #82:

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

input:

LMKHFTABPCUQDNREIGOSJV
-739 -277 -489 274 -784 189 -500 -578 80 510 955 -825 738 215 -248 -75 314 -725 319 499 -955 -964
-983 359 266 887 877 571 -332 -228 981 191 -430 -907 657 -695 -204 980 582 -204 -696 423 -345
625 560 -689 -8 -160 918 -407 -97 -329 199 -779 -867 -297 -381 -524 772 -507 -253 -52...

output:

14
MFTABPCUDNISJV

result:

ok ok

Test #83:

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

input:

ICVUDSFBEMARTGNQOLPHKJ
484090 -149144 648672 465087 659271 -545617 -702706 -300429 -27497 -221954 508422 -246818 -370525 931530 903879 -43846 -569804 -470974 652356 -409632 -204804 -116300
36214 -929361 701849 252372 -938136 -489357 -738528 -905140 483867 828937 216271 94155 -716233 600634 153016 -3...

output:

18
IVUDBEARTGNQOLPHKJ

result:

ok ok

Test #84:

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

input:

TDNJPRBLUECSGIVKOHFAMQ
75523 289082 151240 290963 949015 760177 132472 648353 208359 719642 567949 964938 434180 2190 983249 880 838591 165974 276198 960074 538014 845728
249989 938836 785524 585832 418495 841515 624418 965169 462415 158187 349232 852314 833940 464438 187335 111737 437082 289792 950...

output:

22
TDNJPRBLUECSGIVKOHFAMQ

result:

ok ok

Test #85:

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

input:

GMFPHNIJQAESRUDOLBCTVK
50113 80206 -684016 -19675 -363536 -901412 -201756 -440860 -715029 -291454 -960486 -423597 -782257 -397824 -997027 -58339 -365792 -721186 -43116 -548692 -856266 -492894
-414068 -640889 -712835 -710978 -101091 -386359 -277335 96500 -885284 -233017 -886660 50147 -418470 -468605 ...

output:

1
G

result:

ok ok

Test #86:

score: 0
Accepted
time: 11ms
memory: 3788kb

input:

AHVDGSCUORQEJMTPFLNWIBK
-747 -994 721 -617 -131 -530 -742 -434 576 -546 826 -530 137 974 -878 -999 -791 -838 218 600 137 -889 -479
749 -859 433 -950 268 437 -711 -11 200 107 -277 304 -500 -716 -550 179 -784 526 -568 -309 23 -52
497 -237 68 164 679 -79 -202 -241 717 -700 -34 -32 -341 -712 530 956 248...

output:

15
VDGSOREJMPFLNWB

result:

ok ok

Test #87:

score: 0
Accepted
time: 11ms
memory: 4000kb

input:

FSAELDBGOVMHIJWCUNPQKTR
580854 468162 -162586 12651 -719192 108125 -943298 941318 -701954 -357127 -818713 -266661 617379 -547240 647314 -608609 305159 882217 290175 -822058 -221283 323433 -674965
611389 37620 873075 -163843 617360 -190049 258136 -718565 853189 -64844 721464 -233651 -719985 263518 56...

output:

13
LDBGOVMJCUPQR

result:

ok ok

Test #88:

score: 0
Accepted
time: 11ms
memory: 3788kb

input:

RWBHOJGTPLSMQENKAVUICFD
694829 11793 738714 610260 950255 222056 836023 844154 214800 102763 563022 527979 465953 665298 989857 388091 317540 509916 862146 408116 760322 125739 982520
170624 359 275543 591178 511476 927651 393351 655340 197213 475921 691037 712931 580209 211180 757332 521949 8497 59...

output:

23
RWBHOJGTPLSMQENKAVUICFD

result:

ok ok

Test #89:

score: 0
Accepted
time: 11ms
memory: 4000kb

input:

JOCNQGWBSHUPVRMEILKFATD
-246164 -762883 -602170 -750911 -527362 59984 -107504 -705271 -750920 -112577 -258155 -10353 1194 34293 -360217 -83697 -889949 -35975 -788575 -953050 -579342 -232890 -243885
-588273 -534436 -724238 25374 -791255 -272062 -62125 -833943 95057 -227008 -466490 -296991 -191995 -15...

output:

1
T

result:

ok ok

Test #90:

score: 0
Accepted
time: 21ms
memory: 3708kb

input:

GEHNISBOQVJLXFRMTKPDWCAU
-589 -902 331 491 686 183 750 786 758 743 81 774 -501 -459 698 -808 -986 -840 -698 326 -739 -471 -559 891
-777 763 743 -379 -105 -350 -196 442 -408 466 -192 623 27 18 874 936 -64 -371 124 98 312 354 387
-669 -332 -689 430 -473 264 -764 -237 -850 -133 -657 880 347 809 291 373...

output:

12
GNIBOVJLMWAU

result:

ok ok

Test #91:

score: 0
Accepted
time: 21ms
memory: 3776kb

input:

OKLWJTPGUICXFMBSNHRQEAVD
850923 -863317 545027 441113 248630 390081 995059 11318 26090 314737 -237527 -98202 668067 98267 -851847 -923107 -860262 -608762 -732327 -274101 456583 567532 43135 -194158
438853 460779 409429 -593018 198871 -409162 -829021 235774 -68752 674998 -482110 300050 628950 816797 ...

output:

14
OKLWJPGUIMBSRE

result:

ok ok

Test #92:

score: 0
Accepted
time: 21ms
memory: 3780kb

input:

WFKEVMHJSRDQUOBCITPNLAXG
564461 195243 198083 793 322955 101064 863910 579993 327603 335986 585071 683462 158780 219929 556196 61025 144003 988107 583799 88480 542368 119769 678440 257016
434339 651262 469561 808490 607936 780721 659027 384138 460204 223781 698532 763632 442160 645744 313676 29218 7...

output:

24
WFKEVMHJSRDQUOBCITPNLAXG

result:

ok ok

Test #93:

score: 0
Accepted
time: 21ms
memory: 3792kb

input:

RPDSIUCLWHFAEQBVXOGKJNTM
-662820 -764001 -406237 -74533 -861324 -88719 -179746 -543993 33226 -166225 -298045 -505927 -567228 -972715 -189669 -414788 -846238 -799644 -882837 -596557 -544414 -650361 -999819 -327951
-280023 -508815 -29967 -915086 -54917 -235527 -914672 -341031 -50157 -42595 68120 -4568...

output:

2
WB

result:

ok ok

Test #94:

score: 0
Accepted
time: 41ms
memory: 3836kb

input:

WIMVBAJOGNFKTQCRUSYHXDELP
417 -174 344 -17 403 -161 -162 -859 -829 794 -47 582 -589 -670 116 337 748 -232 474 265 267 -525 445 -531 339
580 -953 -676 826 -953 712 789 623 -487 510 -65 -758 -867 787 -606 711 -340 257 -730 -24 906 41 -124 -849
-192 722 640 126 745 471 -626 783 889 606 71 -862 678 103 ...

output:

20
WIMVBJOGNFKTCRUSYXLP

result:

ok ok

Test #95:

score: 0
Accepted
time: 41ms
memory: 4036kb

input:

KYGQUXNAJFSCEDWHBTILORMPV
-725581 438568 -127394 360525 339422 -363685 585651 99579 -446229 446563 -460151 -567901 -140097 -82512 -640612 -373248 -359194 -374775 607998 -460389 435158 972530 -330342 611453 656276
-513017 -995608 -961359 785960 432613 135404 431799 -654012 -681089 -47817 366771 -8989...

output:

20
KGQUXNAJFDWHBTILORMV

result:

ok ok

Test #96:

score: 0
Accepted
time: 38ms
memory: 3996kb

input:

RVASTWXHJYEPCGQLMIOKBNFUD
397514 63341 568858 348302 951329 381001 533369 508892 685780 127435 31283 643383 478303 285467 99783 481824 353451 35751 150666 113697 328431 484766 875086 281943 210867
888580 477471 481165 536357 745797 596815 459024 684358 700332 845337 164379 808819 308872 654642 94687...

output:

25
RVASTWXHJYEPCGQLMIOKBNFUD

result:

ok ok

Test #97:

score: 0
Accepted
time: 41ms
memory: 3764kb

input:

VONBTPXHAIDLFYRQESMGWKUJC
-70403 -712432 -657625 -285390 -282072 -15175 -514127 -502661 -24803 -410759 -448804 -55537 992 -33207 -471821 -804492 -813169 2481 -521705 64491 -299549 -956442 -643235 -566551 1740
-80210 -14415 -969217 -5416 -833803 -230551 -371268 -468741 67888 -226189 -483940 -553999 -...

output:

1
F

result:

ok ok

Test #98:

score: 0
Accepted
time: 81ms
memory: 3980kb

input:

QRMDFGWSTNPAVKOJHECBXUZLYI
-276 -745 554 -712 -318 -995 440 -690 -95 -883 383 -875 781 10 9 447 150 414 187 -167 584 591 -537 783 -852 950
-116 -78 -461 559 816 -51 -451 -44 18 -680 123 36 -775 661 197 -942 243 226 -475 -745 -419 398 184 -99 -736
628 -869 784 63 -788 234 968 660 833 285 356 750 -63 ...

output:

20
QMDFWSTPAKJHECBXUZLI

result:

ok ok

Test #99:

score: 0
Accepted
time: 81ms
memory: 4012kb

input:

WTUBVHSZGRXPLJYODKIFCMNEAQ
-828994 -287820 -791954 39663 -823072 633811 351467 909753 784606 142909 363629 996232 571553 -384844 -528914 -238042 736394 319902 191944 -605387 -886393 398455 -204313 -950842 600141 -853568
826226 714809 -932835 -791086 -772639 357317 -854576 701262 224148 -781183 -9290...

output:

18
WBHZGRXLJYODKIFCMN

result:

ok ok

Test #100:

score: 0
Accepted
time: 81ms
memory: 3824kb

input:

YRQAUGKTSNBOXCJLVZEDMFWPIH
967740 146195 136920 624568 920526 406633 936118 191799 982373 659355 554068 313370 608691 882065 279933 515942 875593 639828 611292 972167 699770 363996 23432 700097 453764 939529
391534 694680 425469 108134 286565 367796 435363 112911 254974 199342 277154 732996 623568 7...

output:

26
YRQAUGKTSNBOXCJLVZEDMFWPIH

result:

ok ok

Test #101:

score: 0
Accepted
time: 78ms
memory: 3976kb

input:

OENSPQDZJKGTVMHWUIYAXBRCFL
-762122 -910126 -522116 -799321 -192816 -127714 -560333 -477765 -745586 -221496 -132605 -395802 -317900 -911767 -683249 -33294 -515939 -466444 -696896 -46296 -700429 -238708 -98118 39465 -273811 73515
-290608 -801873 -828327 82195 -347330 -514530 -335729 -368828 -630858 -8...

output:

0


result:

ok ok

Test #102:

score: 0
Accepted
time: 175ms
memory: 4120kb

input:

NTSLJFPGZKODVUMEIY!WXBAHQCR
431 -543 452 745 -573 -37 -968 -289 787 -28 869 963 -830 -157 -145 708 541 343 702 -697 59 335 292 691 954 497 -331
454 187 -174 -928 825 637 -953 -292 63 829 -275 -247 -182 -795 -644 290 716 -9 -779 138 -763 558 -335 204 -745 964
-913 947 963 931 984 -473 -386 -256 153 -...

output:

14
NSLJPZKDI!BAHC

result:

ok ok

Test #103:

score: 0
Accepted
time: 175ms
memory: 4220kb

input:

LQZTNOJCXGUPVRYSKBAM!HDIWEF
-818123 131219 -871004 -73653 488019 709452 222891 60208 -127245 584942 -81383 -204932 382720 -984542 -406021 532257 673293 986321 958779 -965414 20126 -240147 -210337 488188 390495 -768201 -385479
-75658 85764 -612423 -63075 632612 646148 -290685 -788729 967065 -468544 -...

output:

15
LZTNJCXPSKBHIWE

result:

ok ok

Test #104:

score: 0
Accepted
time: 175ms
memory: 4160kb

input:

HFVDLPZAGYUBRCWMJTN!KEIOQXS
923731 153046 211555 252446 799842 346285 188463 574639 717076 684182 338210 311294 460834 544154 524895 940182 565064 668965 807632 463576 445958 500113 119715 839129 379265 926488 178405
981009 688356 910764 203260 353757 737308 212945 71008 363382 901679 202938 495733 ...

output:

27
HFVDLPZAGYUBRCWMJTN!KEIOQXS

result:

ok ok

Test #105:

score: 0
Accepted
time: 175ms
memory: 4152kb

input:

ABHYPCMLKIZ!SGOFTXREVQDUNJW
-369609 -189551 -711532 -657751 -389126 -561553 20170 -619208 -490315 -474768 -544215 -201534 -732545 -497566 -759603 55158 86658 -21162 -757826 -539238 -350787 -862479 -644761 -845642 -108292 -191749 -525489
-481263 -268694 -422626 11775 -416964 -546768 -374853 -192089 -...

output:

1
C

result:

ok ok

Test #106:

score: 0
Accepted
time: 348ms
memory: 4268kb

input:

HXDIOGFVBUL?SQJTCYPNZK!RWAME
178 146 -549 -909 395 371 -508 -240 385 -70 115 -42 -339 -202 529 741 -339 -808 611 912 -509 -570 -719 336 -388 -952 805 967
-422 -748 -142 616 193 -567 -279 348 -655 -573 374 -241 -653 -692 826 539 728 813 -346 611 132 -886 725 514 -196 -174 142
-632 -511 60 -195 -943 4...

output:

20
HXIOBL?SQJTCPNZK!RME

result:

ok ok

Test #107:

score: 0
Accepted
time: 348ms
memory: 4120kb

input:

MRBGASQXF?IZPYNWUHVTCLOE!JKD
-989916 656301 -989983 237317 -578719 389450 590964 -857488 297474 -951087 -588083 -615584 562658 788379 393568 689833 -131864 591227 438393 333830 580622 842254 229525 -36032 351307 -380264 -320135 817214
-72826 -480609 22869 -588945 -964574 364378 -983398 -658654 60672...

output:

17
MBGSXFZPNWUVCLOED

result:

ok ok

Test #108:

score: 0
Accepted
time: 348ms
memory: 4072kb

input:

CG!ARZSITDKQFUMYLENHO?XJVPWB
125423 411898 724318 804120 590778 758512 50278 325251 363001 367776 705701 665651 560346 799152 328136 593714 449472 35859 970638 989015 281573 368380 130973 678256 901130 551258 378228 903851
918999 463629 296618 901826 258712 843296 614196 553383 168435 410344 912598 ...

output:

28
CG!ARZSITDKQFUMYLENHO?XJVPWB

result:

ok ok

Test #109:

score: 0
Accepted
time: 349ms
memory: 4100kb

input:

VWFXTKEANQJYMRZBC?IHDO!UGSLP
-220458 -461325 -85769 -552690 -67302 -222773 -981430 -612942 -356642 -33668 -157165 -582838 -290253 -827136 -184549 -891076 83910 -589958 -314472 44085 -943231 -543140 -933264 -881133 -861042 -514745 -441165 -934447
-79740 -654213 -253793 -984915 -260192 -332300 -968662...

output:

1
A

result:

ok ok

Test #110:

score: 0
Accepted
time: 628ms
memory: 5456kb

input:

QENPOYTG?!CHRZJVAXBLDIFMKSU@W
-295 -149 -649 576 367 618 -758 998 239 633 402 -150 -674 509 779 -593 429 -636 344 -630 266 705 -159 246 -737 -603 967 846 -460
-612 83 919 886 418 345 943 266 -972 -984 568 396 -236 -821 403 -598 568 664 230 -25 969 903 52 -532 190 68 92 -504
685 -488 463 275 -880 100...

output:

19
QENPOGCHRJVAXBLIFU@

result:

ok ok

Test #111:

score: 0
Accepted
time: 629ms
memory: 5472kb

input:

BWVKUIX@FOQGRDHEPZYST?ALMN!JC
-511828 550806 -728285 -52984 -719371 135878 -537136 828350 -662704 806112 717411 869291 -166424 179678 211051 -699118 248566 238607 913599 -604257 425775 593916 546729 -522950 -737175 451493 360608 482110 953644
399713 521291 538681 -468036 570501 -11809 807406 -594689...

output:

18
BWKI@OGDHEPYST?LMC

result:

ok ok

Test #112:

score: 0
Accepted
time: 628ms
memory: 5276kb

input:

NX@GEURKJQPYWHOBTLID?ACVZMF!S
159758 184448 391487 980462 101826 259194 70135 694331 480181 258797 425168 185778 84629 426911 963064 214033 542561 882344 183783 169104 18574 116138 416373 450206 317181 425081 988355 914391 968171
403501 816094 121058 477325 138822 805391 801003 864574 897339 573994 ...

output:

29
NX@GEURKJQPYWHOBTLID?ACVZMF!S

result:

ok ok

Test #113:

score: 0
Accepted
time: 636ms
memory: 5272kb

input:

F!JVMKAGQDZHNCOSXPW@?LIBYUETR
75805 -804932 -403861 -925819 64142 -916449 -904977 25934 -261512 -363919 -579798 -988038 -77618 -960753 -368448 -249643 -903346 -955931 -9840 -390053 -412180 -86489 -298952 -181946 74334 -1360 59463 -831417 -200235
-362591 -950248 -383537 -16824 -484707 -901440 -201339...

output:

1
F

result:

ok ok

Test #114:

score: 0
Accepted
time: 1264ms
memory: 5668kb

input:

QFUK!BTEM@C?GOJWIAVYNPRDLZH*XS
-748 -230 -72 -169 991 488 261 -292 479 99 440 616 148 -517 850 -88 245 795 527 -364 0 561 728 134 581 696 -520 78 831 -705
430 -656 -113 -963 -256 779 -930 -266 -164 -606 -698 -530 463 -957 -477 -51 876 -673 -533 598 -468 -218 -579 -14 271 858 394 527 785
-960 839 -31...

output:

21
Q!BEM@GOJIAVNPRDLZ*XS

result:

ok ok

Test #115:

score: 0
Accepted
time: 1268ms
memory: 5520kb

input:

KA?PLUETNFWBXJYSQRMCI@H!GOD*VZ
-982 748 -197 785 103 282 132 -112 -399 641 -660 -253 -694 42 -342 -367 21 -95 -831 -303 -114 -959 -419 560 408 404 860 286 -913 829
444 254 -666 -905 265 880 513 -152 -55 821 515 -954 799 -278 -973 -307 -202 66 -610 -781 -422 -474 850 -98 39 147 -756 -897 160
175 -568...

output:

21
KALUETNWBJYSQRCH!OD*Z

result:

ok ok

Test #116:

score: 0
Accepted
time: 1267ms
memory: 5660kb

input:

LRM?F@ZVDOHU!TJC*YINXKABPWQEGS
195 -654 214 726 -855 -707 393 919 803 664 -269 -329 296 36 144 -304 197 495 -19 -959 -720 -624 -140 -224 797 -848 763 481 408 -464
-745 -851 -650 -671 -260 903 -603 665 -338 -842 -57 -379 -987 -389 -18 829 532 661 -275 389 -180 -348 4 552 166 -883 -201 873 -852
-472 8...

output:

17
LFZVDHUJC*INXBPQS

result:

ok ok

Test #117:

score: 0
Accepted
time: 1270ms
memory: 5540kb

input:

R?EMXD*PQKJGLAVIHZNSF@OTWUCY!B
169574 80951 182126 -164130 -203108 -338642 845092 -603112 -851169 -118973 646540 669505 -253305 -400367 339539 775366 -91879 546461 -30296 1733 -181843 172244 -950534 -754812 -567651 383447 -506809 983375 515210 3181
-351392 -728246 -130284 -47908 937754 931954 -19462...

output:

20
REMXDQKGVIHNSF@WUCY!

result:

ok ok

Test #118:

score: 0
Accepted
time: 1258ms
memory: 5676kb

input:

UBAHSCD*WFZ?LTPJEM!GKRIVQYXNO@
-241263 708061 566488 80843 -130112 314968 710560 274129 -319581 -869061 644819 466997 -92324 -185495 864156 238028 -7550 683143 499703 81642 -756027 260404 866211 643582 -96456 -199117 124566 472115 -964728 103508
-377407 -899855 -497839 -136513 -340254 -100175 -15567...

output:

19
UAS*WF?TPJEMKRIVXNO

result:

ok ok

Test #119:

score: 0
Accepted
time: 1267ms
memory: 5672kb

input:

VE!CFHQOG@MRYDTNWJKIBZSPL?UXA*
410709 179870 1581 -745069 469351 -816943 130546 501963 497464 528688 -839392 -12322 -111242 635010 643596 457982 -227587 -200347 -147034 407226 161494 494550 -78172 -49186 -688485 103423 -708790 286385 969914 137764
-968204 -705881 -730290 -984880 -419677 -428242 -749...

output:

20
VEQOGMRYDTNWKIBSLUA*

result:

ok ok

Test #120:

score: 0
Accepted
time: 1265ms
memory: 5548kb

input:

@XGKH?NROIZLPFMUBSEW!CV*QJTADY
885666 858652 72973 137321 605590 156707 876799 558954 19706 284522 227575 84757 711480 161160 641169 764792 950774 392838 452203 850467 127323 9937 558765 235007 899142 524049 194905 257877 972961 410412
144399 837944 506314 559023 51742 211640 851974 704859 700191 94...

output:

30
@XGKH?NROIZLPFMUBSEW!CV*QJTADY

result:

ok ok

Test #121:

score: 0
Accepted
time: 1266ms
memory: 5516kb

input:

M!TNEX*BPF@YQDZSRVHKAUJOLCGIW?
814969 207078 106877 576829 659814 523537 159208 11890 470901 23822 274300 358236 836603 479347 714020 322289 517441 543107 911859 270122 275280 815599 391461 407052 314318 454007 779921 51919 923069 361848
281187 966856 698411 679236 611713 879521 427680 331449 164133...

output:

30
M!TNEX*BPF@YQDZSRVHKAUJOLCGIW?

result:

ok ok

Test #122:

score: 0
Accepted
time: 1261ms
memory: 5592kb

input:

!@TGORNCVSP*UAJQYWBZ?DHLEFMXKI
835095 393298 429675 132491 113467 431703 144006 464456 939397 124853 704723 895712 916958 538796 973097 260240 98187 84443 175718 706334 953834 27251 804866 461980 298939 583739 105736 371796 343552 537592
467445 63322 849138 867751 846995 212815 186511 20765 489607 4...

output:

30
!@TGORNCVSP*UAJQYWBZ?DHLEFMXKI

result:

ok ok

Test #123:

score: 0
Accepted
time: 1263ms
memory: 5540kb

input:

KMQUWNFOYT*CAZ@H?IEGB!SVPLJXDR
-423025 -805767 -89847 -699548 -11888 -796667 -651586 -32502 -197105 -406327 -694253 -543348 -868097 -426819 -105310 56320 -995469 -205051 -287987 -950394 -127287 -180085 -705568 -961806 -438776 -82940 -942866 -922572 -934315 40809
-87931 -885835 -442098 47838 -928075 ...

output:

1
S

result:

ok ok

Test #124:

score: 0
Accepted
time: 1268ms
memory: 5516kb

input:

!D?SX@PTQBFEY*AUHKVGZNIOJCMWLR
-329291 -661221 -334538 -734227 -361198 92283 -334555 83546 -8464 -822513 -417217 -908974 -624098 -397404 -132938 -868744 -211461 64208 -222676 -774524 80224 -516944 -711850 -623644 -195864 -492480 -770124 -188457 -983286 -553372
-958010 -360943 -92902 -773443 -970590 ...

output:

2
?B

result:

ok ok

Test #125:

score: 0
Accepted
time: 1277ms
memory: 5536kb

input:

MLZBPV!NOX*DQCUSIRYHJ@?AWFGKET
-545785 -343063 -37822 -671981 -482084 -795854 -4837 -256133 -224278 -732234 -885900 -813355 -833584 -346803 -237901 617 -162174 -8864 18866 -153150 81226 -832139 42985 -641727 -897066 -97122 75455 -976364 -992072 -20181
-965238 -352466 -843562 -920817 -680604 -587654 ...

output:

1
T

result:

ok ok

Test #126:

score: 0
Accepted
time: 1275ms
memory: 5680kb

input:

ABCDEFGHIJKLMNOPQRSTUVWXYZ!@*?
-197914 1000000 1000000 1000000 -1000000 1000000 773302 300158 -331265 672265 -648911 -319598 1000000 1000000 1000000 -217073 570972 88961 1000000 -813277 -1000000 -160696 -558073 1000000 1000000 1000000 -177475 -356847 -1000000 698501
1000000 -468799 -1000000 -1000000...

output:

19
DEGHIJKLPQRTUVWY!@?

result:

ok ok

Test #127:

score: 0
Accepted
time: 1269ms
memory: 5516kb

input:

ABCDEFGHIJKLMNOPQRSTUVWXYZ!@*?
-477197 -1000000 -1000000 664634 -811753 1000000 1000000 -737652 1000000 1000000 -1000000 -229433 1000000 -1000000 -121305 -1000000 28009 827944 -1000000 -1000000 -1000000 1000000 -1000000 -1000000 -1000000 -207237 -236892 -298638 662331 500264
1000000 -136771 -1000000...

output:

20
ACDFGHIMOQRSTUVZ!@*?

result:

ok ok

Test #128:

score: 0
Accepted
time: 1270ms
memory: 5520kb

input:

ABCDEFGHIJKLMNOPQRSTUVWXYZ!@*?
-597877 1000000 -83206 1000000 -441883 1000000 1000000 150421 1000000 9187 705121 -1000000 -1000000 -36127 -375914 1000000 65968 1000000 1000000 572053 253765 1000000 1000000 -297767 -713734 1000000 15379 688521 371664 -1000000
1000000 1000000 1000000 480218 1000000 10...

output:

16
EHIKLMNOQTUWX!*?

result:

ok ok