QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#294165#4827. Message Made of Noiseucup-team088#AC ✓5ms12128kbC++177.2kb2023-12-30 08:57:482023-12-30 08:57:48

Judging History

This is the latest submission verdict.

  • [2023-12-30 08:57:48]
  • Judged
  • Verdict: AC
  • Time: 5ms
  • Memory: 12128kb
  • [2023-12-30 08:57:48]
  • Submitted

answer

#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<cassert>
#include<complex>
#include<numeric>
#include<array>
#include<chrono>
using namespace std;

//#define int long long
typedef long long ll;

typedef unsigned long long ul;
typedef unsigned int ui;
//ll mod = 1;
constexpr ll mod = 998244353;
//constexpr ll mod = 1000000009;
const int mod17 = 1000000007;
const ll INF = (ll)mod17 * mod17;
typedef pair<int, int>P;

#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
#define all(v) (v).begin(),(v).end()
typedef pair<ll, ll> LP;

using ld = double;
typedef pair<ld, ld> LDP;
const ld eps = 1e-10;
const ld pi = acosl(-1.0);

template<typename T>
void chmin(T& a, T b) {
	a = min(a, b);
}
template<typename T>
void chmax(T& a, T b) {
	a = max(a, b);
}
template<typename T>
vector<T> vmerge(vector<T>& a, vector<T>& b) {
	vector<T> res;
	int ida = 0, idb = 0;
	while (ida < a.size() || idb < b.size()) {
		if (idb == b.size()) {
			res.push_back(a[ida]); ida++;
		}
		else if (ida == a.size()) {
			res.push_back(b[idb]); idb++;
		}
		else {
			if (a[ida] < b[idb]) {
				res.push_back(a[ida]); ida++;
			}
			else {
				res.push_back(b[idb]); idb++;
			}
		}
	}
	return res;
}
template<typename T>
void cinarray(vector<T>& v) {
	rep(i, v.size())cin >> v[i];
}
template<typename T>
void coutarray(vector<T>& v) {
	rep(i, v.size()) {
		if (i > 0)cout << " "; cout << v[i];
	}
	cout << "\n";
}
ll mod_pow(ll x, ll n, ll m = mod) {
	if (n < 0) {
		ll res = mod_pow(x, -n, m);
		return mod_pow(res, m - 2, m);
	}
	if (abs(x) >= m)x %= m;
	if (x < 0)x += m;
	//if (x == 0)return 0;
	ll res = 1;
	while (n) {
		if (n & 1)res = res * x % m;
		x = x * x % m; n >>= 1;
	}
	return res;
}
//mod should be <2^31
struct modint {
	int n;
	modint() :n(0) { ; }
	modint(ll m) {
		if (m < 0 || mod <= m) {
			m %= mod; if (m < 0)m += mod;
		}
		n = m;
	}
	operator int() { return n; }
};
bool operator==(modint a, modint b) { return a.n == b.n; }
bool operator<(modint a, modint b) { return a.n < b.n; }
modint operator+=(modint& a, modint b) { a.n += b.n; if (a.n >= mod)a.n -= (int)mod; return a; }
modint operator-=(modint& a, modint b) { a.n -= b.n; if (a.n < 0)a.n += (int)mod; return a; }
modint operator*=(modint& a, modint b) { a.n = ((ll)a.n * b.n) % mod; return a; }
modint operator+(modint a, modint b) { return a += b; }
modint operator-(modint a, modint b) { return a -= b; }
modint operator*(modint a, modint b) { return a *= b; }
modint operator^(modint a, ll n) {
	if (n == 0)return modint(1);
	modint res = (a * a) ^ (n / 2);
	if (n % 2)res = res * a;
	return res;
}

ll inv(ll a, ll p) {
	return (a == 1 ? 1 : (1 - p * inv(p % a, a)) / a + p);
}
modint operator/(modint a, modint b) { return a * modint(inv(b, mod)); }
modint operator/=(modint& a, modint b) { a = a / b; return a; }
const int max_n = 1 << 20;
modint fact[max_n], factinv[max_n];
void init_f() {
	fact[0] = modint(1);
	for (int i = 0; i < max_n - 1; i++) {
		fact[i + 1] = fact[i] * modint(i + 1);
	}
	factinv[max_n - 1] = modint(1) / fact[max_n - 1];
	for (int i = max_n - 2; i >= 0; i--) {
		factinv[i] = factinv[i + 1] * modint(i + 1);
	}
}
modint comb(int a, int b) {
	if (a < 0 || b < 0 || a < b)return 0;
	return fact[a] * factinv[b] * factinv[a - b];
}
modint combP(int a, int b) {
	if (a < 0 || b < 0 || a < b)return 0;
	return fact[a] * factinv[a - b];
}

