QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#142631#4001. Barbecuechenxinyang2006AC ✓235ms22376kbC++142.1kb2023-08-19 15:02:122023-08-19 15:02:15

Judging History

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

  • [2023-08-19 15:02:15]
  • 评测
  • 测评结果:AC
  • 用时:235ms
  • 内存:22376kb
  • [2023-08-19 15:02:12]
  • 提交

answer

#include <bits/stdc++.h>
#define rep(i,j,k) for(int i=(j);i<=(k);i++)
#define per(i,j,k) for(int i=(j);i>=(k);i--)
#define uint unsigned int
#define ll long long
#define ull unsigned long long
#define db double
#define ldb long double
#define pii pair<int,int>
#define pll pair<ll,ll>
#define mkp make_pair
#define eb emplace_back
#define SZ(S) (int)S.size()
//#define mod 998244353
//#define mod 1000000007
#define inf 0x3f3f3f3f
#define linf 0x3f3f3f3f3f3f3f3f
using namespace std;

template <class T>
void chkmax(T &x,T y){
	if(x < y) x = y;
}

template <class T>
void chkmin(T &x,T y){
	if(x > y) x = y;
}

inline int popcnt(int x){
	return __builtin_popcount(x);
}

inline int ctz(int x){
	return __builtin_ctz(x);
}


/*ll power(ll p,int k = mod - 2){
	ll ans = 1;
	while(k){
		if(k % 2 == 1) ans = ans * p % mod;
		p = p * p % mod;
		k /= 2;	
	}
	return ans;
}*/
int n,q;
char s[2000005],str[1000005];
int res[2][1000005],dp[2000005];

int chk(int l,int r){
	int pos = (l + r) / 2;
	if(l % 2 == r % 2) return res[0][pos] >= r - pos + 1;
	return res[1][pos] >= pos - l + 1;
}

int getres(int l,int r){
	assert(l % 2 != r % 2);
	int pos = (l + r) >> 1;
	if(s[pos] != s[pos + 1]) return 0;
	if(s[pos] == s[pos - 1] || s[pos] == s[pos + 2]) return 1;
	return 0;
}

int f(int l,int r){
	if(chk(l,r)) return 0;

	if(l % 2 != r % 2) return getres(l,r);
	int ans = 0;
	if(!chk(l + 1,r) && !getres(l + 1,r)) ans = 1;
	if(!chk(l,r - 1) && !getres(l,r - 1)) ans = 1;
	return ans;
}

