QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#124649#956. 后缀排序GoatGirl98#100 ✓100ms34892kbC++144.8kb2023-07-15 11:53:372024-11-28 22:24:37

Judging History

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

  • [2024-11-28 22:24:37]
  • 管理员手动重测本题所有获得100分的提交记录
  • 测评结果:100
  • 用时:100ms
  • 内存:34892kb
  • [2024-11-28 21:39:34]
  • 管理员手动重测本题所有提交记录
  • 测评结果:100
  • 用时:105ms
  • 内存:35284kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-15 11:53:41]
  • 评测
  • 测评结果:100
  • 用时:107ms
  • 内存:35268kb
  • [2023-07-15 11:53:37]
  • 提交

answer

#include <stdio.h>
#include <string.h>
#include <numeric>
#include <ctype.h>
#include <algorithm>
#define getchar getchar_unlocked
#define putchar putchar_unlocked
using namespace std;
#define MAXN 1000005
void input_str(char *s) {
    int len = 0;
    char c = getchar();

    while (!isalnum(c))
        c = getchar();

    while (isalnum(c))
        s[len++] = c, c = getchar();

    s[len] = '\0';
}
void wr(int x) {
    if (x < 0)
        putchar('-'), x = -x;

    if (x > 9)
        wr(x / 10);

    putchar(x % 10 + 48);
}
int s[(MAXN << 1) + 5], SA[MAXN + 5], Rank[MAXN + 5], c[MAXN + 5], p[MAXN + 5], tmp[MAXN + 5], n, m, hei[MAXN];
char str[MAXN + 5];
bool t[(MAXN << 1) + 5];
void SAIS(int s[], bool t[], int tmp[], int n, int m) {
    int n1 = 0, m1 = Rank[1] = 0, *s1 = s + n;
    t[n] = 0;

    for (int i = n - 1; i; t[i] = s[i] ^ s[i + 1] ? s[i] > s[i + 1] : t[i + 1], i--)
        ;

    for (int i = 2; i <= n; Rank[i] = t[i - 1] && !t[i] ? tmp[++n1] = i, n1 : 0, i++)
        ;

    memset(SA + 1, 0, n << 2);                                                       
    memset(c + 1, 0, m << 2);                                                        
    for (int i = 1; i <= n; ++c[s[i++]])                                            
        ;                                                                            
    partial_sum(c + 1, c + m + 1, c + 1);                                            
    memcpy(p + 1, c + 1, m << 2);                                                    
    for (int i = n1; i;SA[p[s[tmp[i]]]--] = tmp[i], i--)                                         
        ;                                                                            
    transform(c, c + m, p + 1, [](int a) { return ++a; });                           
    for (int i = 1; i <= n; SA[i] > 1 && t[SA[i] - 1] ? (SA[p[s[SA[i] - 1]]++] = SA[i] - 1) : 0, i++) 
        ;                                                                            
    memcpy(p + 1, c + 1, m << 2);                                                    
    for (int i = n; i; SA[i] > 1 && !t[SA[i] - 1] ? (SA[p[s[SA[i] - 1]]--] = SA[i] - 1) : 0, i--)     
        ;


    for (int i = 1, x, y = 0; i <= n; i++)
        if (x = Rank[SA[i]]) {
            if (m1 <= 1 || tmp[x + 1] - tmp[x] != tmp[y + 1] - tmp[y])
                ++m1;
            else
                for (int a = tmp[x], b = tmp[y]; a <= tmp[x + 1]; a++, b++)
                    if ((s[a] << 1 | t[a]) ^ (s[b] << 1 | t[b])) {
                        ++m1;
                        break;
                    }

            s1[y = x] = m1;
        }

    if (m1 < n1)
        SAIS(s1, t + n, tmp + n1, n1, m1);
    else
        for (int i = 1; i <= n1; SA[s1[i]] = i, i++)
            ;

    for (int i = 1; i <= n1; s1[i] = tmp[SA[i]], i++)
        ;

    memset(SA + 1, 0, n << 2);                                                       
    memset(c + 1, 0, m << 2);                                                        
    for (int i = 1; i <= n; ++c[s[i++]])                                            
        ;                                                                           
    partial_sum(c + 1, c + m + 1, c + 1);                                            
    memcpy(p + 1, c + 1, m << 2);                                                    
    for (int i = n1; i; SA[p[s[s1[i]]]--] = s1[i], i--)                                         
        ;                                                                            
    transform(c, c + m, p + 1, [](int a) { return ++a; });                           
    for (int i = 1; i <= n; SA[i] > 1 && t[SA[i] - 1] ? (SA[p[s[SA[i] - 1]]++] = SA[i] - 1) : 0, i++) 
        ;                                                                            
    memcpy(p + 1, c + 1, m << 2);                                                    
    for (int i = n; i; SA[i] > 1 && !t[SA[i] - 1] ? (SA[p[s[SA[i] - 1]]--] = SA[i] - 1) : 0, i--)     
        ;

}
int trans_char(const char &c) {
    if (c >= '0' && c <= '9')
        return c - '0' + 2;
    else if (c >= 'A' && c <= 'Z')
        return c - 'A' + 12;
    else if (c >= 'a' && c <= 'z')
        return c - 'a' + 38;
    else
        return 1;
}
int main() {
    input_str(str + 1);
    n = strlen(str + 1);

    for (int i = 1; i <= n; i++)
        s[i] = trans_char(str[i]);

    s[++n] = 1;
    SAIS(s, t, tmp, n, 63);
    --n;

    for (int i = 1; i <= n; i++)
        SA[i] = SA[i + 1], Rank[SA[i]] = i;

    for (int i = 1, k = 0; i <= n; hei[Rank[i]] = k, i++, k && --k)
        for (int j = SA[Rank[i] - 1]; s[i + k] == s[j + k]; k++)
            ;

    for (int i = 1; i <= n; i++)
        wr(SA[i]), putchar(' ');

    // putchar('\n');
    // for (rint i = 2; i <= n; i++)
    // wr(hei[i]), putchar(' ');
}