ll gcd(ll a, ll b) {
	a = abs(a); b = abs(b);
	if (a < b)swap(a, b);
	while (b) {
		ll r = a % b; a = b; b = r;
	}
	return a;
}
template<typename T>
void addv(vector<T>& v, int loc, T val) {
	if (loc >= v.size())v.resize(loc + 1, 0);
	v[loc] += val;
}
/*const int mn = 2000005;
bool isp[mn];
vector<int> ps;
void init() {
	fill(isp + 2, isp + mn, true);
	for (int i = 2; i < mn; i++) {
		if (!isp[i])continue;
		ps.push_back(i);
		for (int j = 2 * i; j < mn; j += i) {
			isp[j] = false;
		}
	}
}*/

//[,val)
template<typename T>
auto prev_itr(set<T>& st, T val) {
	auto res = st.lower_bound(val);
	if (res == st.begin())return st.end();
	res--; return res;
}

//[val,)
template<typename T>
auto next_itr(set<T>& st, T val) {
	auto res = st.lower_bound(val);
	return res;
}
using mP = pair<modint, modint>;
mP operator+(mP a, mP b) {
	return { a.first + b.first,a.second + b.second };
}
mP operator+=(mP& a, mP b) {
	a = a + b; return a;
}
mP operator-(mP a, mP b) {
	return { a.first - b.first,a.second - b.second };
}
mP operator-=(mP& a, mP b) {
	a = a - b; return a;
}
LP operator+(LP a, LP b) {
	return { a.first + b.first,a.second + b.second };
}
LP operator+=(LP& a, LP b) {
	a = a + b; return a;
}
LP operator-(LP a, LP b) {
	return { a.first - b.first,a.second - b.second };
}
LP operator-=(LP& a, LP b) {
	a = a - b; return a;
}

mt19937 mt(time(0));

const string drul = "DRUL";
string senw = "SENW";
//DRUL,or SENW
//int dx[4] = { 1,0,-1,0 };
//int dy[4] = { 0,1,0,-1 };

//------------------------------------

//ll dp[27][27][27][3];
//void init() {
//	dp[1][0][0][0] = 1;
//	rep(i, 26)rep(j, 26)rep(k, 26) {
//		rep(las, 3) {
//			rep(nex, 3) {
//				int ni = i, nj = j, nk = k;
//				if (nex == 0)ni++;
//				else if (nex == 1)nj++;
//				else nk++;
//				if (las == 1 && nex == 1)continue;
//				if (ni < nj || ni < nk || nj < nk)continue;
//				dp[ni][nj][nk][nex] += dp[i][j][k][las];
//			}
//		}
//	}
//	for (int n = 1; n <= 25; n++) {
//		ll sum = 0;
//		rep(l, 3)sum += dp[n][n][n][l];
//		cout << n << " " << sum << "\n";
//	}
//}

//ll dp[27][27][27];
//void init() {
//	dp[1][0][0] = 1;
//
//}

const int sup = 1000000000;
const int bl = 15;
const int dl = sup / bl;
void sol_encode() {
	string s; cin >> s;
	int n; cin >> n;
	vector<int> a(n);
	rep(i, n) {
		cin >> a[i];
	}
	vector<int> b;
	rep(i, n) {
		int loc = a[i] / dl;
		char c = 'a' + (a[i] % 26);
		if (loc < s.size() && s[loc] == c)b.push_back(a[i]);
	}
	cout << b.size() << "\n";
	coutarray(b);
}
void sol_decode() {
	int n; cin >> n;
	vector<int> b(n);
	rep(i, n)cin >> b[i];
	int ma = 0;
	rep(i, n)chmax(ma, b[i]);
	int len = ma / dl + 1;
	string res;
	res.resize(len, 'a');
	rep(i, n) {
		int loc = b[i] / dl;
		char c = 'a' + (b[i] % 26);
		res[loc] = c;
		//cout << loc << " " << c << "\n";
	}
	cout << res << "\n";
}

