QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#338565#4827. Message Made of Noiseucup-team1087AC ✓1ms4004kbC++171.8kb2024-02-26 00:58:292024-02-26 00:58:30

Judging History

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

  • [2024-02-26 00:58:30]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:4004kb
  • [2024-02-26 00:58:29]
  • 提交

answer

#include <iostream>
#include <cstring>
using namespace std;

template <class T>
T uread() {
    char c = getchar();
    while (c < '0' || c > '9') {
        c = getchar();
    }
    T num = 0;
    while (c >= '0' && c <= '9') {
        num = (num << 1) + (num << 3) + (c ^ 48);
        c = getchar();
    }
    return num;
}

void Alice() {
    char str[17];
    scanf("%s", str + 1);
    int len = (int)strlen(str + 1);
    for (int i = 2; i <= len; ++i) {
        if (str[i] == str[i - 1]) {
            str[i] = 'z' + 1;
        }
    }
    int n = uread<int>(), a[10001];
    for (int i = 1; i <= n; ++i) {
        a[i] = uread<int>();
    }
    int m = 0, idx = 1, now = 0, b[10001];
    for (int i = 1; i <= n; ++i) {
        if (a[i] % 27 == str[idx] - 'a') {
            b[++m] = a[i];
            ++now;
        }
        if (now == 20) {
            now = 0;
            if (++idx > len) {
                break;
            }
        }
    }
    printf("%d\n", m);
    for (int i = 1; i <= m; ++i) {
        printf("%d ", b[i]);
    }
    putchar('\n');
}

void Bob() {
    int n = uread<int>(), a[10002];
    for (int i = 1; i <= n; ++i) {
        a[i] = uread<int>() % 27;
    }
    char ans[16];
    int len = 0;
    for (int i = 1; i <= n; ++i) {
        if (a[i] != a[i + 1]) {
            ans[++len] = a[i] + 'a';
        }
    }
    for (int i = 2; i <= len; ++i) {
        if (ans[i] > 'z') {
            ans[i] = ans[i - 1];
        }
    }
    for (int i = 1; i <= len; ++i) {
        putchar(ans[i]);
    }
    putchar('\n');
}