詳細信息

Subtask #1:

score: 25
Accepted

Test #1:

score: 25
Accepted
time: 0ms
memory: 17720kb

input:

5Q2K2Pz3vL3K5NFJ48Lj77MYpTRo8dq25fS26BUl59i16a9kuxuFu4d477vz0057gB00218hv69C2Wz7Fk5pMt153uVAq3F3rK0T

output:

67 61 68 62 99 87 44 70 69 32 36 3 5 77 94 11 96 89 8 56 17 54 88 63 41 13 1 33 83 74 37 45 21 57 80 22 64 58 18 29 71 75 42 47 92 66 38 76 95 15 81 52 16 98 4 12 10 19 23 85 14 6 2 27 35 100 26 39 91 78 24 46 55 30 34 65 72 43 20 82 48 40 28 84 25 31 93 97 86 53 51 90 49 73 9 59 50 60 7 79 

result:

ok 100 numbers

Test #2:

score: 25
Accepted
time: 0ms
memory: 17792kb

input:

5Q2K2Pz3vL3K5NFJ48Lj77MYpTRo8dq25fS26BUl59i16a9kuxuFu4d477vz0057gB00218hv69C2Wz7Fk5pMt153uVAq3F3rK0T6x537w3ME8JK5N1K1H2mQ25fhwSXF71PN7pq33144n03i7668I924792U1O299jyC066396197Az5XUG4436L1gj5ltv0K591DJu2Fb8UGV54Uz7B1E37583565h6XKWb011m429JT119a5Aa0nGP880GI7691f8bs920iq4725A9W7VYVLJrM7Y3KHhdO6562B34gqZ...

output:

67 834 61 984 435 230 932 390 302 791 991 68 961 835 551 887 814 423 143 749 541 62 166 729 910 465 764 663 382 361 252 193 481 996 99 366 668 700 265 321 985 246 843 804 737 807 854 851 436 813 239 231 543 927 848 680 139 767 744 317 87 560 724 44 775 783 800 718 70 172 657 445 240 401 499 756 794 ...

result:

ok 1000 numbers

Test #3:

score: 25
Accepted
time: 0ms
memory: 17804kb

input:

5Q2K2Pz3vL3K5NFJ48Lj77MYpTRo8dq25fS26BUl59i16a9kuxuFu4d477vz0057gB00218hv69C2Wz7Fk5pMt153uVAq3F3rK0T6x537w3ME8JK5N1K1H2mQ25fhwSXF71PN7pq33144n03i7668I924792U1O299jyC066396197Az5XUG4436L1gj5ltv0K591DJu2Fb8UGV54Uz7B1E37583565h6XKWb011m429JT119a5Aa0nGP880GI7691f8bs920iq4725A9W7VYVLJrM7Y3KHhdO6562B34gqZ...

output:

67 834 61 984 435 230 932 390 302 791 991 68 961 835 551 887 814 423 143 749 541 62 166 729 910 465 764 663 382 361 252 193 481 996 99 366 668 700 265 321 985 246 843 804 737 807 854 851 436 813 239 231 543 927 848 680 139 767 744 317 87 560 724 44 775 783 800 718 70 172 657 445 240 401 499 756 794 ...

result:

ok 1000 numbers

Subtask #2:

score: 25
Accepted

Dependency #1:

100%
Accepted

Test #4:

score: 25
Accepted
time: 3ms
memory: 15764kb

input:

5Q2K2Pz3vL3K5NFJ48Lj77MYpTRo8dq25fS26BUl59i16a9kuxuFu4d477vz0057gB00218hv69C2Wz7Fk5pMt153uVAq3F3rK0T6x537w3ME8JK5N1K1H2mQ25fhwSXF71PN7pq33144n03i7668I924792U1O299jyC066396197Az5XUG4436L1gj5ltv0K591DJu2Fb8UGV54Uz7B1E37583565h6XKWb011m429JT119a5Aa0nGP880GI7691f8bs920iq4725A9W7VYVLJrM7Y3KHhdO6562B34gqZ...

output:

1215 67 7665 834 1826 7511 5919 3053 61 3312 6300 2679 1594 4074 9549 3994 1216 9041 7309 984 435 9744 230 1246 7870 2136 1083 932 390 3023 6221 2107 5961 302 791 991 3530 3946 4059 9751 2781 68 5494 7719 5334 7001 8839 3525 2856 2330 4033 1358 7135 8275 7042 2156 1353 5431 1327 8878 1858 7963 6070 ...

result:

ok 10000 numbers

Test #5:

score: 25
Accepted
time: 3ms
memory: 17728kb

input:

5Q2K2Pz3vL3K5NFJ48Lj77MYpTRo8dq25fS26BUl59i16a9kuxuFu4d477vz0057gB00218hv69C2Wz7Fk5pMt153uVAq3F3rK0T6x537w3ME8JK5N1K1H2mQ25fhwSXF71PN7pq33144n03i7668I924792U1O299jyC066396197Az5XUG4436L1gj5ltv0K591DJu2Fb8UGV54Uz7B1E37583565h6XKWb011m429JT119a5Aa0nGP880GI7691f8bs920iq4725A9W7VYVLJrM7Y3KHhdO6562B34gqZ...

output:

1215 67 7665 834 1826 7511 5919 3053 61 3312 6300 2679 1594 4074 9549 3994 1216 9041 7309 984 435 9744 230 1246 7870 2136 1083 932 390 3023 6221 2107 5961 302 791 991 3530 3946 4059 9751 2781 68 5494 7719 5334 7001 8839 3525 2856 2330 4033 1358 7135 8275 7042 2156 1353 5431 1327 8878 1858 7963 6070 ...