int main(){
	scanf("%d%d",&n,&q);
	scanf("%s",str + 1);
	rep(i,1,n){
		s[2 * i - 1] = str[i];
		s[2 * i] = '*'; 
	}
	s[0] = '?';s[2 * n] = '!';
	int pos = 0,r = 0;
	rep(i,1,2 * n){
		if(i <= r) dp[i] = min(dp[2 * pos - i],r - i + 1);
		else dp[i] = 1;

		while(s[i - dp[i]] == s[i + dp[i]]) dp[i]++;

		if(i + dp[i] - 1 > r){
			pos = i;
			r = i + dp[i] - 1;
		}

		if(i % 2 == 1) res[0][i / 2 + 1] = (dp[i] + 1) / 2;
		else res[1][i / 2] = dp[i] / 2;
	}

	rep(i,1,q){
		int pl,pr;
		scanf("%d%d",&pl,&pr);
		if(f(pl,pr)) printf("Putata\n");
		else printf("Budada\n");
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

7 3
potatop
1 3
3 5
1 6

output:

Putata
Budada
Budada

result:

ok 3 lines

Test #2:

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

input:

10 10
tdttttpptd
2 4
1 2
1 4
5 10
1 4
3 9
2 2
8 9
6 10
6 10

output:

Putata
Budada
Budada
Budada
Budada
Putata
Budada
Budada
Putata
Putata

result:

ok 10 lines

Test #3:

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

input:

100 50000
kttktkkktkkkkkttkkkkttktktttkkkttkkktttttkkkkkkkttkktktktktkkkkkktkttktkktkkttkktttktkttkttktkkttktt
3 96
55 62
49 73
38 77
93 93
37 66
10 29
17 78
80 98
12 74
38 56
23 87
27 79
36 69
47 84
25 45
21 86
68 83
55 71
53 72
45 67
26 74
20 85
40 85
27 59
89 90
44 54
15 26
7 76
9 62
28 100
42 66...

output:

Budada
Budada
Putata
Budada
Budada
Budada
Budada
Budada
Putata
Putata
Putata
Putata
Putata
Budada
Budada
Putata
Budada
Budada
Putata
Budada
Putata
Putata
Budada
Budada
Putata
Budada
Putata
Budada
Budada
Budada
Putata
Putata
Putata
Putata
Budada
Budada
Putata
Budada
Budada
Putata
Putata
Putata
Putata...

result:

ok 50000 lines

Test #4:

score: 0
Accepted
time: 9ms
memory: 9796kb

input:

100 50000
jbkdadjkabbjkdbbbbadajakaabkjkkkjabbkdkajjddaaajbjbjdkdddbbaaakdkbadjabbkkbdkdajkdbdjdjbaaabkbbkbkdd
29 47
53 62
29 38
72 97
58 77
77 88
73 90
26 90
74 81
36 43
46 59
3 29
23 43
35 62
33 95
14 99
49 49
5 11
12 23
5 23
27 33
33 95
42 54
47 77
11 81
24 27
47 70
32 73
6 72
84 92
6 57
79 93
9 ...

output:

Putata
Budada
Budada
Budada
Budada
Budada
Budada
Putata
Budada
Budada
Budada
Putata
Putata
Budada
Putata
Budada
Budada
Putata
Budada
Putata
Putata
Putata
Putata
Putata
Putata
Budada
Budada
Budada
Putata
Putata
Budada
Putata
Putata
Putata
Budada
Putata
Budada
Budada
Putata
Putata
Putata
Putata
Budada...

result:

ok 50000 lines

Test #5:

score: 0
Accepted
time: 9ms
memory: 9916kb

input:

100 50000
uhnhuihssrihhrhrrofjsforinffunfjofnsjfnsinnhjnurihujuirornironjhijunumsrmffrumrmmmhojsmhnmfromirujfi
25 89
26 47
34 37
6 93
57 66
44 85
17 44
83 92
36 65
38 76
32 74
6 13
4 79
34 35
43 79
46 67
7 85
19 92
59 78
52 74
47 93
38 87
45 67
32 50
58 69
40 54
10 17
48 85
24 99
3 40
14 90
42 92
14...

output:

Putata
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Putata
Putata
Budada
Budada
Budada
Putata
Budada
Putata
Budada
Budada
Putata
Putata
Budada
Putata
Putata
Budada
Putata
Budada
Budada
Budada
Budada
Putata
Putata
Budada
Putata
Budada
Budada
Putata
Putata
Putata
Budada
Putata
Putata
Putata...

result:

ok 50000 lines

Test #6:

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

input:

100 50000
eymnforxpypeiqfjxbcovabrqwamuesghpjtthiuhjufkvlanwlsnfxganszsibzlmhwffsgrzieijfqzynzfcjccrkzauscuwuc
61 77
80 89
1 71
18 59
38 81
61 97
70 72
33 79
43 54
29 97
2 19
19 35
30 73
20 77
80 90
69 89
10 96
53 65
50 63
92 100
13 13
21 87
4 5
10 26
39 79
9 19
49 90
79 95
49 74
26 98
74 85
32 81
2...

output:

Putata
Budada
Putata
Budada
Budada
Putata
Putata
Putata
Budada
Putata
Budada
Putata
Budada
Budada
Putata
Putata
Putata
Putata
Budada
Putata
Budada
Putata
Budada
Putata
Putata
Putata
Budada
Putata
Budada
Putata
Budada
Budada
Budada
Putata
Putata
Budada
Putata
Budada
Budada
Putata
Putata
Budada
Budada...

result:

ok 50000 lines

Test #7:

score: 0
Accepted
time: 233ms
memory: 22360kb

input:

1000000 1000000
cggggcggcccccccggggcggccgggcccggcggcgccgggccgggcgccggggggccggggccccgccgggggcgcggggccggcccgcccggccccgcggccgcgggccggggcgcgcgcccggccccggggccgcggggggggccggggccccggccgggcgcccggcgcgcccgggcgcggcgccgcccggcggcgccgcgcgggccccccgcgcccggggccggggcgcggccccgcggcgccgcgggccgcgggggcgcgcggccggggcgggccgc...

output:

Putata
Budada
Putata
Budada
Budada
Budada
Putata
Budada
Putata
Budada
Putata
Budada
Putata
Putata
Budada
Putata
Budada
Putata
Budada
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Budada
Putata
Budada
Putata
Budada
Putata
Budada
Putata
Budada...

result:

ok 1000000 lines

Test #8:

score: 0
Accepted
time: 235ms
memory: 22084kb

input:

1000000 1000000
uvzuyzqytmbyyqqmzubpzqmybvvepqybemqtbeuvqbpeuyqvzppztubpbzbztemezptuvutbmyeppmtpputquumtezztvqtzbuvuymzmztpmqyezqzvqmpeeevepquqevqeemmubtqyuzetqtzveqqvymyemyvzpmmzmybtymbzeytzzbymzuebvtppqumtbqpetezqvvztepuuevtymptbevbuvyqbmeqpzeutybmtmuqvvmymvqbpyymvvyyzyqyqzbvvqpzyzzumptpzbbbebtpee...

output:

Budada
Budada
Putata
Putata
Putata
Budada
Budada
Putata
Budada
Putata
Putata
Budada
Budada
Budada
Budada
Putata
Budada
Putata
Budada
Budada
Putata
Putata
Putata
Putata
Budada
Budada
Putata
Budada
Budada
Budada
Budada
Putata
Putata
Budada
Putata
Budada
Putata
Budada
Budada
Budada
Budada
Budada
Putata...

result:

ok 1000000 lines

Test #9:

score: 0
Accepted
time: 231ms
memory: 22324kb

input:

1000000 1000000
pzhefraxqetxshnoslftyuvwzpcpihoorxdzukhtonwobduzpzloyafipdfzrhbgdlrkfjdfkorbsngvsqnjdkkoumljcyqmmdmdeojeizjdvvmqlyktjacnyziurjkeshxsqfrzbkzsjzkeiezocmxnexlkxhjntauibhuejpearqfnhaagubydmkhumqxzmvihzugnkbbdndeioxaykjfzipfzprbpsgljgvdyoqkzwshdkpmzxrbufdbiqempwmqkdgiujpczresfqsstnavmnceg...

output:

Putata
Budada
Budada
Budada
Putata
Budada
Budada
Budada
Budada
Budada
Putata
Budada
Budada
Budada
Putata
Budada
Budada
Budada
Putata
Budada
Putata
Budada
Budada
Putata
Budada
Budada
Putata
Budada
Putata
Putata
Budada
Budada
Budada
Putata
Budada
Budada
Budada
Putata
Budada
Putata
Putata
Budada
Putata...

result:

ok 1000000 lines

Test #10:

score: 0
Accepted
time: 216ms
memory: 22372kb

input:

1000000 1000000
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada...

result:

ok 1000000 lines

Test #11:

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

input:

1215 243
sssssssssnsssswsssnssssnnsssnwssswsssswnssswwssnssssnsnssnswssnnsssnnnssnnwssnwsssnwnssnwwsswsssswsnsswswsswnssswnnsswnwsswwssswwnsswwwsnssssnssnsnsswsnsnssnsnnsnsnwsnswssnswnsnswwsnnsssnnsnsnnswsnnnssnnnnsnnnwsnnwssnnwnsnnwwsnwsssnwsnsnwswsnwnssnwnnsnwnwsnwwssnwwnsnwwwswsssswssnswsswswsnss...

output:

Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata...

result:

ok 243 lines

Test #12:

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

input:

896 128
dddddddddddddwdddddwddddddwwddddwddddddwdwddddwwdddddwwwdddwddddddwddwdddwdwddddwdwwdddwwdddddwwdwdddwwwddddwwwwddwddddddwdddwddwddwdddwddwwddwdwddddwdwdwddwdwwdddwdwwwddwwdddddwwddwddwwdwdddwwdwwddwwwddddwwwdwddwwwwdddwwwwwdwddddddwddddwdwdddwddwdddwwdwddwdddwddwdwdwddwwddwddwwwdwdwddddwdwd...

output:

Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Budada...

result:

ok 128 lines

Test #13:

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

input:

375 125
nnnnncnninnonnvncnnccncinconcvninnicniinionivnonnocnoinoonovnvnnvcnvinvonvvcnncnccnicnocnvccnccccciccoccvcincicciiciocivconcoccoicoocovcvncvccvicvocvvinninciniinoinvicnicciciicoicviiniiciiiiioiivioniocioiiooiovivnivciviivoivvonnonconionoonvocnoccociocoocvoinoicoiioiooivoonoocooiooooovovnovco...

output:

Budada
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Budada
Putata...

result:

ok 125 lines

Test #14:

score: 0
Accepted
time: 18ms
memory: 19268kb

input:

590490 59049
dddddddddddddddddddodddddddddtddddddddodddddddddooddddddddotddddddddtdddddddddtoddddddddttdddddddodddddddddododddddddodtdddddddooddddddddooodddddddootdddddddotddddddddotodddddddottdddddddtdddddddddtdodddddddtdtdddddddtoddddddddtoodddddddtotdddddddttddddddddttodddddddtttddddddodddddddddo...

output:

Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada...

result:

ok 59049 lines

Test #15:

score: 0
Accepted
time: 9ms
memory: 19068kb

input:

491520 32768
uuuuuuuuuuuuuuuuuuuuuuuuuuuuueuuuuuuuuuuuuueuuuuuuuuuuuuuueeuuuuuuuuuuuueuuuuuuuuuuuuuueueuuuuuuuuuuuueeuuuuuuuuuuuuueeeuuuuuuuuuuueuuuuuuuuuuuuuueuueuuuuuuuuuuueueuuuuuuuuuuuueueeuuuuuuuuuuueeuuuuuuuuuuuuueeueuuuuuuuuuuueeeuuuuuuuuuuuueeeeuuuuuuuuuueuuuuuuuuuuuuuueuuueuuuuuuuuuueuueuuu...

output:

Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata...

result:

ok 32768 lines

Test #16:

score: 0
Accepted
time: 9ms
memory: 19288kb

input:

546875 78125
kkkkkkkkkkkkkbkkkkkkqkkkkkknkkkkkkhkkkkkbkkkkkkbbkkkkkbqkkkkkbnkkkkkbhkkkkkqkkkkkkqbkkkkkqqkkkkkqnkkkkkqhkkkkknkkkkkknbkkkkknqkkkkknnkkkkknhkkkkkhkkkkkkhbkkkkkhqkkkkkhnkkkkkhhkkkkbkkkkkkbkbkkkkbkqkkkkbknkkkkbkhkkkkbbkkkkkbbbkkkkbbqkkkkbbnkkkkbbhkkkkbqkkkkkbqbkkkkbqqkkkkbqnkkkkbqhkkkkbnk...

output:

Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata...

result:

ok 78125 lines

Test #17:

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

input:

52728 17576
iiiiihiidiitiijiiliigiiriifiiuiixiiqiisiioiiziieiimiiviiyiikiiwiiciipiiaiiniibihiihhihdihtihjihlihgihrihfihuihxihqihsihoihziheihmihvihyihkihwihcihpihaihnihbidiidhiddidtidjidlidgidridfiduidxidqidsidoidzideidmidvidyidkidwidcidpidaidnidbitiithitdittitjitlitgitritfituitxitqitsitoitziteitmitv...

output:

Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Putata...

result:

ok 17576 lines

Test #18:

score: 0
Accepted
time: 8ms
memory: 12468kb

input:

114244 28561
qqqqqqqnqqqeqqqgqqqzqqqtqqqiqqquqqqoqqqcqqqkqqqjqqqmqqnqqqnnqqneqqngqqnzqqntqqniqqnuqqnoqqncqqnkqqnjqqnmqqeqqqenqqeeqqegqqezqqetqqeiqqeuqqeoqqecqqekqqejqqemqqgqqqgnqqgeqqggqqgzqqgtqqgiqqguqqgoqqgcqqgkqqgjqqgmqqzqqqznqqzeqqzgqqzzqqztqqziqqzuqqzoqqzcqqzkqqzjqqzmqqtqqqtnqqteqqtgqqtzqqttqqt...

output:

Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada...

result:

ok 28561 lines

Test #19:

score: 0
Accepted
time: 16ms
memory: 20052kb

input:

334084 83521
bbbbbbbpbbbxbbbabbbubbblbbbkbbbgbbbibbbqbbbcbbbzbbbdbbbybbbvbbbnbbbfbbpbbbppbbpxbbpabbpubbplbbpkbbpgbbpibbpqbbpcbbpzbbpdbbpybbpvbbpnbbpfbbxbbbxpbbxxbbxabbxubbxlbbxkbbxgbbxibbxqbbxcbbxzbbxdbbxybbxvbbxnbbxfbbabbbapbbaxbbaabbaubbalbbakbbagbbaibbaqbbacbbazbbadbbaybbavbbanbbafbbubbbupbbuxbbu...

output:

Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada...

result:

ok 83521 lines

Test #20:

score: 0
Accepted
time: 198ms
memory: 22148kb

input:

1000000 1000000
cttcttccccttccttctttcctctttttctcctttcttctctcctcttcccctttttctttttttctccccttccctctcttccctttttttcttcccttctcctcttccccctttttccccttccttctcctcccttccttcttcctttccctcctttcccttcctccctttttctcctctcttctcccttccctccttctctcccctctttctcctcccttccccttctttccctcctttctcctccctttttttctttcctttccccttttcttctttct...

output:

Budada
Budada
Putata
Budada
Putata
Budada
Budada
Budada
Putata
Budada
Putata
Budada
Budada
Putata
Budada
Budada
Putata
Putata
Putata
Putata
Putata
Putata
Budada
Budada
Putata
Putata
Putata
Budada
Budada
Budada
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Budada
Putata
Budada
Putata
Putata
Budada...

result:

ok 1000000 lines

Test #21:

score: 0
Accepted
time: 223ms
memory: 22148kb

input:

1000000 1000000
gwjagdufrwtuyajshoofeiqhlsnpbherujjfabpeljlesmpqyisqxdfotfetvfwnafjnhzaqvfvqrjrfvqmvlrtounimgsvzibhynyhggbozgmydnurshwpxylvftehamypjocuradwyyysoyrltxpiobumxrzukzxvmimchyutagtgqqyfqsbyoqpfinuxrnunbsvqpxoefkwuvecyibtkgilrkerdtublwzookwihrnshqxurgtidtctopwbhnsmkvptfpqhxwzesvfzpvmlvduzls...

output:

Budada
Budada
Budada
Putata
Putata
Putata
Putata
Putata
Budada
Budada
Putata
Putata
Budada
Putata
Budada
Budada
Putata
Putata
Putata
Budada
Putata
Budada
Putata
Putata
Putata
Budada
Budada
Putata
Budada
Putata
Putata
Putata
Putata
Budada
Budada
Budada
Budada
Budada
Putata
Putata
Putata
Budada
Budada...

result:

ok 1000000 lines

Test #22:

score: 0
Accepted
time: 153ms
memory: 22336kb

input:

1000000 1000000
vwfjcgpsstefpgwruhdbrmkpzndtqkxmafjpiyptlcxlmqkrtshucndhqilbuljjnsdgoydopioudkbfjydrubawrfgwpjvcaadzykxoddkchlnickzkllidewjaooyiyegafelrkdttbawyttkizxhftnfrunmjwnxditodrnjjvhnqkuqfxxjyfemodgcnmhljaitmvqphfsyreqqfciafgbjvjzkljrwmpticedxnykkgjrappwszuieflziwuajiempipzcpxabxjcrlodlwrpqp...

output:

Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada...

result:

ok 1000000 lines

Test #23:

score: 0
Accepted
time: 199ms
memory: 22328kb

input:

1000000 1000000
lweybtgdssotdhmvqcaqbaxuntkwzwmlujhmwbughbcfmuawcgzhirwlwlrpbddfyskztmjgoijgcxznervefsjdepyfzgkujqqmkonzpnfggctzkiantcihrjidvfrnsfzegqtslvunlazzhzcfcfzudwktkwuasidwmdyzpjtmaecefcimjcoruxrbbruoozljrbvymhfwnkxantpizwseifyzltvjgeqnhktvbergwtbneqfhgvpqlomglmagmddjbfhkeuihjbrbyifsvwqkfhwm...

output:

Budada
Putata
Putata
Putata
Budada
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Putata
Putata
Budada
Budada
Putata
Budada
Budada
Budada
Budada
Putata
Budada
Putata
Putata
Budada
Putata
Budada
Budada
Putata
Budada
Putata
Putata
Budada
Budada
Budada
Budada
Putata
Budada
Budada
Putata
Putata
Putata...

result:

ok 1000000 lines

Test #24:

score: 0
Accepted
time: 196ms
memory: 22224kb

input:

1000000 1000000
nitcrfidxlortweytvtbdgqebammwelaodxkaoydleesbxyqrvetintiwfsxdtwzuovuekcmzywtyptwumwatbkbufdjndvvdjplzvydubuvenjlutvdrxyqcvoxhrsochecnpgwmilbcdpydjsxnnzjaczezdsioxogfkxuphfmgzaumeobrwxbbgizcywqdimgbbifdymdvdwcbuouqcexpwstmfaytjnatpyusvhlawfcfcntgenelarskmsxocepvydktavaxkleklwhjevfaepg...

output:

Budada
Putata
Putata
Putata
Budada
Putata
Budada
Putata
Budada
Putata
Putata
Putata
Budada
Budada
Putata
Putata
Putata
Putata
Putata
Putata
Putata
Budada
Budada
Putata
Budada
Putata
Budada
Budada
Budada
Putata
Budada
Putata
Putata
Putata
Putata
Budada
Budada
Putata
Budada
Putata
Budada
Budada
Budada...

result:

ok 1000000 lines

Test #25:

score: 0
Accepted
time: 197ms
memory: 22144kb

input:

1000000 1000000
nfmfztlffsfhsgkhxsxdravthpwbfywbfqxgjhzdewxypokfuogxvhcjeqtryztirqfmfvblmikakscrevlstywhfljtinkjflogtmpkwarhxznhrbkjridkymxuvnxwnjxavcjfoqepyqtytfeowglldlvldzxzkphhaudskilskikzdgumpnmngzepoysczjwxeyqkerblyheonbujhzatyxsxzzqkdilnpfurspiohikphqasrswwmadvjlskdejuvcaajzckfidtsvicqwjaejok...

output:

Putata
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Putata
Budada
Putata
Budada
Putata
Budada
Budada
Putata
Putata
Putata
Putata
Budada
Budada
Budada
Budada
Budada
Putata
Budada
Budada
Putata
Putata
Budada
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Budada
Putata
Budada
Budada...

result:

ok 1000000 lines

Test #26:

score: 0
Accepted
time: 184ms
memory: 22144kb

input:

1000000 1000000
lnlkjqiflqnulqopfrihhzajazhhirfpoqlunqlfiqjkdddtcriddlxaaxlddirctdiwfcyuamxljffjlxmauycfwirwsdeksuglhddhlguskedswrvlnjjnlvsxsyliewtlajldoljgvsjyzigrgizyjsvgjlodljaltweilysxihbbqozyrurmmruryzoqbbhipgiiachlcizlvtummutvlziclhcaiigpbpspbxgonnqfqzblesatmsbnehskzlixieylohoqbfxyzqexsuyrqetl...

output:

Putata
Budada
Budada
Budada
Budada
Putata
Budada
Putata
Budada
Budada
Putata
Budada
Putata
Putata
Putata
Putata
Putata
Budada
Budada
Budada
Budada
Putata
Budada
Putata
Putata
Putata
Budada
Putata
Putata
Budada
Budada
Budada
Budada
Putata
Budada
Putata
Budada
Putata
Budada
Budada
Putata
Budada
Putata...

result:

ok 1000000 lines

Test #27:

score: 0
Accepted
time: 223ms
memory: 22220kb

input:

1000000 1000000
amnedmfpmydgvgypemxzufglqdzblolhzrzeadthsoiebuqchdbiwtzofglngvmatuollusdjnmllnntmevpkuyhzpykspttijycxacmxiuuoytrkilfpvoleuwwdycrdupsqfvoathyrtyispbjdifkfqmrapegoqslygwomlshkwbrdmbswmhcaswfypquepsbfklsngswcqdwvckptgkjtmqwmrplbybezxuoxhvpnvmnnbgwidnjkhgafxziqbjjpclvxqvlpvmyvhhvbjuzlxop...

output:

Budada
Budada
Putata
Putata
Putata
Budada
Putata
Putata
Putata
Putata
Budada
Budada
Budada
Putata
Putata
Budada
Budada
Putata
Putata
Budada
Putata
Budada
Putata
Putata
Putata
Budada
Budada
Putata
Budada
Putata
Putata
Budada
Budada
Putata
Budada
Putata
Putata
Budada
Budada
Putata
Putata
Budada
Budada...

result:

ok 1000000 lines

Test #28:

score: 0
Accepted
time: 135ms
memory: 22232kb

input:

1000000 1000000
isjehtgyeamxvjufwddcfsgntiyfsyvdilrkgjmkgwmtojbxlsczpqhsvhxmwuadmjrhdvmskfgveftcwyxztvnxawfxiopputasmkaivmbajqjssgcvlrimcwlyajemfubjqoajbsryborckvymgvjfxjdrvbsvymcmbohxxwulhcdaeeyroosvaogbzimpatcjbjfkusihcdelcwjeyzcpsvzqrhqxogharjrqkusuveqdnuskaxukbnkxqejlmpsuewdvhtbfgcvxetfwtochdflm...

output:

Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Putata
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada...

result:

ok 1000000 lines

Test #29:

score: 0
Accepted
time: 134ms
memory: 22376kb

input:

1000000 1000000
hupoijxxlrmlcntigqkgvzdvstkmfvbyxjyxkkiglyleebtnszksqescxscasujerkpcmvkljhmgplgwmapgjguhdkiictweqjbgkeykqknaqazvhbqxbmkmbvsvqtmwycbfpjprvypirkrhricuthhixcknkuackuclgndhprqgwvvlvribvteqpgxiyibobphpbntjqilhtsxxkeucihcdgifrrayzeycyvqmuthsryxospjanaezalorplhqatwcftywmdnqgkdjrfvhutzmeybpv...

output:

Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada...

result:

ok 1000000 lines

Test #30:

score: 0
Accepted
time: 157ms
memory: 22200kb

input:

1000000 1000000
pbtzpbogvadzkvtmojjbvqnwfmjddgpunkihnxdtnedhypwqnxupgwomsvxipiwxpcevxvsoperceagjnmzxuipswfstazlowpgjyaasxhacrccpmsjerswntkmercpxcntxutvfidodofkeaxszynlmmiuxlppuedpxmcbgukluqsngaavyaeywlvxxbzlbimzkkrcsobqzwfjtewlxhapfxhkbqnrgzoyiymkypnkyxhetcyknmyvyitvsnloienyoybadwfreisfzkielmrpvmgij...

output:

Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada...

result:

ok 1000000 lines

Test #31:

score: 0
Accepted
time: 220ms
memory: 22228kb

input:

1000000 1000000
yjjrxmeeickwwkcieemxrfgdwwdgfbwfwzodrrdozyzwrudcdurwzyeeayxzmopgnmkvvibgywzxlcsclxzwygbivvkmngpomzxyaugmbuopbxvkmbhwhbmkvxbpoubmguavxenjbcuzfbiswwsibfzucbjnexvaixsnyuynsxiivatmdsynfwbossobwfnysdmtaviqfdfctwtcfdfqimyskujuksymwmccmwcpyypcajjaiiyppeppypommopruuxohuhosffsigxmzhequkudbmvx...

output:

Budada
Putata
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Putata
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Putata
Budada
Budada
Putata
Budada
Budada
Putata
Budada
Budada
Budada
Budada
Budada
Putata
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada
Budada...

result:

ok 1000000 lines

Test #32:

score: 0
Accepted
time: 230ms
memory: 22124kb

input:

1000000 1000000
wwiszslsooswqwrwiffppyvevybbpdjhhduurxyxjdxxdgqagmzlhzpssiiafflomeuulwshhnnwbvkfkqqpxddubootnbeqegxfudmiaaplyqpfiifhgmgxyrczkdjjctiesnvwwxppdwyynnnnlkkjdcvpufubezzeuqsusqiaakffoomtylroeaaqhqzvvzczzydllgmtcczrbidppziditqkqivexinixehwwbbfzzkqvggfgooippqqnezeljdddfoofqiooxffxnuppwbycpbf...

output:

Putata
Budada
Budada
Putata
Putata
Budada
Putata
Putata
Putata
Budada
Budada
Budada
Putata
Budada
Budada
Putata
Budada
Budada
Budada
Putata
Putata
Budada
Budada
Budada
Budada
Putata
Budada
Budada
Budada
Budada
Putata
Putata
Budada
Putata
Putata
Budada
Budada
Putata
Budada
Budada
Budada
Budada
Budada...

result:

ok 1000000 lines