void solve() {
	string in; cin >> in;
	if (in == "Alisa") {
		sol_encode();
	}
	else {
		sol_decode();
	}
}



signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed<<setprecision(10);
	//init_f();
	//init();
	//while(true)
	//expr();
	//int t; cin >> t; rep(i, t)
	solve();
	return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 5ms
memory: 11836kb

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:

104
322673764 14880260 61534582 55512904 25781670 78700403 13714706 84552353 145623660 204578885 300804566 55186708 56689222 160672018 98412641 303406438 209586095 46571504 267584470 52418696 39385312 264902109 226097265 54267894 45390506 197077010 255635657 90632401 79479935 181281074 124031663 134...

input:

Eva
54
322673764 14880260 55512904 25781670 78700403 13714706 145623660 209586095 267584470 264902109 54267894 79479935 124031663 134273464 64800234 247886305 26304790 125444581 154096176 296015392 218498141 1037756 119967395 307821550 126670689 238077857 295187760 239028781 308718992 159532334 1256...

output:

spark

result:

ok single line: 'spark'

Test #2:

score: 100
Accepted
time: 5ms
memory: 11900kb

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:

78
70052126 150992024 86888478 104746734 78641928 51804479 48369749 34695101 95923634 133012478 146734342 15045185 196985244 72004050 44333249 36150633 84913440 88139494 66331771 13700127 28730337 94329808 120472522 32790445 155532014 154728406 106698398 114958832 160456258 107105454 5869941 1363436...

input:

Eva
42
70052126 150992024 86888478 78641928 51804479 34695101 95923634 15045185 196985244 44333249 36150633 66331771 28730337 120472522 32790445 154728406 114958832 107105454 5869941 14351973 65464957 92226434 20778601 71670366 41380949 98577610 59235357 122715464 191693594 72735794 94189616 1898777...

output:

zoo

result:

ok single line: 'zoo'

Test #3:

score: 100
Accepted
time: 2ms
memory: 11888kb

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:

51
54618226 20938216 114889183 51473552 46005284 99650349 82692161 36555610 121864619 59951658 93419839 102462249 87048279 85402661 3193398 85416701 119312615 108112569 3766516 123445835 2190058 82177699 28577224 51967110 13546728 74833271 32200090 80755941 55524274 38856038 64141870 38211160 594460...

input:

Eva
26
54618226 20938216 51473552 46005284 82692161 87048279 85402661 85416701 3766516 123445835 28577224 13546728 74833271 55524274 64141870 25074816 104621315 1432912 105881093 125923583 49253958 55573284 20114302 1870362 46609472 85835899 

output:

at

result:

ok single line: 'at'

Test #4:

score: 100
Accepted
time: 4ms
memory: 11864kb

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:

50
75614401 93609677 59842336 74143217 76736639 120627655 48699334 63147846 27834620 66735895 126335331 43757774 67802545 67235199 59539826 115975891 90368725 103381465 54199374 98604381 3170344 126856761 4140638 27082700 43607260 109942305 35111396 37693560 121215437 13652478 109102713 13299710 111...

input:

Eva
25
75614401 93609677 59842336 74143217 120627655 48699334 27834620 67802545 59539826 103381465 3170344 4140638 35111396 37693560 109102713 111270203 16028280 90655401 56945806 128196125 20619360 132948743 127403203 83056407 72214433 

output:

if

result:

ok single line: 'if'

Test #5:

score: 100
Accepted
time: 4ms
memory: 11844kb

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:

85
45299050 177583885 163994829 156033187 29006384 168470339 167438633 112077242 133798611 197312347 166042095 197280341 117203766 115277608 3969138 106926460 166696515 27413858 164198227 68964484 189818393 172920759 149795657 88780982 161271121 128953322 173284551 128590544 124499340 9056376 130886...

input:

Eva
50
45299050 177583885 163994829 29006384 168470339 167438633 112077242 197312347 166042095 197280341 117203766 3969138 106926460 166696515 27413858 164198227 68964484 149795657 128953322 128590544 124499340 137302969 171346069 90777392 142552135 193822705 112396522 10636110 165937003 69415220 91...

output:

eel

result:

ok single line: 'eel'

Test #6:

score: 100
Accepted
time: 4ms
memory: 12128kb

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:

88
82538846 162209287 103360374 44702348 158086727 93944292 124615764 16456156 195227389 127302032 97871228 37692488 152703479 25260120 84375278 10317296 136064701 144690123 196207251 94297008 197339161 25292906 145627293 40778532 191141905 10431306 17647138 175281203 35688694 3037244 132265848 1052...

input:

Eva
44
82538846 103360374 195227389 37692488 25260120 136064701 196207251 94297008 25292906 145627293 10431306 175281203 35688694 132265848 105281644 41028834 149272961 42913210 7335096 159142327 91901680 194519513 996998 68517592 44943368 140486599 176841307 41781586 151251457 131932528 104970684 7...

output:

cat

result:

ok single line: 'cat'

Test #7:

score: 100
Accepted
time: 4ms
memory: 12044kb

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:

104
134063852 146032666 39739431 221772289 138695856 103111792 33985475 82808340 852973 102299916 11359209 64912761 249199351 10811727 262485221 3908987 147148924 3122123 57698879 199394650 100034848 69316914 203807069 190730124 182772902 76964632 73811222 112660604 230738285 251432101 38477807 9310...

input:

Eva
49
134063852 103111792 852973 102299916 10811727 262485221 3122123 199394650 69316914 203807069 190730124 182772902 38477807 9310409 47485299 230977485 145349568 165608378 216645427 126771792 118853674 136013228 170045694 178871212 171768610 43635557 236953273 107306606 192211578 142066158 22846...

output:

real

result:

ok single line: 'real'

Test #8:

score: 100
Accepted
time: 4ms
memory: 11956kb

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:

126
44402868 246730114 262976474 201767092 44250950 94359636 316408928 101846908 47241392 252637964 97091534 75889132 29916838 99070394 144470174 248634718 171898016 268710550 36059754 132186386 76216342 229679210 118392788 157087740 38425312 152927220 212377172 259810688 203776814 255073930 1911492...

input:

Eva
67
44402868 201767092 44250950 94359636 101846908 97091534 75889132 248634718 268710550 132186386 76216342 38425312 212377172 203776814 255073930 191149248 328502568 19834584 296759584 182847578 138526860 11470644 249784282 244272880 182938604 175289456 146566034 115147494 100317276 322656936 26...

output:

queue

result:

ok single line: 'queue'

Test #9:

score: 100
Accepted
time: 5ms
memory: 11880kb

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:

147
75924356 303826576 103060998 161804597 231297293 179757441 334600903 336767223 229694497 222542859 319730152 215845597 307991828 172047765 386233939 114373988 273559196 35318948 120019212 42654588 375681319 357214299 242511535 45235686 383937931 284904088 10217508 195742137 149033345 190486731 1...

input:

Eva
70
303826576 161804597 179757441 336767223 229694497 222542859 215845597 114373988 273559196 35318948 120019212 242511535 45235686 383937931 195742137 190486731 157510645 395434481 374827765 305795166 151112799 390487851 48963514 84012176 102628176 183638487 118796432 398877297 21417294 23703167...

output:

cotton

result:

ok single line: 'cotton'

Test #10:

score: 100
Accepted
time: 5ms
memory: 11864kb

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:

188
2773185 444455354 56680935 308541234 55490759 155270544 231591683 155895064 295250034 265591649 172416842 378542938 136055530 39033175 386610010 2299595 114832384 329725618 440067256 423093936 181447786 193719084 241525789 404298276 184203786 377228118 431963784 171210442 285168040 209491761 139...

input:

Eva
101
444455354 56680935 55490759 231591683 155895064 295250034 172416842 136055530 2299595 114832384 440067256 241525789 404298276 184203786 431963784 285168040 209491761 139914918 153525580 453993324 265736261 158918188 382162580 17005637 463525158 397088582 290170882 426838898 430960834 2785136...

output:

zealous

result:

ok single line: 'zealous'

Test #11:

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

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:

199
313117394 394175644 218450652 117242104 99374254 72233972 461714634 68637834 419363052 169029580 371323698 73115710 136849198 138328858 362503016 510904814 345168972 380430328 327228738 334908930 193738212 513535260 518491172 122250120 351561982 232718386 11980566 372950908 522444368 184816858 1...

input:

Eva
94
218450652 99374254 72233972 461714634 345168972 380430328 327228738 334908930 518491172 351561982 11980566 372950908 522444368 184816858 180376968 69615928 459912028 210037260 9643062 131341046 243243082 306474810 401808658 369402506 107849838 100688320 105257326 112774212 253455258 359893812...