result:

ok 10000 numbers

Subtask #3:

score: 25
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #6:

score: 25
Accepted
time: 4ms
memory: 15868kb

input:

5Q2K2Pz3vL3K5NFJ48Lj77MYpTRo8dq25fS26BUl59i16a9kuxuFu4d477vz0057gB00218hv69C2Wz7Fk5pMt153uVAq3F3rK0T6x537w3ME8JK5N1K1H2mQ25fhwSXF71PN7pq33144n03i7668I924792U1O299jyC066396197Az5XUG4436L1gj5ltv0K591DJu2Fb8UGV54Uz7B1E37583565h6XKWb011m429JT119a5Aa0nGP880GI7691f8bs920iq4725A9W7VYVLJrM7Y3KHhdO6562B34gqZ...

output:

68971 23766 16236 84001 1215 26527 48751 32248 30140 72030 28767 92557 43162 24259 25407 54376 75855 19511 13517 67 53747 87651 14066 82459 71782 86029 43950 97897 47837 7665 68972 13510 834 32328 99196 78406 83547 81136 78839 87297 70893 11242 63345 90340 71195 48534 1826 26208 37790 94754 94139 42...

result:

ok 100000 numbers

Test #7:

score: 25
Accepted
time: 11ms
memory: 19988kb

input:

5Q2K2Pz3vL3K5NFJ48Lj77MYpTRo8dq25fS26BUl59i16a9kuxuFu4d477vz0057gB00218hv69C2Wz7Fk5pMt153uVAq3F3rK0T6x537w3ME8JK5N1K1H2mQ25fhwSXF71PN7pq33144n03i7668I924792U1O299jyC066396197Az5XUG4436L1gj5ltv0K591DJu2Fb8UGV54Uz7B1E37583565h6XKWb011m429JT119a5Aa0nGP880GI7691f8bs920iq4725A9W7VYVLJrM7Y3KHhdO6562B34gqZ...

output:

68971 23766 16236 84001 1215 26527 48751 32248 30140 72030 28767 92557 43162 24259 25407 54376 75855 19511 13517 67 53747 87651 14066 82459 71782 86029 43950 97897 47837 7665 68972 13510 834 32328 99196 78406 83547 81136 78839 87297 70893 11242 63345 90340 71195 48534 1826 26208 37790 94754 94139 42...

result:

ok 100000 numbers

Subtask #4:

score: 25
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #8:

score: 25
Accepted
time: 99ms
memory: 33320kb

input:

5Q2K2Pz3vL3K5NFJ48Lj77MYpTRo8dq25fS26BUl59i16a9kuxuFu4d477vz0057gB00218hv69C2Wz7Fk5pMt153uVAq3F3rK0T6x537w3ME8JK5N1K1H2mQ25fhwSXF71PN7pq33144n03i7668I924792U1O299jyC066396197Az5XUG4436L1gj5ltv0K591DJu2Fb8UGV54Uz7B1E37583565h6XKWb011m429JT119a5Aa0nGP880GI7691f8bs920iq4725A9W7VYVLJrM7Y3KHhdO6562B34gqZ...

output:

702437 852879 412799 162791 928297 702438 622989 983054 642549 261095 377477 552453 679737 416887 68971 278337 315744 160869 995837 186829 681266 327995 277671 818964 351970 838627 883654 348201 749182 652099 725131 290366 677064 877296 529774 170877 594821 447484 471517 964025 208565 255655 507795 ...

result:

ok 1000000 numbers

Test #9:

score: 25
Accepted
time: 100ms
memory: 29256kb

input:

eX8N69cLH4G7P8QDy5156Hx8m0VN4sH9t0C4MoGd0cN51dgGXJL73z6N20CLISd0X1nhFKvdXa5q2nWCMjmkM30Es5tAZ5L6c306nT2oQfrf2Zt510ofV35o9TJ5T811LtWMrZyh18MX9qw72109C5be766Bd3qLO4xD1DDe479eUE5987M7D8Y895fT1W8v76E093n631511T0UVJh29806570CW9b5Is483605N8654a5VWS08UxTJE91bpt43f74q0hkMd1Z9a23he6MAE3kG0u5127tc3h5f8y39AjD9...

output:

38596 639028 437546 648133 351969 176869 229309 186806 709078 462998 756773 229120 449395 203997 694956 387238 859598 730372 206962 594419 304109 865880 486633 87868 144959 580819 713317 427972 274476 938366 686801 782959 62962 785003 847579 57996 600405 148706 255431 125253 470979 965679 925624 274...

result:

ok 1000000 numbers

Test #10:

score: 25
Accepted
time: 95ms
memory: 29332kb

input:

8585jh1f9l3466C87O58gfT7sPR0Vw2kdl75l450z1aiD294Q98lb2h4eWb77E8O987OzoJ1617c76ewlDF6G35z0p51g7X53r9642d72kX96JaJra72G832G87vyY42UVx980GB137H85hg47CMn3o1249D6aaGPCr8z3f0pptL20TH1X6ec0vg1zJ22kw3DF96bCo708qr75G8n59J3v7m2164IX1N84D8O10byi86jR44lQ7U9ccl490428AkdTY6830E7VVf5705W86IJ0MvY94653hx18on20J44890...

output:

73767 216802 73768 690419 604466 827813 587942 736629 238255 331491 654128 797636 599436 533392 476737 533131 558055 861637 813759 428079 371878 574078 216803 151038 556486 238788 165007 289648 324429 383245 331977 951071 341486 342866 674032 50992 680691 104594 382352 956720 401592 251525 523118 51...

result:

ok 1000000 numbers

Test #11:

score: 25
Accepted
time: 38ms
memory: 28476kb

input:

kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk...

output:

994293 994292 994291 994290 994289 994288 994287 994286 994285 994284 994283 994282 994281 994280 994279 994278 994277 994276 994275 994274 994273 994272 994271 994270 994269 994268 994267 994266 994265 994264 994263 994262 994261 994260 994259 994258 994257 994256 994255 994254 994253 994252 994251...

result:

ok 994293 numbers

Test #12:

score: 25
Accepted
time: 46ms
memory: 24612kb

input:

ukamzkyruvymqmfqoewpyzdrtrkzmwdvxcckmwsmuhkaobmvdalkzetetqhfvhjcgpvirkoeuhvnyixcjsifrzemlbvlaeqikyytrqlhlynrfewgaqziacutmpavtpuocdznxdspzsdklbkagxkbmmvxpdrsnjcjgdpgjxgavyolbgmedsomwsmdxnmgojpedauuickphpjmppmlgsyercqmdkohoajkuwbkkvdowkhlpjpsimufipsepdwdmcijcrvupexnnpzsgrrnfgzbbkjmjdcdttwospaxpdgqmdsk...

output:

12772 495016 117907 496513 162347 228041 411643 524260 225586 233722 223495 259119 497155 435113 156380 494750 328406 82369 83353 181439 33259 153134 438319 347818 12773 313250 143652 303674 262847 454234 512538 304673 213887 156453 473241 200482 495017 30753 29703 298800 49060 358512 453366 117908 ...

result:

ok 524288 numbers

Test #13:

score: 25
Accepted
time: 0ms
memory: 17708kb

input:

mississippi

output:

11 8 5 2 1 10 9 7 4 6 3 

result:

ok 11 numbers

Test #14:

score: 25
Accepted
time: 87ms
memory: 33412kb

input:

badabacabaeabacabadabacabafabacabadabacabaeabacabadabacabaiabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabagabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabahabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabagabacabadabacabaeabacabadabacabafabacabadabacabaea...

output:

993306 993304 993300 993292 993276 993212 993084 991036 986940 978748 847676 585532 61244 323388 716604 192316 454460 913212 651068 126780 388924 782140 257852 519996 880444 618300 94012 356156 749372 225084 487228 945980 683836 159548 421692 814908 290620 28476 552764 864060 601916 77628 339772 732...

result:

ok 993306 numbers

Test #15:

score: 25
Accepted
time: 42ms
memory: 26968kb

input:

ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...

output:

990812 990811 990810 990809 990808 990807 990806 990805 990804 990803 990802 990801 990800 990799 990798 990797 990796 990795 990794 990793 990792 990791 990790 990789 990788 990787 990786 990785 990784 990783 990782 990781 990780 990779 990778 990777 990776 990775 990774 990773 990772 990771 990770...

result:

ok 990812 numbers

Test #16:

score: 25
Accepted
time: 99ms
memory: 31384kb

input:

abadabacabagabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabaiabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabagabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabahabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabagabacabadabacabaeabacabadabacabaf...

output:

991321 991317 991309 991053 990541 986445 920909 658765 134477 396621 789837 265549 3405 527693 724301 200013 462157 855373 331085 68941 593229 953677 691533 167245 429389 822605 298317 36173 560461 757069 232781 494925 888141 363853 101709 625997 937293 675149 150861 413005 806221 281933 19789 5440...

result:

ok 991322 numbers

Test #17:

score: 25
Accepted
time: 42ms
memory: 26868kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

991322 991321 991320 991319 991318 991317 991316 991315 991314 991313 991312 991311 991310 991309 991308 991307 991306 991305 991304 991303 991302 991301 991300 991299 991298 991297 991296 991295 991294 991293 991292 991291 991290 991289 991288 991287 991286 991285 991284 991283 991282 991281 991280...

result:

ok 991322 numbers

Test #18:

score: 25
Accepted
time: 50ms
memory: 26652kb

input:

fkuhtcgbqrgrvxfhpaprzbckhqfpzmrteohjuxabvtbjzpxqslilbdlkalsycwrlpfotfoqrwfzelgmhtczzjlclfccwuudfwvpkskjlxogmxzezzrwadlsotwbkkscnjryacfrxwpeanzzhmuysmvszwgjlygpcgbgjrdsnyduhjndfzkdwlpyhwpocbkkrcymjngxxsdtcowvscpthitnmncuoykwxdaaxiobtvkkxyzbqkmsaflyrnqppitvmjnpjgomyrffainynjiixsdwzvcossmjbsnzhgsfmvdcj...

output:

511569 88693 163089 360874 26471 229424 91162 208635 447898 500488 379108 12849 333504 241141 447173 214306 266093 358087 352039 183295 511570 348180 451046 471441 223145 73572 369966 88694 91323 244198 281309 506514 227546 163090 43593 523250 88856 368426 202607 153583 500710 116965 109299 68277 14...

result:

ok 524287 numbers

Test #19:

score: 25
Accepted
time: 0ms
memory: 15784kb

input:

abcbcba

output:

7 1 6 4 2 5 3 

result:

ok 7 numbers

Test #20:

score: 25
Accepted
time: 0ms
memory: 15656kb

input:

wzvptctlnujsoddwexnqkgwckhiukybwwbykuihkcwgkqnxewddosjunltctpvzw

output:

31 34 24 6 59 41 50 14 51 15 48 17 43 22 26 39 38 27 11 54 40 21 25 44 36 29 8 57 56 19 9 46 13 52 4 61 20 45 53 12 5 58 7 60 37 10 28 55 3 62 64 33 23 49 16 42 32 1 47 18 30 35 2 63 

result:

ok 64 numbers

Test #21:

score: 25
Accepted
time: 46ms
memory: 26808kb

input:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

848081 532114 979462 1000000 848080 532113 979461 999999 848079 532112 979460 999998 848078 532111 979459 999997 848077 532110 979458 999996 848076 532109 979457 999995 848075 532108 979456 999994 848074 532107 979455 999993 848073 532106 979454 999992 848072 532105 979453 999991 848071 532104 97945...