int main(int argc, const char * argv[]) {
    char opt[1 << 3];
    scanf("%s", opt);
    if (*opt == 'E') {
        Bob();
    } else {
        Alice();
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

Alisa
spark
10000
833080662 16249270 933346436 811379468 925271783 359705680 76365900 158342757 877083772 38085457 819965104 408973036 16049452 102494634 585189166 986634959 68282709 745375330 964742302 111199534 259074194 357880009 300942070 891323449 763894642 774838701 270621761 288500028 8289322...

output:

100
76365900 774838701 220543227 964868778 539813691 153415449 955107603 675395271 120288555 3385791 887100165 717590628 180893565 463899330 781616052 451134810 675013896 249663726 890635977 686444130 502406619 338427492 528748224 480491043 432942882 342936384 428147034 37247622 605699655 790751553 ...

input:

Eva
47
76365900 774838701 964868778 539813691 675395271 120288555 3385791 887100165 451134810 502406619 338427492 528748224 342936384 428147034 221537391 266149032 181368762 247447698 527543025 758984028 803280471 527481882 194502978 446457420 875110608 356594508 687892365 967204395 160949727 567611...

output:

spark

result:

ok single line: 'spark'

Test #2:

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

input:

Alisa
zoo
10000
956754604 875535727 764768765 403840087 67159452 949712722 115576737 264236473 212511213 562986097 859669991 893717805 838891893 47770507 416355290 159696911 702519086 615482060 179929327 523223494 166469421 452823317 391263419 32353165 631726585 32531344 424699975 294307421 85611161...

output:

60
562986097 523223494 631726585 423355381 405570886 397922731 761583652 659042782 574674991 536156980 495980197 750621247 709124083 984815899 362411953 896969887 735139501 31235272 236835925 175352038 661979399 703105826 797171720 483857537 601792133 152634524 216866228 759352145 392209952 82156662...

input:

Eva
30
562986097 423355381 405570886 761583652 659042782 574674991 495980197 750621247 896969887 31235272 236835925 175352038 601792133 152634524 216866228 392209952 343368491 20209595 168372662 634172342 843747611 193716563 576553409 291125150 602365895 503841329 962142164 912457601 739643453 64107...

output:

zoo

result:

ok single line: 'zoo'

Test #3:

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

input:

Alisa
at
10000
310982107 539408279 796963309 809203668 523777662 545413064 979220389 847693910 138708955 656945625 74716593 934751180 481326343 167326361 231049220 522995900 37351748 788253568 916125796 387068110 517465221 271899863 460441305 620026841 944960218 415699339 335393844 48690159 42519562...

output:

40
912925836 341679249 264617901 744405525 615429576 141387012 955640241 373749363 861298137 600099975 819508401 29075895 923321133 921211326 527251221 447483690 563938065 310444866 819374238 416862504 679680010 182941165 907120396 413548678 212836564 474653026 49696570 578515033 167348287 667729864...

input:

Eva
22
912925836 341679249 264617901 744405525 373749363 861298137 600099975 921211326 527251221 310444866 819374238 679680010 182941165 413548678 578515033 167348287 667729864 223599169 242735095 982420831 241867396 979031899 

output:

at

result:

ok single line: 'at'

Test #4:

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

input:

Alisa
if
10000
503842924 757491266 141782843 236156593 872816374 282494629 8442020 266993146 431387022 916904904 536726783 139144491 897563232 774836180 933098003 649977536 426446349 179675381 976057133 192994215 912014737 649318938 281784409 433754655 579718136 693929967 122871398 670071564 6931916...

output:

40
774836180 933098003 488034647 785795102 892199483 773819009 34188326 435772124 72738926 214487711 518360021 866241008 530962595 478246742 533495816 237068243 596965121 792230849 417477707 749851298 389004773 322603673 658037390 393926927 360225851 984442874 722226002 978584873 433155335 513792185...

input:

Eva
21
774836180 488034647 892199483 34188326 214487711 518360021 478246742 533495816 237068243 596965121 792230849 417477707 749851298 322603673 658037390 360225851 978584873 459353597 867778466 803660378 155969123 

output:

if

result:

ok single line: 'if'

Test #5:

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

input:

Alisa
eel
10000
419034977 506627655 360958666 682067714 313353796 431192689 370972316 850816320 352477330 854979535 29434206 87388648 151667551 275112589 276381040 773593631 79329274 524349772 621505949 536647547 733312990 826490666 279158815 667907864 31822931 739964904 109173174 245982571 49308618...

output:

60
313353796 275112589 979390822 981574825 173214751 71674366 752102743 955994674 260550679 947010100 631813558 326781652 87633337 429835684 459558796 45484231 883690267 227831593 220893484 406542325 697664150 662773724 136412882 104007833 148967369 448024526 624418010 534069962 330916589 635429636 ...

input:

Eva
24
313353796 173214751 71674366 947010100 326781652 87633337 459558796 227831593 697664150 624418010 534069962 330916589 635429636 844880030 99138599 112077242 380680829 980518322 443869670 56872163 695263322 588641645 559819145 423080642 

output:

eel

result:

ok single line: 'eel'

Test #6:

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

input:

Alisa
cat
10000
429813780 552131166 455681195 172400210 186885255 914570530 663421268 36309837 82538846 199527239 779087404 945586459 313674436 774210063 266763546 350462343 300825395 764967849 225852148 348059331 687517865 907327558 175393488 120346637 521382066 657709825 513564198 595042659 958293...

output:

60
663421268 149356145 769131641 86882303 614349443 376370012 254059337 372796670 515367497 24484223 973652591 875584838 211565252 548009849 117107831 150265343 15568283 706316222 279790472 929793143 213893244 536590008 412308495 823094352 594546480 190843722 160605207 931892796 576943155 418025988 ...

input:

Eva
31
769131641 614349443 376370012 515367497 24484223 875584838 211565252 15568283 929793143 213893244 536590008 412308495 594546480 160605207 107250453 893714283 378090315 181486656 62694316 790185934 687543760 951859045 766546651 603745048 331264774 228371635 617211541 159139369 973987651 978488...

output:

cat

result:

ok single line: 'cat'

Test #7:

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

input:

Alisa
real
10000
293521636 162312678 673316503 632028874 710190218 188928780 96341370 555961165 289029081 884342732 350209747 664696652 979603608 961578721 626304467 295252288 164649292 651680084 873526805 958035183 683416223 968734513 278011061 293645402 432614810 140880339 131416445 264789129 7699...

output:

80
873526805 293645402 296052263 78636977 950791490 456412094 357099506 328981301 429627473 296003960 87513146 943025453 695644811 167288291 643264919 163893554 968774867 216011978 761433173 361145159 205201624 491841994 383216107 732174988 815291707 658650775 952880035 788373085 6246292 335883730 4...

input:

Eva
35
293645402 296052263 78636977 456412094 429627473 163893554 815291707 788373085 6246292 335883730 920583445 232128994 577273720 802351687 761888731 543405564 527841468 859188681 164823525 308221524 458502660 320760729 565440939 668441403 487762139 187477265 552299429 589521521 130666889 636162...

output:

real

result:

ok single line: 'real'

Test #8:

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

input:

Alisa
queue
10000
728126608 503051601 532065691 649125958 544642619 764381278 99807076 262423745 184581551 580643211 497976687 957044918 859521736 259842796 62623567 113655749 841320664 634874725 723467845 260164633 827046454 235948513 311899723 949510236 35721445 834116947 179412731 28282810 623612...

output:

100
841320664 311899723 472733053 601092052 87813088 895758307 756362383 332394748 496359187 386793862 251180395 982471615 728792548 680992099 713604481 492898597 122181550 76256197 888536860 279150262 663926969 983359136 253500158 107807618 64896518 97091534 697219481 942996971 245064764 860650805 ...

input:

Eva
48
472733053 332394748 496359187 386793862 982471615 713604481 492898597 122181550 76256197 279150262 663926969 107807618 64896518 97091534 942996971 575968124 623412308 951625145 305918768 513867449 628620349 780073690 872291326 861951244 369988807 590051875 331033774 336699940 223053484 456807...

output:

queue

result:

ok single line: 'queue'

Test #9:

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

input:

Alisa
cotton
10000
767299611 979529394 39913161 316465148 694895023 593011984 513519165 256775663 243632888 431633332 223892604 123184313 731920779 174332419 251563430 741176400 264757675 259841890 770005896 455626677 665021206 586325250 809408942 435300393 279787411 300849439 269112903 624785753 12...

output:

120
251563430 624785753 113188430 781043501 709623344 409578554 794232002 671563901 761479760 392284109 626918726 378912440 588618470 200979740 758860652 623662283 320656268 368191739 460789940 27476039 48720029 590708930 88825640 293537939 949760897 404283056 929626484 227979212 334486760 455016542...

input:

Eva
59
781043501 409578554 794232002 671563901 392284109 378912440 588618470 320656268 368191739 27476039 48720029 88825640 293537939 949760897 404283056 227979212 334486760 621478535 659279318 72912785 221523323 200750333 299509885 527455063 568638136 499362589 951042430 578935072 454758805 9147438...

output:

cotton

result:

ok single line: 'cotton'

Test #10:

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

input:

Alisa
zealous
10000
376434163 440125154 36359799 555365557 137615418 418390680 941228977 110954051 329055139 583988117 559131676 132626782 895760470 719530007 512820379 305723222 801475792 62346534 469882058 287661911 705144238 572901668 802362723 837688880 958060440 510581655 720263881 611350316 73...

output:

140
527010676 69651412 29641732 561148288 544494850 432483487 156756976 544195906 225527218 176784253 644764642 856530016 926456047 950491339 891174796 267479224 347053381 901441492 267433459 358032499 645280483 821656039 182595064 249136942 746526568 758495209 988513150 834876751 437496583 45140474...

input:

Eva
75
527010676 29641732 544494850 432483487 156756976 544195906 225527218 176784253 644764642 856530016 926456047 950491339 267479224 347053381 901441492 358032499 249136942 437496583 389512588 273045172 770857051 652952614 266114106 67134393 571331529 619436376 83441475 433429839 242666685 481520...

output:

zealous

result:

ok single line: 'zealous'

Test #11:

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

input:

Alisa
assessee
10000
482462411 406338426 451753105 172617988 400471250 928079398 658730375 743529855 457495918 236775269 240125765 65250594 38143537 418720947 501030902 999438611 564408934 190385769 793443047 278651171 7840279 9961946 894345874 313117394 434989606 163661658 177490635 189003645 42853...

output:

160
189003645 901303578 291423501 626403807 598987656 933934617 342043884 808848774 944446203 121506669 775381437 904752936 57261195 295844400 568796175 286666641 365672934 461714634 682609761 656780265 935490699 242209944 967368600 63121023 131293944 356284377 236629584 969692139 500419665 97575320...

input:

Eva
83
901303578 626403807 598987656 342043884 121506669 775381437 57261195 568796175 286666641 461714634 682609761 656780265 935490699 242209944 356284377 969692139 500419665 544664781 608654835 39072474 514454427 659798964 816608924 572908922 558052037 980286029 158106707 634776371 643037453 99604...

output:

assessee

result:

ok single line: 'assessee'

Test #12:

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

input:

Alisa
impatient
10000
456107448 565954838 600661924 423359702 440626827 441006466 795197649 443478311 770536535 709684383 92634315 850509440 341841933 416749530 775721850 324152699 710732825 975761495 731172339 389979549 818576792 935707276 703119428 671211209 695131944 227403587 89170727 832476447 ...

output:

180
565954838 703119428 434750957 947418209 500451893 432816758 983834675 516443561 107769320 461896784 691397675 710799875 189457550 875717549 516522293 694236320 375345746 230124518 587803292 759923918 719292729 432652575 870240603 723865476 213160422 854441607 709379247 697760931 843408084 917578...

input:

Eva
94
565954838 434750957 947418209 500451893 432816758 983834675 516443561 461896784 710799875 189457550 875717549 516522293 694236320 587803292 759923918 723865476 697760931 843408084 348664512 904420335 137103582 212766846 776388471 516696045 334746933 970311570 360696579 573403308 755096109 766...

output:

impatient

result:

ok single line: 'impatient'

Test #13:

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

input:

Alisa
bookkeeper
10000
390710414 631530615 963220561 501450406 351277306 602248210 85957489 881562188 450691883 138708871 331455659 745743962 340297641 243932822 682142300 643860072 962255409 429078261 419732560 641785179 681729629 753830142 211789688 516575649 543437870 822918258 88310983 576798802...

output:

200
971377381 273152656 188051545 193947589 801862039 626584789 338020534 411790177 433048708 964502695 743038786 956536480 848372077 799099615 243263629 59453110 620969194 413329771 939569032 765629443 263444792 373951877 173173343 217421078 701858885 915576899 596277545 138559532 838845005 5658409...

input:

Eva
101
971377381 273152656 188051545 626584789 411790177 433048708 964502695 848372077 799099615 765629443 263444792 173173343 596277545 138559532 838845005 389013881 593271230 974340914 75044813 990020636 9026720 464080454 328545098 397582289 594896804 282636809 222769531 789601834 130923415 53350...

output:

bookkeeper

result:

ok single line: 'bookkeeper'

Test #14:

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

input:

Alisa
copyrighted
10000
739557444 330252893 964326887 887910648 165070809 903235717 652009792 814643692 630901069 585765565 101206711 559866628 791788710 330613970 309583309 642328357 778635645 120527334 116527570 729858307 563138990 220835202 217041534 894279818 808177617 556013181 774973167 510000...

output:

220
663145652 55224965 714916559 372912932 373318418 147603953 29296622 748177535 248714093 157870001 86049380 272181656 860442266 651932525 763025537 556979519 427653002 502988969 345660212 786452114 816880019 655217816 700828322 179730320 58290314 703601573 845815298 241234727 337351595 823770311 ...

input:

Eva
108
663145652 55224965 373318418 29296622 748177535 157870001 272181656 651932525 556979519 427653002 816880019 655217816 845815298 241234727 486756851 983505362 605630966 361188032 375216746 288376674 164169735 983751441 836193687 388692987 763733949 310660962 75470793 761369451 372687558 13174...

output:

copyrighted

result:

ok single line: 'copyrighted'

Test #15:

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

input:

Alisa
squeezeboxes
10000
157094287 809151185 885591341 968810165 943658241 456220129 251205115 963575422 527082156 400831284 639279124 478290197 149013822 155506716 389372449 193333788 390911465 699989485 515969381 745192528 146306211 938174688 227793494 161046218 477570505 9894134 499988384 8103411...

output:

240
193333788 938174688 19472364 98516538 495529236 106681851 12079845 499079115 931127499 317126871 286970976 776459079 284562441 87266529 12340017 243305820 739335618 650602251 126094554 470890764 903080113 106260946 829087882 42932905 261914515 130699753 274965316 663328726 187325719 152435131 59...

input:

Eva
130
98516538 106681851 12079845 499079115 317126871 284562441 87266529 12340017 739335618 470890764 903080113 106260946 829087882 261914515 274965316 187325719 152435131 840264991 753234676 982656025 394045549 784533373 353924012 488423675 530197670 895703663 42415103 457594778 172084088 1871592...

output:

squeezeboxes

result:

ok single line: 'squeezeboxes'

Test #16:

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

input:

Alisa
embarrassment
10000
863907095 50900552 940385214 923016987 195384280 149329830 157040498 699365836 728151611 802183368 964476670 766353465 883068628 140698617 576455081 638837097 462505317 428012304 717738800 611701562 107433485 338374166 40322202 553171030 361969314 458428199 482891314 240678...

output:

260
964476670 747463522 762511270 625716526 435738370 97991401 636860965 153310243 889027573 437326402 397200892 647655430 861063106 998652811 82807519 272421283 666709627 829672987 525925849 278086936 822663255 668864289 52007682 952636341 327719262 391060236 478078212 218406576 65033238 429328335 ...

input:

Eva
117
964476670 762511270 625716526 435738370 97991401 636860965 153310243 889027573 666709627 829672987 278086936 822663255 52007682 952636341 327719262 65033238 429328335 31448694 594250140 937936515 807417705 601735404 408701982 894797686 753346522 358039954 52558768 469106560 626903227 3026826...

output:

embarrassment

result:

ok single line: 'embarrassment'

Test #17:

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

input:

Alisa
facelessnesses
10000
358815078 441702436 357306969 876232230 829173472 387236074 319588548 22588795 57315925 261669197 860052977 970248515 700859096 727417383 897121799 236588200 741288488 304680816 973597730 899737234 818651018 844515671 847720011 951605044 907126697 920420424 536760796 74546...

output:

280
970248515 741288488 973597730 844515671 971606966 230292941 760005644 733487378 430305377 416507918 897850337 78976301 423888044 755748041 323341232 842309825 891737159 645216548 27191111 85832681 341411382 622802898 509856336 183892545 64124433 596393712 155597139 890976645 214308396 299869641 ...

input:

Eva
144
970248515 741288488 973597730 430305377 416507918 78976301 423888044 323341232 891737159 645216548 85832681 622802898 509856336 183892545 64124433 596393712 155597139 890976645 299869641 17149914 322318359 288305595 312260049 19067751 362958030 300838079 354669086 188626349 870901310 5925957...

output:

facelessnesses

result:

ok single line: 'facelessnesses'

Test #18:

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

input:

Alisa
oxyphenbutazone
10000
798496889 591831196 689866887 718516037 939088236 750029536 32504325 524026335 454108713 535099022 19575145 267787878 714460751 824215363 128955594 411401580 370729264 520608037 586051245 545847182 156497495 298980033 263178383 961267578 735195675 768423754 868450776 3886...

output:

300
156497495 263178383 154300235 591652418 184501517 94611308 841599113 263642486 738284531 372775676 556674377 398428457 623432552 786798428 182945885 452947586 537720890 705367751 796020926 602262689 67747640 384048131 844414736 829764131 590710856 512484323 732305336 515991569 243485267 78619352...

input:

Eva
163
156497495 154300235 591652418 184501517 94611308 841599113 263642486 738284531 372775676 398428457 182945885 537720890 796020926 384048131 590710856 512484323 732305336 786193529 570442847 615790859 389457014 890580254 142033470 611271573 650194908 954054528 675801465 283613640 678822198 258...

output:

oxyphenbutazone

result:

ok single line: 'oxyphenbutazone'

Test #19:

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

input:

Alisa
uncopyrightable
10000
40150886 763706492 122394813 807704159 536297792 750987557 115171123 810353340 610211761 244154724 969998196 16564183 375564698 574704451 798113067 379418611 35315906 832211290 55151894 916263535 105649044 475634989 856990225 797136254 921316465 143597900 736016212 474798...

output:

300
55151894 143597900 893791172 769439891 383710682 547590908 672084128 172095914 7606217 825346415 916885703 207536087 584857280 827380190 693226748 307703441 40009538 841598849 157409453 382652552 125835916 722949475 499420741 927858847 757690618 507185077 674037004 524905582 139259074 766733053 ...

input:

Eva
133
383710682 172095914 207536087 693226748 307703441 841598849 157409453 125835916 499420741 674037004 524905582 971324851 513837580 763162832 152195816 337790225 375073715 958606409 944917463 843199013 172744517 905913128 973575128 774893534 739464107 302989721 697301852 950317799 428576495 29...

output:

uncopyrightable

result:

ok single line: 'uncopyrightable'

Test #20:

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

input:

Alisa
decommissioning
10000
382835686 679002417 815396195 614990250 316953010 510954891 755838644 474793416 636240104 959829812 549408397 315423690 730153926 758389557 768870797 263724012 174045815 452197876 232033487 368630330 17284226 524695595 234115558 27688098 683706858 79961009 751009094 73156...

output:

300
758389557 27688098 720696693 125473161 447485286 900471171 217523046 258176568 753182418 725063133 926205816 474854484 933135636 794217234 684980580 501488202 74515116 492376512 124508586 767535186 727809196 371663806 967692910 130161091 853094920 993132202 171987277 45730849 178045861 732292033...

input:

Eva
156
720696693 900471171 926205816 474854484 794217234 492376512 124508586 767535186 371663806 967692910 45730849 732292033 647700196 651711937 800532724 357057832 519324025 691704931 455153204 305596073 252540371 345824264 482201156 565885550 786328643 698710565 2176472 855593066 806822534 52343...

output:

decommissioning

result:

ok single line: 'decommissioning'

Test #21:

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

input:

Alisa
kindheartedness
10000
184401044 43479672 626522598 125256287 393936792 796090108 623375502 964392055 745191771 685632155 122244894 795113405 154816720 751814796 908762470 986021242 828628967 790557756 662677460 258829873 931275678 435309418 514192615 132684947 462635436 502645052 66049087 6164...

output:

300
616488013 289705312 335356291 205670269 872214922 397616671 533774782 866186281 12634012 886425670 485996257 116988715 877038445 36152065 411937417 474353290 877248775 822158407 615661327 285966676 252327752 990215747 353710673 810514601 411164729 535522895 668641265 913466114 956478194 48250682...

input:

Eva
157
335356291 877038445 877248775 822158407 615661327 285966676 252327752 353710673 810514601 411164729 535522895 668641265 956478194 482506829 768400973 307381022 585692189 675484550 50425019 20059064 204708154 828984415 364056430 347408419 79289779 427927252 182600716 843948328 389613280 45199...

output:

kindheartedness

result:

ok single line: 'kindheartedness'

Test #22:

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

input:

Alisa
appropriateness
10000
330513032 853761192 471913635 973083553 210304782 192323109 93400951 312902092 218527177 220141550 772849545 474554266 236840727 992261006 242750804 48564115 825470066 137963562 557516732 280829723 624831146 479324406 32347115 449750828 375369355 14352941 431101170 936947...

output:

300
210304782 431101170 469278711 411274044 979976934 289861632 54920322 790481349 119220687 738558351 684888966 968193594 705420333 293761107 152986563 223583220 835937010 428935851 812743929 515521341 326645799 502069470 319467687 362694957 140172540 459668400 422137131 316787856 298894443 2088716...

input:

Eva
152
210304782 431101170 469278711 289861632 54920322 790481349 968193594 152986563 515521341 319467687 140172540 422137131 316787856 298894443 208871691 331122102 879253476 19376700 560990582 906387677 377211599 531566900 155040965 891922319 181361294 816879707 766667267 406022489 550540880 1293...

output:

appropriateness

result:

ok single line: 'appropriateness'