output:

assessee

result:

ok single line: 'assessee'

Test #12:

score: 100
Accepted
time: 5ms
memory: 12040kb

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:

247
456107448 441006466 462906552 278182079 275040837 443447060 347320956 241626528 569195087 230124518 124172424 11890692 66949856 588512541 38357262 314202505 402303906 590385581 59531532 277016239 180814467 209528176 67219658 96467656 5147826 291577877 124556808 578137631 391011070 524022629 2704...

input:

Eva
118
456107448 441006466 462906552 275040837 443447060 347320956 241626528 124172424 588512541 38357262 59531532 67219658 5147826 524022629 270471181 99628164 390808062 264430504 533833969 234736164 502512647 145383721 270590053 125382620 512775497 152160699 566230385 346339508 572825623 48724625...

output:

impatient

result:

ok single line: 'impatient'

Test #13:

score: 100
Accepted
time: 4ms
memory: 12036kb

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:

245
628390767 273152656 141678668 253681074 476449235 393060828 578752178 453562334 70662814 620593029 64427091 565943980 544100522 481072737 132848990 187334096 82819998 637216415 440005648 161578782 360994196 358807102 98262568 39037519 198374866 362815054 227118278 477765745 536581608 117278318 4...

input:

Eva
116
141678668 393060828 64427091 544100522 481072737 132848990 187334096 82819998 362815054 227118278 117278318 628327587 289270186 611703265 358480620 524200497 641545987 393403482 603295983 100329490 146376114 575850448 18910685 367816622 374946446 585147398 169631736 160305666 491593611 88965...

output:

bookkeeper

result:

ok single line: 'bookkeeper'

Test #14:

score: 100
Accepted
time: 4ms
memory: 12120kb

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:

303
475844571 256210862 444510332 449308320 388085732 389072874 115615852 477809443 86049380 577110839 438880734 281521465 36384870 441951022 600342838 22980778 10798244 148916419 83986358 9267650 12507146 82603496 111925100 561476883 593987933 29746888 12738832 604394600 221427152 541649907 3595458...

input:

Eva
168
256210862 444510332 389072874 115615852 477809443 577110839 438880734 281521465 36384870 600342838 22980778 83986358 9267650 82603496 111925100 593987933 29746888 604394600 541649907 375216746 164169735 189918107 80327560 105883142 600122254 230613732 17682602 631562858 73679698 601948208 71...

output:

copyrighted

result:

ok single line: 'copyrighted'

Test #15:

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

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:

293
776113044 697838782 511733197 229486534 499192877 763729790 98516538 728263618 587473888 286633000 473417101 208399416 267394586 40352408 540362616 444555232 305535936 530299797 243305820 618049247 661808989 259969376 596071126 148715886 757716822 770732812 561750112 365225171 338857739 26719898...

input:

Eva
144
697838782 229486534 98516538 286633000 267394586 540362616 305535936 618049247 596071126 148715886 770732812 590129606 438377528 195672900 434495416 475906731 254720574 419956346 246458398 182074744 301855428 636289547 396284329 298898942 413350396 18415714 118464674 172084088 10021484 72939...

output:

squeezeboxes

result:

ok single line: 'squeezeboxes'

Test #16:

score: 100
Accepted
time: 4ms
memory: 12048kb

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:

342
90662428 246321296 853638597 790515531 39428666 707298830 332276533 244937888 747610227 272421283 508468992 124248552 673748170 353763323 707125384 51666710 203194316 160414931 244001264 540608112 50954518 143729691 90425256 597489794 117586988 467062250 376583991 469070646 644837608 163601725 6...

input:

Eva
177
90662428 246321296 790515531 39428666 707298830 332276533 244937888 747610227 272421283 508468992 673748170 353763323 51666710 540608112 90425256 117586988 467062250 469070646 644837608 118518490 830415215 194528595 266602856 202088406 175114395 519037550 183099515 6242994 535671518 74719435...

output:

embarrassment

result:

ok single line: 'embarrassment'

Test #17:

score: 100
Accepted
time: 4ms
memory: 12076kb

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:

360
387236074 236588200 741288488 697658382 661759206 832836996 329891287 237630566 441184996 723396432 366214736 740172516 431518560 20929095 175620954 726054672 821347492 922268482 808028368 877358344 213024894 728170760 207906872 600927604 129782432 158390650 714866638 234677616 627527580 5507880...