result:

ok 1000000 numbers

Test #22:

score: 25
Accepted
time: 0ms
memory: 17788kb

input:

tmsxctmsbthushjkboernkfxnszgzkrkvdvcevefmibqclupzn

output:

17 43 9 36 45 5 34 39 19 37 40 23 28 14 11 42 15 16 22 30 32 46 41 7 2 50 21 25 18 48 44 31 20 8 13 3 26 10 6 1 47 12 35 33 38 4 24 27 29 49 

result:

ok 50 numbers

Test #23:

score: 25
Accepted
time: 36ms
memory: 26596kb

input:

kuhtcgbqrgrvxfhpaprzbckhqfpzmrteohjuxabvtbjzpxqslilbdlkalsycwrlpfotfoqrwfzelgmhtczzjlclfccwuudfwvpkskjlxogmxzezzrwadlsotwbkkscnjryacfrxwpeanzzhmuysmvszwgjlygpcgbgjrdsnyduhjndfzkdwlpyhwpocbkkrcymjngxxsdtcowvscpthitnmncuoykwxdaaxiobtvkkxyzbqkmsaflyrnqppitvmjnpjgomyrffainynjiixsdwzvcossmjbsnzhgsfmvdcjj...

output:

88692 163088 360873 26470 229423 91161 208634 447897 379107 12848 333503 241140 447172 214305 266092 358086 352038 183294 348179 451045 223144 73571 369965 88693 91322 244197 281308 227545 163089 43592 88855 368425 202606 153582 116964 109298 68276 140431 248379 56932 24944 106217 149015 124154 9304...

result:

ok 463046 numbers

Test #24:

score: 25
Accepted
time: 56ms
memory: 30652kb

input:

gbquhtgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbquhtgbqgbq...

output:

953432 953423 953399 953336 953171 952739 951608 948647 940895 920600 867467 728363 364184 503288 139109 781496 642392 278213 417317 53138 556421 192242 887762 834629 695525 331346 470450 106271 748658 609554 245375 384479 20300 523583 159404 801791 662687 298508 437612 73433 576716 212537 928352 90...

result:

ok 953433 numbers

Test #25:

score: 25
Accepted
time: 83ms
memory: 29236kb

input:

orkkdwgzumjpimrgnmdvpjqesgjnxcxovhujkbjkyxidftajlpfarlkqfwoitvhthifoquzmryqavmqxnaenlqtpssurirqwhvgmdncrddzxxifvznunraxjreniogusydegbrvfzcnbfgrzpejwlfvtyzpglaiqxouszdcajiqwmcpsytenedsebqqjgttdqrbtyjbowhfadozolxahyzoitthoudnisiopkzppjickusgvfjhnzdbekglslnfgpvattzgzhhbdtyqvuyahqjxhctcrmbvjhhrskwenbdhk...

output:

490325 534819 992593 319626 642198 305457 796531 789454 335165 883004 4120 390093 192725 72022 38036 123030 627532 404490 73903 492664 483615 550252 331725 32763 414336 196651 444462 261822 226135 490326 638370 683485 86349 419924 88620 949443 203034 205295 87304 275218 359182 621062 222836 717403 5...

result:

ok 993264 numbers

Test #26:

score: 25
Accepted
time: 3ms
memory: 17744kb

input:

ukamzkyruvymqmfqoewpyzdrt

output:

3 23 18 15 2 6 14 12 4 17 20 13 16 24 8 25 1 9 10 19 11 7 21 22 5 

result:

ok 25 numbers

Test #27:

score: 25
Accepted
time: 28ms
memory: 24456kb

input:

ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...

output:

524287 524286 524285 524284 524283 524282 524281 524280 524279 524278 524277 524276 524275 524274 524273 524272 524271 524270 524269 524268 524267 524266 524265 524264 524263 524262 524261 524260 524259 524258 524257 524256 524255 524254 524253 524252 524251 524250 524249 524248 524247 524246 524245...

result:

ok 524287 numbers

Test #28:

score: 25
Accepted
time: 96ms
memory: 30044kb

input:

kfuqarsxhnzfukomwlgrdjrykphticxyantjdcmycglnquwsxxwekmkjlbkclnxkoninbpqaguppzzwaolrlxdtcxzwtbvjlygpgasavqichyffxriunznnxmuglcrgwthcepjbdwuydzxmbcawgjqqghzjgqpqefoqbebgfckovvuryydkongmlztyvpcqlyeaevxcwglodhvygffcnlylemcztyhsvhwchmpyulowsdqpregvcdeuxjbmwxxugrovjiowjqleyqrczxoezqyryervbfksiyhndjbowrgde...

output:

73816 653686 73817 173139 313969 593903 348238 715363 160792 859225 543614 267011 327545 874836 276798 425360 546353 394062 642921 821519 922611 226716 423237 739505 553901 393793 162380 114558 799781 577931 446981 745447 855846 205431 780956 417344 574640 410888 808068 565588 68277 735251 803966 11...

result:

ok 994183 numbers

Test #29:

score: 25
Accepted
time: 66ms
memory: 29068kb

input:

msxctmsbthushjkboernkfxnszgzkrkvdvcevefmibqclupznvuuimtnejmkjihhyxcikebojhiuusrprnfyjvzuzhwegpkfsqzqluaitsxumkcoljyrwafyvcgctyxufkkwoketfbmfdjdtlestmoggkikxgjbaotmrthnahlvubfvmbhniykppapfpudglulvxffpgiimtoetzuvvmgtxsawrstglsyajjagjtepcrqftzcwwnqufpghwmgeagetbedwnjbfrdvhbsgocodgkyfilpbztpuhoefhjyqyas...

output:

550187 179117 276956 593221 564631 333635 276821 294977 266803 286122 393906 725497 523834 483267 459405 354180 421457 447319 710264 115100 433502 201199 351292 16046 517646 58290 548417 598031 492341 507491 283814 670070 491919 526445 635705 678273 399931 437178 599985 424635 168694 76053 550188 35...

result:

ok 801300 numbers

Test #30:

score: 25
Accepted
time: 0ms
memory: 17820kb

input:

fkuhtcgbqrgrvxfhpaprzbckhq

output:

18 22 8 6 23 15 1 7 11 16 25 4 24 2 17 19 26 9 10 12 20 5 3 13 14 21 

result:

ok 26 numbers

Test #31:

score: 25
Accepted
time: 54ms
memory: 29096kb

input:

msxcmsbtmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxc...

output:

785671 785659 785627 785543 785323 784747 783239 779291 768955 741895 671051 485579 7 185479 556423 370951 70851 256323 698111 627267 441795 141695 512639 327167 27067 212539 583483 398011 97911 283383 752231 725171 654327 468855 168755 539699 354227 54127 239599 681387 610543 425071 124971 495915 3...

result:

ok 785672 numbers

Test #32:

score: 25
Accepted
time: 21ms
memory: 26364kb

input:

uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu...

output:

524288 524287 524286 524285 524284 524283 524282 524281 524280 524279 524278 524277 524276 524275 524274 524273 524272 524271 524270 524269 524268 524267 524266 524265 524264 524263 524262 524261 524260 524259 524258 524257 524256 524255 524254 524253 524252 524251 524250 524249 524248 524247 524246...

result:

ok 524288 numbers

Test #33:

score: 25
Accepted
time: 0ms
memory: 17736kb

input:

bzbxnxfrtckgfvlnsaayclgjrwfvabudblcsjnjrlfubvlvhrbezzgn

output:

18 29 19 50 33 30 44 3 1 10 21 35 32 51 7 42 27 13 12 23 54 48 37 39 24 11 34 41 22 15 46 55 38 16 5 49 40 8 25 17 36 9 43 31 28 47 14 45 26 6 4 20 2 53 52 

result:

ok 55 numbers

Test #34:

score: 25
Accepted
time: 39ms
memory: 26960kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

1000000 999999 999998 999997 999996 999995 999994 999993 999992 999991 999990 999989 999988 999987 999986 999985 999984 999983 999982 999981 999980 999979 999978 999977 999976 999975 999974 999973 999972 999971 999970 999969 999968 999967 999966 999965 999964 999963 999962 999961 999960 999959 99995...

result:

ok 1000000 numbers

Test #35:

score: 25
Accepted
time: 3ms
memory: 17800kb

input:

jofjhizstdgaqfuaphofdtrcyosejhkkcnxyreelgllgrlvhtfs

output:

16 12 33 24 10 21 38 28 39 20 3 50 14 11 41 44 5 30 18 48 6 4 29 1 32 31 40 43 42 46 34 19 2 26 17 13 23 37 45 51 27 8 9 49 22 15 47 35 25 36 7 

result:

ok 51 numbers

Test #36:

score: 25
Accepted
time: 34ms
memory: 26400kb

input:

kamzkyruvymqmfqoewpyzdrtrkzmwdvxcckmwsmuhkaobmvdalkzetetqhfvhjcgpvirkoeuhvnyixcjsifrzemlbvlaeqikyytrqlhlynrfewgaqziacutmpavtpuocdznxdspzsdklbkagxkbmmvxpdrsnjcjgdpgjxgavyolbgmedsomwsmdxnmgojpedauuickphpjmppmlgsyercqmdkohoajkuwbkkvdowkhlpjpsimufipsepdwdmcijcrvupexnnpzsgrrnfgzbbkjmjdcdttwospaxpdgqmdskj...

output:

12771 117906 162346 228040 225585 233721 223494 259118 156379 328405 82368 83352 181438 33258 153133 347817 12772 313249 143651 303673 262846 304672 213886 156452 200481 30752 29702 298799 49059 358511 117907 69289 231061 79530 112021 15988 265040 11214 90836 7732 183798 240772 352192 372238 41418 3...

result:

ok 389813 numbers

Test #37:

score: 25
Accepted
time: 45ms
memory: 29088kb

input:

rkamzkrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrkamzkrrkamzkrrkamzkrka...

output:

803379 803366 803333 803247 803022 802433 800891 796854 786285 758615 686174 496521 3 189656 568962 379309 72444 262097 713844 641403 451750 144885 524191 334538 27673 217326 596632 406979 100114 289767 769184 741514 669073 479420 172555 551861 362208 55343 244996 696743 624302 434649 127784 507090 ...

result:

ok 803383 numbers

Test #38:

score: 25
Accepted
time: 46ms
memory: 28652kb

input:

tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt...

output:

606771 759224 640980 811647 1000000 606770 759223 640979 811646 999999 606769 759222 640978 811645 999998 606768 759221 640977 811644 999997 606767 759220 640976 811643 999996 606766 759219 640975 811642 999995 606765 759218 640974 811641 999994 606764 759217 640973 811640 999993 606763 759216 64097...

result:

ok 1000000 numbers

Test #39:

score: 25
Accepted
time: 99ms
memory: 29348kb

input:

kuhtcgbqrgrvxfhpaprzbckhqfpzmrteohjuxabvtbjzpxqslilbdlkalsycwrlpfotfoqrwfzelgmhtczzjlclfccwuudfwvpkskjlxogmxzezzrwadlsotwbkkscnjryacfrxwpeanzzhmuysmvszwgjlygpcgbgjrdsnyduhjndfzkdwlpyhwpocbkkrcymjngxxsdtcowvscpthitnmncuoykwxdaaxiobtvkkxyzbqkmsaflyrnqppitvmjnpjgomyrffainynjiixsdwzvcossmjbsnzhgsfmvdcjj...

