QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#129439 | #956. 后缀排序 | zyz07# | 100 ✓ | 106ms | 28668kb | C++17 | 7.6kb | 2023-07-22 19:34:38 | 2024-11-28 21:40:52 |
Judging History
你现在查看的是测评时间为 2024-11-28 21:40:52 的历史记录
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-07-22 19:34:38]
- 提交
answer
#include <bits/stdc++.h>
#include <algorithm>
#include <cassert>
#include <numeric>
#include <string>
#include <vector>
namespace atcoder {
namespace internal {
std::vector<int> sa_naive(const std::vector<int>& s) {
int n = int(s.size());
std::vector<int> sa(n);
std::iota(sa.begin(), sa.end(), 0);
std::sort(sa.begin(), sa.end(), [&](int l, int r) {
if (l == r) return false;
while (l < n && r < n) {
if (s[l] != s[r]) return s[l] < s[r];
l++;
r++;
}
return l == n;
});
return sa;
}
std::vector<int> sa_doubling(const std::vector<int>& s) {
int n = int(s.size());
std::vector<int> sa(n), rnk = s, tmp(n);
std::iota(sa.begin(), sa.end(), 0);
for (int k = 1; k < n; k *= 2) {
auto cmp = [&](int x, int y) {
if (rnk[x] != rnk[y]) return rnk[x] < rnk[y];
int rx = x + k < n ? rnk[x + k] : -1;
int ry = y + k < n ? rnk[y + k] : -1;
return rx < ry;
};
std::sort(sa.begin(), sa.end(), cmp);
tmp[sa[0]] = 0;
for (int i = 1; i < n; i++) {
tmp[sa[i]] = tmp[sa[i - 1]] + (cmp(sa[i - 1], sa[i]) ? 1 : 0);
}
std::swap(tmp, rnk);
}
return sa;
}
template <int THRESHOLD_NAIVE = 10, int THRESHOLD_DOUBLING = 40>
std::vector<int> sa_is(const std::vector<int>& s, int upper) {
int n = int(s.size());
if (n == 0) return {};
if (n == 1) return {0};
if (n == 2) {
if (s[0] < s[1]) {
return {0, 1};
} else {
return {1, 0};
}
}
if (n < THRESHOLD_NAIVE) {
return sa_naive(s);
}
if (n < THRESHOLD_DOUBLING) {
return sa_doubling(s);
}
std::vector<int> sa(n);
std::vector<bool> ls(n);
for (int i = n - 2; i >= 0; i--) {
ls[i] = (s[i] == s[i + 1]) ? ls[i + 1] : (s[i] < s[i + 1]);
}
std::vector<int> sum_l(upper + 1), sum_s(upper + 1);
for (int i = 0; i < n; i++) {
if (!ls[i]) {
sum_s[s[i]]++;
} else {
sum_l[s[i] + 1]++;
}
}
for (int i = 0; i <= upper; i++) {
sum_s[i] += sum_l[i];
if (i < upper) sum_l[i + 1] += sum_s[i];
}
auto induce = [&](const std::vector<int>& lms) {
std::fill(sa.begin(), sa.end(), -1);
std::vector<int> buf(upper + 1);
std::copy(sum_s.begin(), sum_s.end(), buf.begin());
for (auto d : lms) {
if (d == n) continue;
sa[buf[s[d]]++] = d;
}
std::copy(sum_l.begin(), sum_l.end(), buf.begin());
sa[buf[s[n - 1]]++] = n - 1;
for (int i = 0; i < n; i++) {
int v = sa[i];
if (v >= 1 && !ls[v - 1]) {
sa[buf[s[v - 1]]++] = v - 1;
}
}
std::copy(sum_l.begin(), sum_l.end(), buf.begin());
for (int i = n - 1; i >= 0; i--) {
int v = sa[i];
if (v >= 1 && ls[v - 1]) {
sa[--buf[s[v - 1] + 1]] = v - 1;
}
}
};
std::vector<int> lms_map(n + 1, -1);
int m = 0;
for (int i = 1; i < n; i++) {
if (!ls[i - 1] && ls[i]) {
lms_map[i] = m++;
}
}
std::vector<int> lms;
lms.reserve(m);
for (int i = 1; i < n; i++) {
if (!ls[i - 1] && ls[i]) {
lms.push_back(i);
}
}
induce(lms);
if (m) {
std::vector<int> sorted_lms;
sorted_lms.reserve(m);
for (int v : sa) {
if (lms_map[v] != -1) sorted_lms.push_back(v);
}
std::vector<int> rec_s(m);
int rec_upper = 0;
rec_s[lms_map[sorted_lms[0]]] = 0;
for (int i = 1; i < m; i++) {
int l = sorted_lms[i - 1], r = sorted_lms[i];
int end_l = (lms_map[l] + 1 < m) ? lms[lms_map[l] + 1] : n;
int end_r = (lms_map[r] + 1 < m) ? lms[lms_map[r] + 1] : n;
bool same = true;
if (end_l - l != end_r - r) {
same = false;
} else {
while (l < end_l) {
if (s[l] != s[r]) {
break;
}
l++;
r++;
}
if (l == n || s[l] != s[r]) same = false;
}
if (!same) rec_upper++;
rec_s[lms_map[sorted_lms[i]]] = rec_upper;
}
auto rec_sa =
sa_is<THRESHOLD_NAIVE, THRESHOLD_DOUBLING>(rec_s, rec_upper);
for (int i = 0; i < m; i++) {
sorted_lms[i] = lms[rec_sa[i]];
}
induce(sorted_lms);
}
return sa;
}
} // namespace internal
std::vector<int> suffix_array(const std::vector<int>& s, int upper) {
assert(0 <= upper);
for (int d : s) {
assert(0 <= d && d <= upper);
}
auto sa = internal::sa_is(s, upper);
return sa;
}
template <class T> std::vector<int> suffix_array(const std::vector<T>& s) {
int n = int(s.size());
std::vector<int> idx(n);
iota(idx.begin(), idx.end(), 0);
sort(idx.begin(), idx.end(), [&](int l, int r) { return s[l] < s[r]; });
std::vector<int> s2(n);
int now = 0;
for (int i = 0; i < n; i++) {
if (i && s[idx[i - 1]] != s[idx[i]]) now++;
s2[idx[i]] = now;
}
return internal::sa_is(s2, now);
}
std::vector<int> suffix_array(const std::string& s) {
int n = int(s.size());
std::vector<int> s2(n);
for (int i = 0; i < n; i++) {
s2[i] = s[i];
}
return internal::sa_is(s2, 255);
}
template <class T>
std::vector<int> lcp_array(const std::vector<T>& s,
const std::vector<int>& sa) {
int n = int(s.size());
assert(n >= 1);
std::vector<int> rnk(n);
for (int i = 0; i < n; i++) {
rnk[sa[i]] = i;
}
std::vector<int> lcp(n - 1);
int h = 0;
for (int i = 0; i < n; i++) {
if (h > 0) h--;
if (rnk[i] == 0) continue;
int j = sa[rnk[i] - 1];
for (; j + h < n && i + h < n; h++) {
if (s[j + h] != s[i + h]) break;
}
lcp[rnk[i] - 1] = h;
}
return lcp;
}
std::vector<int> lcp_array(const std::string& s, const std::vector<int>& sa) {
int n = int(s.size());
std::vector<int> s2(n);
for (int i = 0; i < n; i++) {
s2[i] = s[i];
}
return lcp_array(s2, sa);
}
template <class T> std::vector<int> z_algorithm(const std::vector<T>& s) {
int n = int(s.size());
if (n == 0) return {};
std::vector<int> z(n);
z[0] = 0;
for (int i = 1, j = 0; i < n; i++) {
int& k = z[i];
k = (j + z[j] <= i) ? 0 : std::min(j + z[j] - i, z[i - j]);
while (i + k < n && s[k] == s[i + k]) k++;
if (j + z[j] < i + z[i]) j = i;
}
z[0] = n;
return z;
}
std::vector<int> z_algorithm(const std::string& s) {
int n = int(s.size());
std::vector<int> s2(n);
for (int i = 0; i < n; i++) {
s2[i] = s[i];
}
return z_algorithm(s2);
}
} // namespace atcoder
using namespace std;
#define For(Ti,Ta,Tb) for(auto Ti=(Ta);Ti<=(Tb);++Ti)
#define Dec(Ti,Ta,Tb) for(auto Ti=(Ta);Ti>=(Tb);--Ti)
#define debug(...) fprintf(stderr,__VA_ARGS__)
#define range(Tx) begin(Tx),end(Tx)
using ll=long long;
string s;
int main(){
cin.tie(nullptr)->sync_with_stdio(false);
cin>>s;
auto sa=atcoder::suffix_array(s);
For(i,0,int(s.size())-1) cout<<sa[i]+1<<" \n"[i==int(s.size())-1];
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 25
Accepted
Test #1:
score: 25
Accepted
time: 0ms
memory: 3624kb
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: 3604kb
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: 3640kb
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: 1ms
memory: 3944kb
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: 1ms
memory: 4072kb
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: 10ms
memory: 5824kb
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: 10ms
memory: 6024kb
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: 105ms
memory: 28540kb
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: 106ms
memory: 28664kb
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: 96ms
memory: 28668kb
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: 28ms
memory: 9468kb
input:
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk...
output:
494293 494292 494291 494290 494289 494288 494287 494286 494285 494284 494283 494282 494281 494280 494279 494278 494277 494276 494275 494274 494273 494272 494271 494270 494269 494268 494267 494266 494265 494264 494263 494262 494261 494260 494259 494258 494257 494256 494255 494254 494253 494252 494251...
result:
ok 494293 numbers
Test #12:
score: 25
Accepted
time: 26ms
memory: 9856kb
input:
ukamzkyruvymqmfqoewpyzdrtrkzmwdvxcckmwsmuhkaobmvdalkzetetqhfvhjcgpvirkoeuhvnyixcjsifrzemlbvlaeqikyytrqlhlynrfewgaqziacutmpavtpuocdznxdspzsdklbkagxkbmmvxpdrsnjcjgdpgjxgavyolbgmedsomwsmdxnmgojpedauuickphpjmppmlgsyercqmdkohoajkuwbkkvdowkhlpjpsimufipsepdwdmcijcrvupexnnpzsgrrnfgzbbkjmjdcdttwospaxpdgqmdsk...
output:
12772 117907 162347 228041 225586 233722 223495 259119 156380 82369 83353 181439 33259 153134 12773 143652 213887 156453 200482 30753 29703 49060 117908 69290 231062 79531 112022 15989 11215 90837 7733 183799 240773 41419 160190 28958 129822 128264 102169 247780 123357 222081 166805 140556 110611 11...
result:
ok 262144 numbers
Test #13:
score: 25
Accepted
time: 0ms
memory: 3636kb
input:
mississippi
output:
11 8 5 2 1 10 9 7 4 6 3
result:
ok 11 numbers
Test #14:
score: 25
Accepted
time: 47ms
memory: 19228kb
input:
badabacabaeabacabadabacabafabacabadabacabaeabacabadabacabaiabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabagabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabahabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabagabacabadabacabaeabacabadabacabafabacabadabacabaea...
output:
493306 493304 493300 493292 493276 493244 493116 492860 492348 491324 487228 454460 323388 61244 192316 388924 126780 257852 356156 94012 225084 421692 159548 290620 28476 470844 339772 77628 208700 405308 143164 274236 12092 372540 110396 241468 438076 175932 307004 44860 462652 331580 69436 200508...
result:
ok 493306 numbers
Test #15:
score: 25
Accepted
time: 28ms
memory: 9432kb
input:
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...
output:
490812 490811 490810 490809 490808 490807 490806 490805 490804 490803 490802 490801 490800 490799 490798 490797 490796 490795 490794 490793 490792 490791 490790 490789 490788 490787 490786 490785 490784 490783 490782 490781 490780 490779 490778 490777 490776 490775 490774 490773 490772 490771 490770...
result:
ok 490812 numbers
Test #16:
score: 25
Accepted
time: 42ms
memory: 19372kb
input:
abadabacabagabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabaiabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabagabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabahabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabagabacabadabacabaeabacabadabacabaf...
output:
491321 491317 491309 491277 491213 491085 490829 486733 478541 462157 396621 134477 265549 3405 200013 331085 68941 429389 167245 298317 36173 232781 363853 101709 413005 150861 281933 19789 216397 347469 85325 445773 183629 314701 52557 249165 380237 118093 470349 404813 142669 273741 11597 208205 ...
result:
ok 491322 numbers
Test #17:
score: 25
Accepted
time: 24ms
memory: 9440kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
491322 491321 491320 491319 491318 491317 491316 491315 491314 491313 491312 491311 491310 491309 491308 491307 491306 491305 491304 491303 491302 491301 491300 491299 491298 491297 491296 491295 491294 491293 491292 491291 491290 491289 491288 491287 491286 491285 491284 491283 491282 491281 491280...
result:
ok 491322 numbers
Test #18:
score: 25
Accepted
time: 29ms
memory: 9704kb
input:
fkuhtcgbqrgrvxfhpaprzbckhqfpzmrteohjuxabvtbjzpxqslilbdlkalsycwrlpfotfoqrwfzelgmhtczzjlclfccwuudfwvpkskjlxogmxzezzrwadlsotwbkkscnjryacfrxwpeanzzhmuysmvszwgjlygpcgbgjrdsnyduhjndfzkdwlpyhwpocbkkrcymjngxxsdtcowvscpthitnmncuoykwxdaaxiobtvkkxyzbqkmsaflyrnqppitvmjnpjgomyrffainynjiixsdwzvcossmjbsnzhgsfmvdcj...
output:
88693 163089 26471 229424 91162 208635 12849 241141 214306 183295 223145 73572 88694 91323 244198 227546 163090 43593 88856 202607 153583 116965 109299 68277 140432 248380 56933 24945 106218 149016 124155 9305 94411 214783 141261 213992 26598 50831 135224 83675 240398 34685 29741 237247 123549 36028...
result:
ok 262143 numbers
Test #19:
score: 25
Accepted
time: 0ms
memory: 3544kb
input:
abcbcba
output:
7 1 6 4 2 5 3
result:
ok 7 numbers
Test #20:
score: 25
Accepted
time: 0ms
memory: 3832kb
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: 28ms
memory: 9776kb
input:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
output:
323793 7826 455174 500000 323792 7825 455173 499999 323791 7824 455172 499998 323790 7823 455171 499997 323789 7822 455170 499996 323788 7821 455169 499995 323787 7820 455168 499994 323786 7819 455167 499993 323785 7818 455166 499992 323784 7817 455165 499991 323783 7816 455164 499990 323782 7815 45...
result:
ok 500000 numbers
Test #22:
score: 25
Accepted
time: 0ms
memory: 3604kb
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: 52ms
memory: 14656kb
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: 20ms
memory: 11764kb
input:
gbquhtgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbqgbquhtgbquhtgbqgbquhtgbquhtgbqgbq...
output:
364178 364169 364145 364082 363917 363485 362354 359393 351641 331346 278213 139109 192242 53138 298508 245375 106271 159404 20300 212537 73433 339098 318803 265670 126566 179699 40595 285965 232832 93728 146861 7757 199994 60890 306260 253127 114023 167156 28052 220289 81185 354602 346850 326555 27...
result:
ok 364179 numbers
Test #25:
score: 25
Accepted
time: 52ms
memory: 15504kb
input:
orkkdwgzumjpimrgnmdvpjqesgjnxcxovhujkbjkyxidftajlpfarlkqfwoitvhthifoquzmryqavmqxnaenlqtpssurirqwhvgmdncrddzxxifvznunraxjreniogusydegbrvfzcnbfgrzpejwlfvtyzpglaiqxouszdcajiqwmcpsytenedsebqqjgttdqrbtyjbowhfadozolxahyzoitthoudnisiopkzppjickusgvfjhnzdbekglslnfgpvattzgzhhbdtyqvuyahqjxhctcrmbvjhhrskwenbdhk...
output:
490325 319626 305457 335165 4120 390093 192725 72022 38036 123030 404490 73903 492664 483615 331725 32763 414336 196651 444462 261822 226135 490326 86349 419924 88620 203034 205295 87304 275218 359182 222836 129555 284486 78259 476844 83451 301129 127083 142392 212396 477489 233179 307372 173114 124...
result:
ok 493264 numbers
Test #26:
score: 25
Accepted
time: 0ms
memory: 3832kb
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: 11ms
memory: 6592kb
input:
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
output:
262143 262142 262141 262140 262139 262138 262137 262136 262135 262134 262133 262132 262131 262130 262129 262128 262127 262126 262125 262124 262123 262122 262121 262120 262119 262118 262117 262116 262115 262114 262113 262112 262111 262110 262109 262108 262107 262106 262105 262104 262103 262102 262101...
result:
ok 262143 numbers
Test #28:
score: 25
Accepted
time: 44ms
memory: 15528kb
input:
kfuqarsxhnzfukomwlgrdjrykphticxyantjdcmycglnquwsxxwekmkjlbkclnxkoninbpqaguppzzwaolrlxdtcxzwtbvjlygpgasavqichyffxriunznnxmuglcrgwthcepjbdwuydzxmbcawgjqqghzjgqpqefoqbebgfckovvuryydkongmlztyvpcqlyeaevxcwglodhvygffcnlylemcztyhsvhwchmpyulowsdqpregvcdeuxjbmwxxugrovjiowjqleyqrczxoezqyryervbfksiyhndjbowrgde...
output:
73816 73817 173139 313969 348238 160792 267011 327545 276798 425360 394062 226716 423237 393793 162380 114558 446981 205431 417344 410888 68277 11001 193640 185645 451095 294107 421691 183082 333382 301352 119194 118772 351896 317783 346257 222559 33717 265096 51366 353526 11778 73818 412875 121640 ...
result:
ok 494183 numbers
Test #29:
score: 25
Accepted
time: 26ms
memory: 10212kb
input:
msxctmsbthushjkboernkfxnszgzkrkvdvcevefmibqclupznvuuimtnejmkjihhyxcikebojhiuusrprnfyjvzuzhwegpkfsqzqluaitsxumkcoljyrwafyvcgctyxufkkwoketfbmfdjdtlestmoggkikxgjbaotmrthnahlvubfvmbhniykppapfpudglulvxffpgiimtoetzuvvmgtxsawrstglsyajjagjtepcrqftzcwwnqufpghwmgeagetbedwnjbfrdvhbsgocodgkyfilpbztpuhoefhjyqyas...
output:
179117 276956 276821 266803 115100 201199 16046 58290 168694 76053 179118 127782 102784 54878 234281 114616 251010 157392 154047 253183 276957 213987 153046 44097 6286 129311 104823 65394 258438 75563 61817 82480 161790 276822 29604 156002 201550 8963 208234 48315 95314 96556 51524 34608 253303 7130...
result:
ok 277012 numbers
Test #30:
score: 25
Accepted
time: 0ms
memory: 3612kb
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: 27ms
memory: 15552kb
input:
msbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxcmsbtmsbtmsxcmsbtmsxcmsbtmsbtmsxc...
output:
485571 485559 485527 485443 485223 484647 483139 479191 468855 441795 370951 185479 256323 70851 398011 327167 141695 212539 27067 283383 97911 452131 425071 354227 168755 239599 54127 381287 310443 124971 195815 10343 266659 81187 408347 337503 152031 222875 37403 293719 108247 472803 462467 435407...
result:
ok 485572 numbers
Test #32:
score: 25
Accepted
time: 11ms
memory: 6572kb
input:
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu...
output:
262144 262143 262142 262141 262140 262139 262138 262137 262136 262135 262134 262133 262132 262131 262130 262129 262128 262127 262126 262125 262124 262123 262122 262121 262120 262119 262118 262117 262116 262115 262114 262113 262112 262111 262110 262109 262108 262107 262106 262105 262104 262103 262102...
result:
ok 262144 numbers
Test #33:
score: 25
Accepted
time: 0ms
memory: 3576kb
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: 32ms
memory: 9760kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
500000 499999 499998 499997 499996 499995 499994 499993 499992 499991 499990 499989 499988 499987 499986 499985 499984 499983 499982 499981 499980 499979 499978 499977 499976 499975 499974 499973 499972 499971 499970 499969 499968 499967 499966 499965 499964 499963 499962 499961 499960 499959 499958...
result:
ok 500000 numbers
Test #35:
score: 25
Accepted
time: 0ms
memory: 3572kb
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: 35ms
memory: 12872kb
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: 26ms
memory: 14872kb
input:
kamzkrrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrkamzkrrkamzkrrkamzkrkamzkrrkamzkrkamzkrrkamzkrrkamzkrka...
output:
496514 496501 496468 496382 496157 495568 494026 489989 479420 451750 379309 189656 262097 72444 406979 334538 144885 217326 27673 289767 100114 462319 434649 362208 172555 244996 55343 389878 317437 127784 200225 10572 272666 83013 417548 345107 155454 227895 38242 300336 110683 483457 472888 44521...
result:
ok 496518 numbers
Test #38:
score: 25
Accepted
time: 29ms
memory: 9776kb
input:
tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt...
output:
82483 234936 116692 287359 500000 82482 234935 116691 287358 499999 82481 234934 116690 287357 499998 82480 234933 116689 287356 499997 82479 234932 116688 287355 499996 82478 234931 116687 287354 499995 82477 234930 116686 287353 499994 82476 234929 116685 287352 499993 82475 234928 116684 287351 4...
result:
ok 500000 numbers
Test #39:
score: 25
Accepted
time: 39ms
memory: 15612kb
input:
kuhtcgbqrgrvxfhpaprzbckhqfpzmrteohjuxabvtbjzpxqslilbdlkalsycwrlpfotfoqrwfzelgmhtczzjlclfccwuudfwvpkskjlxogmxzezzrwadlsotwbkkscnjryacfrxwpeanzzhmuysmvszwgjlygpcgbgjrdsnyduhjndfzkdwlpyhwpocbkkrcymjngxxsdtcowvscpthitnmncuoykwxdaaxiobtvkkxyzbqkmsaflyrnqppitvmjnpjgomyrffainynjiixsdwzvcossmjbsnzhgsfmvdcjj...
output:
88692 163088 360873 26470 229423 91161 208634 447897 379107 12848 333503 241140 447172 214305 266092 358086 352038 183294 348179 451045 471440 223144 73571 369965 88693 91322 244197 281308 227545 163089 43592 88855 368425 202606 153582 116964 109298 68276 140431 248379 56932 24944 106217 149015 1241...
result:
ok 494293 numbers
Test #40:
score: 25
Accepted
time: 0ms
memory: 3516kb
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: 24ms
memory: 9684kb
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: 3572kb
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: 48ms
memory: 14092kb
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: 3520kb
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: 0ms
memory: 3572kb
input:
a
output:
1
result:
ok 1 number(s): "1"
Test #46:
score: 25
Accepted
time: 19ms
memory: 9712kb
input:
okkkkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkkkokkokkkkokkokkkkokkkkokkokkkkokkkkokkokkkkok...
output:
317811 317810 317805 317792 317758 317669 317436 316826 315229 311048 300102 271445 196420 2 75027 225077 150052 28659 103684 282391 253734 178709 57316 207366 132341 10948 85973 236023 160998 39605 114630 304283 293337 264680 189655 68262 218312 143287 21894 96919 275626 246969 171944 50551 200601 ...
result:
ok 317811 numbers
Test #47:
score: 25
Accepted
time: 42ms
memory: 15496kb
input:
sxctmsbthushjkboernkfxnszgzkrkvdvcevefmibqclupznvuuimtnejmkjihhyxcikebojhiuusrprnfyjvzuzhwegpkfsqzqluaitsxumkcoljyrwafyvcgctyxufkkwoketfbmfdjdtlestmoggkikxgjbaotmrthnahlvubfvmbhniykppapfpudglulvxffpgiimtoetzuvvmgtxsawrstglsyajjagjtepcrqftzcwwnqufpghwmgeagetbedwnjbfrdvhbsgocodgkyfilpbztpuhoefhjyqyasz...
output:
179116 276955 333634 276820 294976 266802 286121 393905 483266 459404 354179 421456 447318 115099 433501 201198 351291 16045 58289 283813 399930 437177 424634 168693 76052 350101 179117 127781 363093 444955 316479 467927 298724 102783 54877 234280 426131 114615 251009 157391 154046 289853 323445 253...
result:
ok 490812 numbers
Test #48:
score: 25
Accepted
time: 32ms
memory: 9780kb
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: 6ms
memory: 4404kb
input:
kfuqarsxhnzfukomwlgrdjrykphticxyantjdcmycglnquwsxxwekmkjlbkclnxkoninbpqaguppzzwaolrlxdtcxzwtbvjlygpgasavqichyffxriunznnxmuglcrgwthcepjbdwuydzxmbcawgjqqghzjgqpqefoqbebgfckovvuryydkongmlztyvpcqlyeaevxcwglodhvygffcnlylemcztyhsvhwchmpyulowsdqpregvcdeuxjbmwxxugrovjiowjqleyqrczxoezqyryervbfksiyhndjbowrgde...
output:
11001 33717 51366 11778 35050 30778 36134 20376 22867 53080 1585 6106 13448 30160 11550 21933 4250 50089 45787 44627 15128 12297 34425 4539 48739 2186 7708 32228 15261 7594 21815 34871 51631 53103 37663 29702 19513 8484 38503 21862 30923 20477 18223 8437 1360 46739 44174 11002 13296 7616 24906 22656...
result:
ok 53336 numbers
Test #50:
score: 25
Accepted
time: 0ms
memory: 3876kb
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: 23ms
memory: 12876kb
input:
fuqrrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrrfuqrfuqrrfuqrfuqrrfuqr...
output:
346465 346456 346433 346373 346216 345805 344729 341912 334537 315229 264680 132341 182890 50551 283988 233439 101100 151649 19310 202198 69859 322604 303296 252747 120408 170957 38618 272055 221506 89167 139716 7377 190265 57926 291363 240814 108475 159024 26685 209573 77234 337354 329979 310671 26...
result:
ok 346468 numbers
Test #52:
score: 25
Accepted
time: 28ms
memory: 9776kb
input:
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj...
output:
244655 415428 57930 305728 500000 244654 415427 57929 305727 499999 244653 415426 57928 305726 499998 244652 415425 57927 305725 499997 244651 415424 57926 305724 499996 244650 415423 57925 305723 499995 244649 415422 57924 305722 499994 244648 415421 57923 305721 499993 244647 415420 57922 305720 4...
result:
ok 500000 numbers
Test #53:
score: 25
Accepted
time: 55ms
memory: 15464kb
input:
amzkyruvymqmfqoewpyzdrtrkzmwdvxcckmwsmuhkaobmvdalkzetetqhfvhjcgpvirkoeuhvnyixcjsifrzemlbvlaeqikyytrqlhlynrfewgaqziacutmpavtpuocdznxdspzsdklbkagxkbmmvxpdrsnjcjgdpgjxgavyolbgmedsomwsmdxnmgojpedauuickphpjmppmlgsyercqmdkohoajkuwbkkvdowkhlpjpsimufipsepdwdmcijcrvupexnnpzsgrrnfgzbbkjmjdcdttwospaxpdgqmdskju...
output:
12770 117905 162345 228039 411641 225584 233720 223493 259117 435111 156378 328404 82367 83351 181437 33257 153132 438317 347816 12771 313248 143650 303672 262845 454232 304671 213885 156451 473239 200480 30751 29701 298798 49058 358510 453364 117906 69288 481495 231060 79529 112020 412908 15987 265...
result:
ok 491322 numbers
Test #54:
score: 25
Accepted
time: 0ms
memory: 3568kb
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: 3576kb
input:
oghfjoazbu
output:
7 9 4 2 3 5 6 1 10 8
result:
ok 10 numbers
Test #56:
score: 25
Accepted
time: 24ms
memory: 9444kb
input:
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo...
output:
493264 493263 493262 493261 493260 493259 493258 493257 493256 493255 493254 493253 493252 493251 493250 493249 493248 493247 493246 493245 493244 493243 493242 493241 493240 493239 493238 493237 493236 493235 493234 493233 493232 493231 493230 493229 493228 493227 493226 493225 493224 493223 493222...
result:
ok 493264 numbers
Test #57:
score: 25
Accepted
time: 0ms
memory: 3568kb
input:
aaaaa
output:
5 4 3 2 1
result:
ok 5 number(s): "5 4 3 2 1"
Test #58:
score: 25
Accepted
time: 24ms
memory: 9516kb
input:
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk...
output:
494183 494182 494181 494180 494179 494178 494177 494176 494175 494174 494173 494172 494171 494170 494169 494168 494167 494166 494165 494164 494163 494162 494161 494160 494159 494158 494157 494156 494155 494154 494153 494152 494151 494150 494149 494148 494147 494146 494145 494144 494143 494142 494141...
result:
ok 494183 numbers
Test #59:
score: 25
Accepted
time: 0ms
memory: 3796kb
input:
ababacaca
output:
9 1 3 7 5 2 4 8 6
result:
ok 9 numbers
Test #60:
score: 25
Accepted
time: 0ms
memory: 3568kb
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