input:

Eva
186
387236074 661759206 832836996 237630566 723396432 740172516 431518560 20929095 726054672 877358344 728170760 600927604 714866638 550788095 108259944 98606248 66747538 193851114 386770622 14210097 46569385 124888478 734085370 752724302 326808779 287440073 622715344 729642776 103023622 6077247...

output:

facelessnesses

result:

ok single line: 'facelessnesses'

Test #18:

score: 100
Accepted
time: 4ms
memory: 11912kb

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:

388
524026335 520608037 614253789 390756734 338167678 745429021 855726964 291862955 331375805 395253356 507243751 515106515 38201736 575082216 881907065 816306414 512031859 486951245 290630425 727213318 805855090 178777532 327285953 211318863 293980941 160388174 508538395 955831556 284308967 9057510...

input:

Eva
196
524026335 520608037 614253789 338167678 855726964 331375805 395253356 507243751 38201736 816306414 512031859 290630425 727213318 178777532 211318863 293980941 160388174 508538395 955831556 284308967 90575105 986189286 222743523 661221853 411935927 700196822 12577254 424344115 669695416 29177...

output:

oxyphenbutazone

result:

ok single line: 'oxyphenbutazone'

Test #19:

score: 100
Accepted
time: 4ms
memory: 11896kb

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:

388
890709753 221022920 37922164 938907480 137403944 24440176 983077268 637031909 567467218 311847499 923373475 813526117 140550594 795556138 798889390 190144216 456399363 650826469 693287549 159676558 777462972 86688329 3518470 495149650 512854974 772120466 489836186 923392819 865494865 365417076 1...

input:

Eva
209
890709753 37922164 137403944 637031909 140550594 190144216 456399363 693287549 3518470 495149650 512854974 772120466 923392819 865494865 901024369 961722168 237249598 309216715 611211491 905098361 794133652 441053747 885586739 328634321 831491987 312968411 941846104 748529704 360576890 68240...

output:

uncopyrightable

result:

ok single line: 'uncopyrightable'

Test #20:

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

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:

354
382835686 959829812 234115558 7755855 430297772 150724680 503382300 798899231 50443825 30436669 70359020 842613884 539042002 122913834 607555164 669108740 800776764 634373254 653230950 28880933 482297210 532029048 645787072 164382818 355573958 892284367 396267286 884990587 609810846 211211274 19...

input:

Eva
171
382835686 234115558 7755855 150724680 50443825 70359020 122913834 669108740 800776764 653230950 532029048 355573958 884990587 609810846 211211274 193888398 544582316 811767276 56225601 41525565 728318566 839298884 852139114 35670651 379158610 241635174 234622792 309296896 470650354 96026454 ...

output:

decommissioning

result:

ok single line: 'decommissioning'

Test #21:

score: 100
Accepted
time: 2ms
memory: 11840kb

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:

367
908762470 258829873 974346664 847348610 565956787 211866437 477911737 365747178 540713985 493369257 500830555 969760238 487639871 849929136 975296158 383584192 631671564 644408964 904947360 155819235 518329621 379842324 383001662 15599724 755487811 687550945 464914086 883888920 331070825 9299035...

input:

Eva
189
908762470 258829873 974346664 847348610 565956787 365747178 500830555 969760238 487639871 849929136 975296158 383584192 631671564 644408964 518329621 379842324 15599724 687550945 464914086 883888920 929903590 348040112 572739251 466605334 339941450 295715011 400206560 1167800 74265316 352858...

output:

kindheartedness

result:

ok single line: 'kindheartedness'

Test #22:

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

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:

402
772849545 335238503 127897135 65075192 173013323 268896460 860542856 393759199 39492700 691678238 195152687 270651226 388134047 829021860 713407400 152986563 117190283 398926907 560140932 519584840 609632523 937839830 839666208 130350625 416051133 189557877 863794312 721759250 643693095 56095418...

input:

Eva
197
772849545 65075192 268896460 860542856 393759199 270651226 388134047 560140932 609632523 130350625 643693095 560954186 410864497 859668814 599168856 521121856 843230392 872480250 151143059 329029208 218736821 446743795 625684793 956884570 137208801 971075916 134016911 144041263 719973830 474...

output:

appropriateness

result:

ok single line: 'appropriateness'