output:

928962 511568 88692 163088 608336 928963 915794 360873 695185 558146 974550 26470 229423 662432 890572 755383 91161 628477 975144 626450 208634 447897 500487 379107 12848 636345 776204 596127 641129 611119 333503 738768 837471 241140 866657 447172 214305 266092 731648 358086 560869 352038 183294 541...

result:

ok 994293 numbers

Test #40:

score: 25
Accepted
time: 0ms
memory: 15772kb

input:

xkfuqarsxhnzfukomwlgrdjrykp

output:

6 22 13 3 20 10 23 2 15 26 19 17 11 16 27 5 21 7 24 8 14 4 18 9 1 25 12 

result:

ok 27 numbers

Test #41:

score: 25
Accepted
time: 19ms
memory: 26132kb

input:

tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt...

output:

499919 499492 499858 249981 498027 496074 499950 468731 499981 499004 484356 7123 374981 499918 499491 499857 249980 498026 496073 499949 468730 499980 499003 484355 7122 374980 499917 499490 499856 249979 498025 496072 499948 468729 499979 499002 484354 7121 374979 499916 499489 499855 249978 49802...

result:

ok 499981 numbers

Test #42:

score: 25
Accepted
time: 0ms
memory: 15776kb

input:

ysmuruvrbuqvrmxmbqbylfcakbmhigggbzhysbecbrcuvrykwfjal

output:

24 52 38 26 17 41 9 19 33 23 40 43 39 22 50 32 31 30 28 35 29 51 25 48 53 21 16 27 3 14 18 11 8 42 13 5 46 37 2 10 4 6 44 7 12 45 49 15 47 20 36 1 34 

result:

ok 53 numbers

Test #43:

score: 25
Accepted
time: 40ms
memory: 24500kb

input:

orkkdwgzumjpimrgnmdvpjqesgjnxcxovhujkbjkyxidftajlpfarlkqfwoitvhthifoquzmryqavmqxnaenlqtpssurirqwhvgmdncrddzxxifvznunraxjreniogusydegbrvfzcnbfgrzpejwlfvtyzpglaiqxouszdcajiqwmcpsytenedsebqqjgttdqrbtyjbowhfadozolxahyzoitthoudnisiopkzppjickusgvfjhnzdbekglslnfgpvattzgzhhbdtyqvuyahqjxhctcrmbvjhhrskwenbdhk...

output:

319626 305457 335165 4120 390093 192725 72022 38036 123030 404490 73903 331725 32763 414336 196651 261822 226135 86349 419924 88620 203034 205295 87304 275218 359182 222836 129555 284486 78259 83451 301129 127083 142392 212396 233179 307372 173114 124678 320591 274994 182139 231308 92690 224935 3196...

result:

ok 429249 numbers

Test #44:

score: 25
Accepted
time: 0ms
memory: 15728kb

input:

fitrjctqatgxsuhqrsjmmxrnvmmowjohiqftmawbylsqqjcdhutl

output:

9 38 40 47 6 48 1 35 11 32 15 49 33 2 46 5 19 30 52 42 37 26 20 27 21 24 31 28 8 34 45 44 16 4 23 17 18 43 13 10 51 36 7 3 14 50 25 39 29 22 12 41 

result:

ok 52 numbers

Test #45:

score: 25
Accepted
time: 3ms
memory: 17720kb

input:

a

output:

1 

result:

ok 1 number(s): "1"

Test #46:

score: 25
Accepted
time: 43ms
memory: 29148kb

input:

okkkkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkkkokkokkkkok...

output:

832040 832039 832034 832021 831987 831898 831665 831055 829458 825277 814331 785674 710649 514231 2 196420 589256 392838 75027 271445 739306 664281 467863 150052 542888 346470 28659 225077 617913 421495 103684 300102 796620 767963 692938 496520 178709 571545 375127 57316 253734 721595 646570 450152 ...

result:

ok 832040 numbers

Test #47:

score: 25
Accepted
time: 86ms
memory: 29320kb

input:

sxctmsbthushjkboernkfxnszgzkrkvdvcevefmibqclupznvuuimtnejmkjihhyxcikebojhiuusrprnfyjvzuzhwegpkfsqzqluaitsxumkcoljyrwafyvcgctyxufkkwoketfbmfdjdtlestmoggkikxgjbaotmrthnahlvubfvmbhniykppapfpudglulvxffpgiimtoetzuvvmgtxsawrstglsyajjagjtepcrqftzcwwnqufpghwmgeagetbedwnjbfrdvhbsgocodgkyfilpbztpuhoefhjyqyasz...

output:

550186 179116 276955 593220 564630 333634 276820 892783 294976 266802 831442 286121 862407 393905 725496 523833 483266 459404 354179 421456 447318 939480 710263 115099 433501 201198 351291 16045 517645 813378 824658 58289 942366 548416 598030 492340 507490 283813 893501 670069 491918 526444 635704 6...

result:

ok 990812 numbers

Test #48:

score: 25
Accepted
time: 26ms
memory: 22376kb

input:

tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt...

output:

499981 124001 499980 124000 499979 123999 499978 123998 499977 123997 499976 123996 499975 123995 499974 123994 499973 123993 499972 123992 499971 123991 499970 123990 499969 123989 499968 123988 499967 123987 499966 123986 499965 123985 499964 123984 499963 123983 499962 123982 499961 123981 499960...

result:

ok 499981 numbers

Test #49:

score: 25
Accepted
time: 44ms
memory: 28236kb

input:

kfuqarsxhnzfukomwlgrdjrykphticxyantjdcmycglnquwsxxwekmkjlbkclnxkoninbpqaguppzzwaolrlxdtcxzwtbvjlygpgasavqichyffxriunznnxmuglcrgwthcepjbdwuydzxmbcawgjqqghzjgqpqefoqbebgfckovvuryydkongmlztyvpcqlyeaevxcwglodhvygffcnlylemcztyhsvhwchmpyulowsdqpregvcdeuxjbmwxxugrovjiowjqleyqrczxoezqyryervbfksiyhndjbowrgde...

output:

577624 73816 73817 173139 313969 348238 160792 543614 267011 327545 276798 425360 546353 394062 226716 423237 553901 393793 162380 114558 446981 205431 417344 574640 410888 565588 68277 11001 193640 185645 451095 294107 421691 183082 333382 301352 119194 118772 351896 540334 515099 317783 346257 222...

result:

ok 577624 numbers

Test #50:

score: 25
Accepted
time: 0ms
memory: 17828kb

input:

swayjuadxyrxlnzmkkadhleqplweklntdsvnckkrgbqgbuoclqlav

output:

19 7 52 3 42 45 37 48 20 33 8 28 23 41 44 21 5 18 17 38 29 39 51 22 30 13 49 26 16 36 31 14 47 25 43 50 24 40 11 34 1 32 6 46 53 35 2 27 12 9 4 10 15 

result:

ok 53 numbers

Test #51:

score: 25
Accepted
time: 57ms
memory: 30208kb

input:

fuqrrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqr...

output:

907062 907053 907030 906970 906813 906402 905326 902509 895134 875826 825277 692938 346470 478809 132341 743487 611148 264680 397019 50551 529358 182890 844585 794036 661697 315229 447568 101100 712246 579907 233439 365778 19310 498117 151649 762795 630456 283988 416327 69859 548666 202198 883201 86...

result:

ok 907065 numbers

Test #52:

score: 25
Accepted
time: 50ms
memory: 28464kb

input:

jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj...

output:

521652 768943 582218 305728 1000000 521651 768942 582217 305727 999999 521650 768941 582216 305726 999998 521649 768940 582215 305725 999997 521648 768939 582214 305724 999996 521647 768938 582213 305723 999995 521646 768937 582212 305722 999994 521645 768936 582211 305721 999993 521644 768935 58221...

result:

ok 1000000 numbers

Test #53:

score: 25
Accepted
time: 89ms
memory: 34892kb

input:

amzkyruvymqmfqoewpyzdrtrkzmwdvxcckmwsmuhkaobmvdalkzetetqhfvhjcgpvirkoeuhvnyixcjsifrzemlbvlaeqikyytrqlhlynrfewgaqziacutmpavtpuocdznxdspzsdklbkagxkbmmvxpdrsnjcjgdpgjxgavyolbgmedsomwsmdxnmgojpedauuickphpjmppmlgsyercqmdkohoajkuwbkkvdowkhlpjpsimufipsepdwdmcijcrvupexnnpzsgrrnfgzbbkjmjdcdttwospaxpdgqmdskju...

output:

782580 12770 495014 117905 496511 773930 779925 657611 162345 228039 411641 540240 524258 225584 544454 781810 676684 702907 233720 223493 782581 684347 965490 832943 692627 259117 897184 497153 575762 435111 156378 685565 494748 328404 82367 83351 181437 579300 595996 33257 153132 438317 590119 347...

result:

ok 991322 numbers

Test #54:

score: 25
Accepted
time: 0ms
memory: 17816kb

input:

aorkkdwgzumjpimrgnmdvpjqesgj

output:

1 20 6 25 27 17 8 14 28 12 23 5 4 19 11 15 18 2 13 22 24 16 3 26 10 21 7 9 

result:

ok 28 numbers

Test #55:

score: 25
Accepted
time: 0ms
memory: 15772kb

input:

oghfjoazbu

output:

7 9 4 2 3 5 6 1 10 8 

result:

ok 10 numbers

Test #56:

score: 25
Accepted
time: 50ms
memory: 24940kb

input:

oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo...

output:

993264 993263 993262 993261 993260 993259 993258 993257 993256 993255 993254 993253 993252 993251 993250 993249 993248 993247 993246 993245 993244 993243 993242 993241 993240 993239 993238 993237 993236 993235 993234 993233 993232 993231 993230 993229 993228 993227 993226 993225 993224 993223 993222...

result:

ok 993264 numbers

Test #57:

score: 25
Accepted
time: 3ms
memory: 15696kb

input:

aaaaa

output:

5 4 3 2 1 

result:

ok 5 number(s): "5 4 3 2 1"

Test #58:

score: 25
Accepted
time: 42ms
memory: 24980kb

input:

kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk...

output:

994183 994182 994181 994180 994179 994178 994177 994176 994175 994174 994173 994172 994171 994170 994169 994168 994167 994166 994165 994164 994163 994162 994161 994160 994159 994158 994157 994156 994155 994154 994153 994152 994151 994150 994149 994148 994147 994146 994145 994144 994143 994142 994141...

result:

ok 994183 numbers

Test #59:

score: 25
Accepted
time: 2ms
memory: 15756kb

input:

ababacaca

output:

9 1 3 7 5 2 4 8 6 

result:

ok 9 numbers

Test #60:

score: 25
Accepted
time: 0ms
memory: 17796kb

input:

azxmfatpffgbmjtuifcvbxplypmzmxphvfhuxrgywmdiespkqnbazctfewcokddkpgmfvwowajtsxgtyiebpjghkrojeiirhxhoi

output:

73 6 52 1 51 12 83 21 59 54 19 62 43 63 82 92 45 57 5 18 56 9 10 34 68 11 86 66 78 39 87 98 35 32 96 100 81 44 17 93 94 91 85 74 14 61 64 48 88 24 42 4 67 13 29 27 50 99 90 60 71 8 65 31 84 47 23 26 49 38 95 89 46 76 55 7 75 15 79 16 36 20 33 69 72 58 41 70 77 97 3 30 22 37 80 25 40 53 28 2 

result:

ok 100 numbers