QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#573729#8948. 报复社会Akagishigeru100 ✓83ms17532kbC++14943b2024-09-18 19:49:312024-09-18 19:49:31

Judging History

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

  • [2024-09-18 19:49:31]
  • 评测
  • 测评结果:100
  • 用时:83ms
  • 内存:17532kb
  • [2024-09-18 19:49:31]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int maxn=5e5+10;
int n,head[maxn],tot,f[maxn],a[maxn],sum[maxn],siz[maxn];
struct edge{
	int t,nxt;
}e[maxn];
void add(int u,int v){
	e[++tot]={v,head[u]};
	head[u]=tot;
}
void dfs(int u){
	siz[u]=1;
	if(!head[u]){
		sum[u]=f[u]=a[u];
		return;
	}
	for(int i=head[u];i;i=e[i].nxt){
		dfs(e[i].t);
		siz[u]+=siz[e[i].t];
		sum[u]+=sum[e[i].t];
	}
	if(siz[u]-1-sum[u]>sum[u]) f[u]=0;
	else if(siz[u]-1-sum[u]<sum[u]) f[u]=1;
	else f[u]=n%2;
	sum[u]+=f[u];
}
void solve(int test){
	cin>>n;
	tot=0;
	for(int i=1;i<=n;i++) head[i]=a[i]=f[i]=sum[i]=0;
	for(int i=2,fa;i<=n;i++){
		scanf("%d",&fa);
		add(fa,i);
	}
	for(int i=1;i<=n;i++) scanf("%d",&a[i]);
	dfs(1);
	if(f[1]) puts("Bob");
	else puts("Alice");
}
int main(){
	// freopen("alphago.in","r",stdin);
	// freopen("alphago.out","w",stdout);
	int c,t;
	cin>>t;
	for(int i=1;i<=t;i++) solve(i);
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 20
Accepted

Test #1:

score: 20
Accepted
time: 0ms
memory: 11836kb

input:

1
19
1 2 3 3 2 6 7 7 6 6 6 2 2 2 1 1 1 1
0 0 0 0 0 0 0 1 1 0 0 1 1 1 1 0 0 0 0

output:

Bob

result:

ok "Bob"

Test #2:

score: 20
Accepted
time: 2ms
memory: 14080kb

input:

1
20
1 1 3 2 4 1 4 4 1 7 1 6 3 12 6 12 8 5 7
1 0 1 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 0 1

output:

Alice

result:

ok "Alice"

Test #3:

score: 20
Accepted
time: 0ms
memory: 14088kb

input:

1
19
1 2 3 4 5 1 1 8 8 3 7 3 13 3 15 10 2 17
0 0 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0

output:

Alice

result:

ok "Alice"

Test #4:

score: 20
Accepted
time: 2ms
memory: 14084kb

input:

1
19
1 2 3 4 5 1 1 8 8 3 7 3 13 3 15 10 2 17
0 0 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0

output:

Alice

result:

ok "Alice"

Test #5:

score: 20
Accepted
time: 2ms
memory: 13972kb

input:

1
19
1 1 1 1 1 3 4 7 3 2 8 6 2 10 10 4 7 14
0 0 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1

output:

Bob

result:

ok "Bob"

Test #6:

score: 20
Accepted
time: 0ms
memory: 12028kb

input:

1
20
1 2 3 4 5 3 7 3 3 3 2 2 2 1 15 16 16 1 1
0 0 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 1 1 1

output:

Alice

result:

ok "Alice"

Test #7:

score: 20
Accepted
time: 2ms
memory: 14092kb

input:

1
19
1 2 3 4 2 2 2 1 9 10 11 11 10 10 10 9 17 9
0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 1 1

output:

Alice

result:

ok "Alice"

Test #8:

score: 20
Accepted
time: 1ms
memory: 12036kb

input:

1
20
1 2 3 4 4 3 3 2 9 10 9 9 9 9 9 2 2 2 2
0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 1 1 1 1

output:

Alice

result:

ok "Alice"

Test #9:

score: 20
Accepted
time: 1ms
memory: 13980kb

input:

1
19
1 2 3 4 5 6 6 5 9 5 5 5 2 2 2 2 2 1
0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 0 1 1

output:

Alice

result:

ok "Alice"

Test #10:

score: 20
Accepted
time: 0ms
memory: 13892kb

input:

1
20
1 2 2 2 3 1 6 4 3 2 8 2 5 7 3 3 10 10 15
0 1 1 0 0 0 1 0 1 1 1 0 0 0 0 1 1 0 0 0

output:

Alice

result:

ok "Alice"

Test #11:

score: 20
Accepted
time: 2ms
memory: 14080kb

input:

1
19
1 2 3 1 4 6 2 8 6 4 3 6 10 7 6 3 5 2
1 0 1 1 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0

output:

Alice

result:

ok "Alice"

Test #12:

score: 20
Accepted
time: 1ms
memory: 14084kb

input:

1
20
1 1 3 2 2 4 4 6 5 1 5 2 2 10 13 11 6 5 11
1 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 1 0 0 0

output:

Alice

result:

ok "Alice"

Test #13:

score: 20
Accepted
time: 1ms
memory: 12044kb

input:

1
19
1 2 3 1 4 6 6 1 4 10 5 3 7 11 4 4 4 4
1 0 1 0 1 1 1 1 1 1 1 0 1 0 0 0 1 1 0

output:

Alice

result:

ok "Alice"

Test #14:

score: 20
Accepted
time: 1ms
memory: 14088kb

input:

1
20
1 2 3 4 5 5 3 8 3 3 3 3 2 14 15 2 2 2 2
0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 1 1 0 1

output:

Alice

result:

ok "Alice"

Test #15:

score: 20
Accepted
time: 0ms
memory: 13952kb

input:

1
20
1 2 3 4 5 5 3 8 3 3 3 3 2 14 15 2 2 2 2
0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 1 1 0 1

output:

Alice

result:

ok "Alice"

Test #16:

score: 20
Accepted
time: 0ms
memory: 14028kb

input:

1
19
1 2 3 4 5 3 3 3 3 2 1 12 13 12 15 15 15 1
0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 1 1

output:

Bob

result:

ok "Bob"

Test #17:

score: 20
Accepted
time: 1ms
memory: 13972kb

input:

1
19
1 2 3 3 1 6 6 6 6 6 6 6 6 6 6 1 1 1
0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 0

output:

Bob

result:

ok "Bob"

Test #18:

score: 20
Accepted
time: 2ms
memory: 12036kb

input:

1
20
1 2 3 4 5 5 5 4 4 4 4 4 3 3 2 2 1 1 1
0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0

output:

Bob

result:

ok "Bob"

Test #19:

score: 20
Accepted
time: 2ms
memory: 14016kb

input:

1
19
1 2 3 1 5 1 6 1 6 6 1 4 7 13 2 14 10 2
0 0 1 0 1 1 1 0 1 0 0 0 0 0 0 0 1 1 0

output:

Alice

result:

ok "Alice"

Test #20:

score: 20
Accepted
time: 2ms
memory: 11836kb

input:

1
20
1 1 3 1 2 5 7 6 8 3 8 4 9 4 12 7 17 7 16
0 1 1 0 1 1 0 1 1 1 0 1 0 0 1 0 1 1 1 1

output:

Bob

result:

ok "Bob"

Test #21:

score: 20
Accepted
time: 0ms
memory: 11988kb

input:

1
19
1 1 1 1 3 6 1 5 2 4 2 8 2 1 9 14 10 8
1 1 0 0 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0

output:

Bob

result:

ok "Bob"

Test #22:

score: 20
Accepted
time: 2ms
memory: 13940kb

input:

1
20
1 2 3 4 4 4 3 8 8 8 8 3 3 3 3 3 2 2 2
0 0 0 0 0 0 1 0 0 1 0 1 1 1 1 1 1 0 0 1

output:

Bob

result:

ok "Bob"

Test #23:

score: 20
Accepted
time: 2ms
memory: 14024kb

input:

1
19
1 1 2 3 4 2 1 1 1 6 7 6 3 5 5 16 15 12
0 1 0 1 0 0 0 1 0 1 1 1 1 1 1 0 0 1 0

output:

Bob

result:

ok "Bob"

Test #24:

score: 20
Accepted
time: 0ms
memory: 11848kb

input:

1
20
1 2 3 4 4 4 4 3 9 9 3 3 2 2 2 1 1 1 1
0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 1 1 0 1

output:

Alice

result:

ok "Alice"

Test #25:

score: 20
Accepted
time: 0ms
memory: 14016kb

input:

1
19
1 1 2 3 2 6 6 4 3 8 10 2 11 9 5 1 10 5
1 1 0 1 0 1 0 1 1 0 1 1 1 1 1 0 0 0 0

output:

Bob

result:

ok "Bob"

Test #26:

score: 20
Accepted
time: 0ms
memory: 11928kb

input:

1
20
1 2 2 4 4 4 1 6 4 10 9 6 2 2 4 5 9 12 8
0 1 0 1 0 1 0 0 1 1 1 1 0 0 1 1 0 1 0 1

output:

Alice

result:

ok "Alice"

Test #27:

score: 20
Accepted
time: 2ms
memory: 14040kb

input:

1
19
1 1 1 3 5 2 3 2 1 7 6 11 12 9 13 7 16 15
0 0 1 0 1 1 1 0 0 0 1 0 1 0 1 0 0 0 1

output:

Alice

result:

ok "Alice"

Test #28:

score: 20
Accepted
time: 1ms
memory: 11992kb

input:

1
20
1 2 3 2 4 4 2 7 2 5 8 8 1 9 1 3 3 9 5
0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 0

output:

Alice

result:

ok "Alice"

Test #29:

score: 20
Accepted
time: 0ms
memory: 11852kb

input:

1
19
1 2 3 4 5 6 2 8 2 2 2 2 1 14 15 16 15 1
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1

output:

Alice

result:

ok "Alice"

Test #30:

score: 20
Accepted
time: 2ms
memory: 14084kb

input:

1
19
1 2 3 4 5 6 2 8 2 2 2 2 1 14 15 16 15 1
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1

output:

Alice

result:

ok "Alice"

Test #31:

score: 20
Accepted
time: 1ms
memory: 11988kb

input:

1
19
1 2 2 2 1 6 7 8 8 8 8 8 6 6 1 1 1 1
0 0 1 1 1 0 0 0 0 0 1 0 1 1 1 0 0 0 0

output:

Alice

result:

ok "Alice"

Test #32:

score: 20
Accepted
time: 1ms
memory: 13968kb

input:

1
20
1 2 3 4 5 6 5 3 9 9 9 3 2 2 2 2 2 1 1
0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1

output:

Alice

result:

ok "Alice"

Test #33:

score: 20
Accepted
time: 0ms
memory: 14092kb

input:

1
19
1 2 2 2 2 1 7 8 9 8 8 7 13 7 7 1 1 1
0 0 0 0 0 1 0 0 0 0 1 1 0 0 1 1 1 0 1

output:

Bob

result:

ok "Bob"

Test #34:

score: 20
Accepted
time: 0ms
memory: 14052kb

input:

1
20
1 2 1 4 5 6 5 4 9 10 10 9 9 9 9 9 4 1 1
0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 1 1

output:

Alice

result:

ok "Alice"

Test #35:

score: 20
Accepted
time: 0ms
memory: 14036kb

input:

1
19
1 2 2 4 2 1 5 6 1 5 4 12 9 2 9 9 12 4
1 0 1 1 1 1 1 0 0 1 1 1 1 0 1 0 1 0 1

output:

Bob

result:

ok "Bob"

Test #36:

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

input:

1
20
1 2 3 4 5 4 3 3 2 2 2 2 2 2 2 2 2 2 2
0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1

output:

Alice

result:

ok "Alice"

Test #37:

score: 20
Accepted
time: 0ms
memory: 11904kb

input:

1
19
1 2 3 4 2 6 7 6 6 2 2 1 13 14 14 13 13 1
0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 1

output:

Alice

result:

ok "Alice"

Test #38:

score: 20
Accepted
time: 0ms
memory: 13976kb

input:

1
20
1 2 3 4 1 3 7 6 5 8 8 5 11 12 9 9 8 14 6
1 1 0 1 1 1 0 1 1 1 0 0 0 0 1 1 0 1 1 0

output:

Bob

result:

ok "Bob"

Test #39:

score: 20
Accepted
time: 2ms
memory: 14080kb

input:

1
19
1 2 3 4 4 4 4 3 3 3 3 2 2 2 2 1 1 1
0 0 0 0 0 1 0 1 1 1 0 1 0 0 0 0 1 0 1

output:

Bob

result:

ok "Bob"

Test #40:

score: 20
Accepted
time: 2ms
memory: 13892kb

input:

1
20
1 2 3 4 3 6 7 3 2 10 2 2 2 2 2 1 1 1 1
0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0

output:

Bob

result:

ok "Bob"

Test #41:

score: 20
Accepted
time: 0ms
memory: 14036kb

input:

1
19
1 2 3 3 3 3 3 3 3 3 3 2 13 2 2 1 17 1
0 0 0 0 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1

output:

Alice

result:

ok "Alice"

Test #42:

score: 20
Accepted
time: 0ms
memory: 14000kb

input:

1
20
1 2 3 2 1 6 6 6 4 7 4 2 9 13 2 11 5 14 4
0 1 0 0 0 1 1 1 1 0 0 1 0 1 0 1 1 1 1 0

output:

Bob

result:

ok "Bob"

Test #43:

score: 20
Accepted
time: 2ms
memory: 14028kb

input:

1
19
1 1 3 3 3 4 1 5 5 2 5 11 4 4 4 6 17 17
1 0 1 0 0 1 0 0 1 1 0 1 1 0 0 1 0 0 1

output:

Bob

result:

ok "Bob"

Test #44:

score: 20
Accepted
time: 1ms
memory: 11972kb

input:

1
20
1 2 3 4 5 5 5 4 3 3 3 2 13 13 2 1 1 1 1
0 0 0 0 0 0 0 1 1 1 0 1 0 0 1 1 0 1 0 1

output:

Alice

result:

ok "Alice"

Test #45:

score: 20
Accepted
time: 1ms
memory: 11912kb

input:

1
19
1 1 2 1 5 1 6 5 7 5 1 8 9 4 4 8 7 17
0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 0 1 1

output:

Bob

result:

ok "Bob"

Test #46:

score: 20
Accepted
time: 0ms
memory: 14108kb

input:

1
20
1 2 1 2 4 2 7 4 5 6 8 6 5 3 2 1 13 10 8
0 0 0 1 0 1 1 1 1 1 1 0 1 1 0 0 1 0 1 0

output:

Alice

result:

ok "Alice"

Test #47:

score: 20
Accepted
time: 0ms
memory: 13972kb

input:

1
19
1 2 2 4 4 4 3 3 6 4 4 4 10 3 6 7 17 4
0 0 1 1 0 0 1 0 1 0 0 0 1 0 1 1 0 1 0

output:

Alice

result:

ok "Alice"

Test #48:

score: 20
Accepted
time: 2ms
memory: 14020kb

input:

1
20
1 2 3 4 4 4 4 3 9 9 9 3 3 3 3 1 1 1 1
0 0 0 0 0 1 0 1 0 1 0 1 1 1 1 1 0 0 0 0

output:

Bob

result:

ok "Bob"

Test #49:

score: 20
Accepted
time: 2ms
memory: 14096kb

input:

1
19
1 2 3 4 5 4 4 4 3 3 3 3 2 1 1 1 1 1
0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 0 1 0 1

output:

Alice

result:

ok "Alice"

Subtask #2:

score: 30
Accepted

Test #50:

score: 30
Accepted
time: 54ms
memory: 14080kb

input:

10000
49
1 2 2 1 5 5 5 5 5 5 1 12 12 12 12 12 12 1 19 19 19 19 19 19 19 1 27 27 1 1 31 1 33 33 33 33 33 33 33 1 1 1 1 1 1 1 1 1
0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1
50
1 2 2 2 2 2 1 8 8 8 1 12 1 1 15 15 15 15 1 1 21 21 21 21 1 26 1 1 29 29...

output:

Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Bo...

result:

ok 10000 tokens

Test #51:

score: 30
Accepted
time: 54ms
memory: 13900kb

input:

10000
50
1 2 2 2 2 1 7 7 7 7 1 1 13 13 13 1 17 17 17 17 17 17 1 24 24 24 24 1 29 29 29 29 29 1 35 35 35 1 39 39 39 39 39 1 1 46 1 48 1
0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0
50
1 2 2 2 1 1 7 7 7 7 1 12 12 12 1 1 1 18 18 18 18 18 1 1 25 25 ...

output:

Alice
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Bob
Alice
...

result:

ok 10000 tokens

Test #52:

score: 30
Accepted
time: 46ms
memory: 13956kb

input:

10000
49
1 1 3 3 3 1 7 7 7 7 7 7 7 1 15 15 15 15 15 1 21 21 21 21 21 21 1 28 28 28 28 28 28 28 1 36 36 36 1 1 1 1 1 1 1 1 1 1
0 1 0 0 1 0 0 1 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1
50
1 2 2 2 1 6 1 8 8 8 8 1 13 1 15 15 15 15 15 1 1 22 22 22 22 22 22 22 1 30...

output:

Bob
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Bob
...

result:

ok 10000 tokens

Test #53:

score: 30
Accepted
time: 39ms
memory: 13904kb

input:

10000
49
1 2 2 2 2 2 2 2 1 10 10 10 1 14 1 16 16 1 19 19 19 19 19 19 1 1 1 28 28 28 28 28 28 28 1 36 36 36 36 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 0 1 0 1 0 0 1
50
1 2 1 4 4 4 4 4 1 10 10 10 10 10 10 1 17 17 17 17 17 1 23 1 25 25 25 25...

output:

Bob
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Al...

result:

ok 10000 tokens

Test #54:

score: 30
Accepted
time: 48ms
memory: 14024kb

input:

1000
499
1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 16 16 16 16 16 16 16 16 16 16 16 1 28 28 28 28 28 28 28 28 28 1 38 1 40 40 40 40 1 45 1 47 47 47 47 47 47 1 54 54 54 54 54 54 54 54 54 54 1 65 65 65 65 65 1 71 1 73 73 73 73 73 73 73 73 73 73 73 1 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 1 105 1...

output:

Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Bo...

result:

ok 1000 tokens

Test #55:

score: 30
Accepted
time: 48ms
memory: 13884kb

input:

1000
499
1 2 2 2 2 1 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 1 24 24 24 24 24 24 24 24 1 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 1 51 51 51 51 51 51 51 51 51 51 1 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 1 79 79 79 79 79 79 79 79 79 79 79 1 91 91 91 91 91 91 91 91 91 91 91 91 91 1 105 105 ...

output:

Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Bob
Alice
Alice
Alice
...

result:

ok 1000 tokens

Test #56:

score: 30
Accepted
time: 44ms
memory: 14100kb

input:

1000
499
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 20 1 22 22 1 25 25 25 25 25 1 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 1 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 1 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 1 88 88 88 88 88 88 88 88 88 1 98 98 98 98 98 98 98 98 98...

output:

Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Al...

result:

ok 1000 tokens

Test #57:

score: 30
Accepted
time: 44ms
memory: 13944kb

input:

1000
500
1 2 2 2 2 2 2 2 2 1 11 11 11 11 11 11 11 11 11 11 11 11 11 11 1 26 26 26 26 26 26 1 33 33 33 33 1 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 1 58 58 58 58 58 58 58 58 58 58 58 58 58 1 72 72 72 72 72 72 72 72 72 1 82 82 82 82 82 1 88 88 1 91 91 91 91 91 91 91 91 91 91 91 91 91 ...

output:

Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Bo...

result:

ok 1000 tokens

Test #58:

score: 30
Accepted
time: 43ms
memory: 14128kb

input:

100
5000
1 2 2 2 2 2 2 2 1 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 1 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 1 98 98 98 98...

output:

Alice
Bob
Bob
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bo...

result:

ok 100 tokens

Test #59:

score: 30
Accepted
time: 46ms
memory: 11912kb

input:

100
5000
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 1 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 8...

output:

Alice
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Alice
...

result:

ok 100 tokens

Test #60:

score: 30
Accepted
time: 39ms
memory: 13928kb

input:

100
4999
1 2 2 2 2 2 2 2 2 2 1 12 12 12 12 12 12 12 12 12 12 12 12 12 12 1 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 1 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 7...

output:

Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Bob
Alic...

result:

ok 100 tokens

Test #61:

score: 30
Accepted
time: 45ms
memory: 14480kb

input:

10
49999
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 9...

output:

Bob
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob

result:

ok 10 tokens

Test #62:

score: 30
Accepted
time: 45ms
memory: 14424kb

input:

10
49999
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob

result:

ok 10 tokens

Test #63:

score: 30
Accepted
time: 44ms
memory: 12420kb

input:

10
50000
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 1 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 8...

output:

Alice
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob

result:

ok 10 tokens

Test #64:

score: 30
Accepted
time: 46ms
memory: 14336kb

input:

10
49999
1 2 2 2 1 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6...

output:

Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob

result:

ok 10 tokens

Test #65:

score: 30
Accepted
time: 51ms
memory: 17332kb

input:

1
499999
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

Bob

result:

ok "Bob"

Test #66:

score: 30
Accepted
time: 47ms
memory: 17316kb

input:

1
499999
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

Bob

result:

ok "Bob"

Test #67:

score: 30
Accepted
time: 44ms
memory: 17468kb

input:

1
500000
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 1...

output:

Bob

result:

ok "Bob"

Test #68:

score: 30
Accepted
time: 51ms
memory: 17464kb

input:

1
500000
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

Alice

result:

ok "Alice"

Test #69:

score: 30
Accepted
time: 48ms
memory: 17388kb

input:

1
499999
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24...

output:

Bob

result:

ok "Bob"

Test #70:

score: 30
Accepted
time: 47ms
memory: 17512kb

input:

1
500000
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

Bob

result:

ok "Bob"

Test #71:

score: 30
Accepted
time: 48ms
memory: 17452kb

input:

1
500000
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

Bob

result:

ok "Bob"

Test #72:

score: 30
Accepted
time: 44ms
memory: 17404kb

input:

1
500000
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

Alice

result:

ok "Alice"

Subtask #3:

score: 20
Accepted

Test #73:

score: 20
Accepted
time: 48ms
memory: 13908kb

input:

10000
50
1 2 1 4 5 6 5 4 9 4 11 4 1 14 15 16 16 16 15 14 21 21 21 14 14 14 14 14 1 30 30 30 30 30 1 36 37 37 37 36 41 41 41 36 1 1 1 1 1
0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 0 0 0 1 0 0 0 0 1 1 0 1 0 1
50
1 2 3 4 5 4 7 8 7 4 11 12 11 14 11 16 11 18 11 4 21 4 4 4 3 ...

output:

Alice
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Alic...

result:

ok 10000 tokens

Test #74:

score: 20
Accepted
time: 54ms
memory: 14080kb

input:

10000
50
1 2 2 2 2 2 1 8 9 8 11 12 11 11 11 11 11 8 19 20 19 8 8 8 1 26 27 27 27 26 31 32 31 34 31 36 31 38 31 26 26 26 1 44 45 46 45 44 1
0 0 1 1 1 0 1 0 0 1 0 0 1 1 0 1 0 1 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
50
1 2 2 2 1 6 7 6 9 6 11 6 13 6 6 6 6 6 1 20 1 22 23 23 23 2...

output:

Bob
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Alice
Bo...

result:

ok 10000 tokens

Test #75:

score: 20
Accepted
time: 47ms
memory: 11896kb

input:

10000
50
1 2 1 4 5 6 7 8 7 6 5 12 5 14 5 16 5 18 5 5 5 4 23 4 25 26 25 28 25 30 25 25 25 4 35 36 35 35 35 35 35 4 4 4 1 1 1 1 1
0 0 0 0 0 0 0 0 1 1 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
50
1 2 3 2 5 5 5 2 9 2 1 12 13 14 15 14 13 18 13 13 13 12 12 12 1 26 27 ...

output:

Bob
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Alic...

result:

ok 10000 tokens

Test #76:

score: 20
Accepted
time: 62ms
memory: 13944kb

input:

10000
50
1 2 2 2 1 6 7 6 9 9 9 6 1 14 15 16 16 16 15 15 15 14 14 14 14 14 1 28 29 28 1 32 33 34 33 36 37 36 33 33 33 32 43 32 32 32 1 1 1
0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 1 1 0 1 0 1 1 1 1 0 0 1
50
1 2 3 4 4 4 3 8 9 10 11 10 10 10 9 16 16 16 16 16 9 22 22 2...

output:

Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alic...

result:

ok 10000 tokens

Test #77:

score: 20
Accepted
time: 47ms
memory: 14040kb

input:

1000
500
1 2 3 4 5 6 5 8 5 10 5 12 13 12 15 15 15 12 5 20 21 21 21 20 25 25 25 25 25 20 31 32 31 34 31 36 31 38 31 31 31 20 5 5 5 5 5 4 49 50 51 50 53 50 55 50 57 50 50 50 50 50 49 64 65 64 67 68 69 68 71 68 68 68 68 68 67 78 67 64 81 82 81 64 85 85 85 64 64 64 49 92 92 92 92 92 49 49 49 4 3 102 103...

output:

Bob
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Bob
Bob
...

result:

ok 1000 tokens

Test #78:

score: 20
Accepted
time: 47ms
memory: 13980kb

input:

1000
500
1 2 3 4 4 4 3 8 9 8 8 8 8 8 3 16 17 16 3 3 3 3 3 2 25 25 25 2 29 2 31 2 33 34 33 36 33 38 33 2 1 42 43 42 42 42 42 42 1 50 51 52 53 54 53 53 53 52 52 52 51 62 63 62 65 62 67 62 69 62 71 62 51 51 51 51 51 50 79 80 81 81 81 80 80 80 79 79 79 50 91 92 93 94 93 93 93 93 93 92 101 102 102 102 10...

output:

Bob
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Al...

result:

ok 1000 tokens

Test #79:

score: 20
Accepted
time: 46ms
memory: 14112kb

input:

1000
500
1 2 3 3 3 2 7 8 8 8 8 8 7 7 7 2 17 18 17 17 17 17 17 2 25 26 27 26 25 30 31 32 31 30 35 30 30 30 25 40 25 42 25 44 25 25 25 25 25 2 2 2 1 54 55 56 55 58 59 59 59 58 63 58 65 58 58 58 55 70 70 70 55 74 55 55 55 55 55 54 81 82 81 84 81 54 87 88 89 88 91 91 91 88 95 96 95 88 88 88 87 102 102 1...

output:

Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Bob
...

result:

ok 1000 tokens

Test #80:

score: 20
Accepted
time: 50ms
memory: 13904kb

input:

1000
500
1 2 3 2 5 5 5 2 9 2 11 12 13 14 15 14 14 14 13 20 13 22 22 22 22 22 13 28 29 30 29 28 33 34 35 34 33 33 33 33 33 28 43 44 44 44 43 48 48 48 43 52 53 52 43 56 43 43 43 28 61 62 61 61 61 61 61 28 28 28 13 12 73 74 75 76 77 77 77 77 77 76 75 84 85 86 86 86 86 86 85 92 85 94 95 94 94 94 85 100 ...

output:

Alice
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Alice
...

result:

ok 1000 tokens

Test #81:

score: 20
Accepted
time: 47ms
memory: 13940kb

input:

100
5000
1 2 3 4 5 6 7 8 9 8 8 8 7 14 15 14 17 14 7 20 21 20 23 20 7 7 7 7 7 6 31 32 31 6 5 36 37 38 39 40 40 40 40 40 39 39 39 39 39 38 51 38 38 38 37 56 57 56 59 60 61 60 63 60 60 60 60 60 59 70 70 70 70 70 59 56 56 56 37 80 81 82 83 82 85 82 87 82 89 82 91 91 91 82 81 96 96 96 81 100 100 100 81 1...

output:

Bob
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
...

result:

ok 100 tokens

Test #82:

score: 20
Accepted
time: 50ms
memory: 14128kb

input:

100
5000
1 2 3 4 5 6 7 7 7 6 11 12 12 12 11 16 17 16 11 20 11 22 11 24 11 6 27 28 27 30 27 32 32 32 27 27 27 27 27 6 41 41 41 41 41 6 47 48 49 48 48 48 48 48 47 47 47 6 6 6 6 6 5 4 65 66 67 68 69 70 71 70 73 70 75 70 77 77 77 70 81 81 81 70 70 70 69 69 69 69 69 68 93 68 95 68 67 66 99 100 101 100 10...

output:

Alice
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Al...

result:

ok 100 tokens

Test #83:

score: 20
Accepted
time: 46ms
memory: 14124kb

input:

100
5000
1 2 3 4 5 6 5 8 5 10 11 10 13 10 15 10 17 10 19 10 5 22 5 24 25 24 5 4 29 30 31 30 33 30 35 30 37 30 39 30 30 30 30 30 29 46 47 48 49 48 51 48 53 48 48 48 47 58 58 58 58 58 47 64 47 66 47 68 69 70 69 72 69 69 69 68 68 68 47 47 47 47 47 46 29 86 87 86 89 86 91 86 93 86 95 86 86 86 86 86 29 1...

output:

Bob
Bob
Bob
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Alice
...

result:

ok 100 tokens

Test #84:

score: 20
Accepted
time: 51ms
memory: 12520kb

input:

10
50000
1 2 3 4 5 6 7 7 7 6 11 6 13 6 15 6 17 6 6 6 6 6 5 24 25 24 27 28 29 30 29 28 27 34 35 34 37 34 39 34 41 34 43 44 43 34 34 34 27 50 51 50 50 50 27 27 27 24 59 60 61 62 63 62 65 62 67 62 69 62 61 72 61 60 75 60 77 60 79 80 80 80 79 84 84 84 79 79 79 60 91 92 91 94 95 94 91 98 91 60 60 60 60 6...

output:

Alice
Bob
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Bob

result:

ok 10 tokens

Test #85:

score: 20
Accepted
time: 48ms
memory: 12456kb

input:

10
50000
1 2 3 4 5 6 7 8 9 10 11 12 11 14 15 14 17 14 19 14 21 22 21 14 25 14 14 14 14 14 11 32 33 32 11 36 36 36 36 36 11 42 11 11 11 10 47 48 49 50 50 50 49 49 49 48 48 48 48 48 47 62 63 64 65 64 67 68 69 68 71 68 68 68 67 64 77 78 77 77 77 64 83 64 85 85 85 64 64 64 63 92 93 92 63 63 63 63 63 62 ...

output:

Bob
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Bob
Alice

result:

ok 10 tokens

Test #86:

score: 20
Accepted
time: 52ms
memory: 14472kb

input:

10
50000
1 2 3 4 5 6 7 8 9 8 11 8 8 8 8 8 7 18 19 18 21 21 21 18 25 18 7 28 7 30 7 6 33 34 34 34 33 38 39 38 33 42 43 42 45 46 46 46 45 42 51 52 51 42 33 33 33 6 59 60 59 62 63 62 65 66 65 62 69 62 62 62 62 62 59 59 59 59 59 6 6 6 5 84 85 86 87 88 87 87 87 86 93 94 95 96 97 98 99 98 101 101 101 101 ...

output:

Alice
Bob
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice

result:

ok 10 tokens

Test #87:

score: 20
Accepted
time: 52ms
memory: 14280kb

input:

10
50000
1 2 3 4 5 6 7 8 9 8 8 8 7 14 14 14 7 18 19 18 21 18 18 18 18 18 7 7 7 7 7 6 33 34 35 36 37 37 37 37 37 36 43 44 43 36 36 36 35 50 50 50 35 54 55 54 57 58 57 60 57 57 57 54 65 54 67 54 69 69 69 54 54 54 35 76 77 76 35 35 35 35 35 34 85 86 85 88 85 90 91 90 85 85 85 34 97 98 99 98 101 98 97 1...

output:

Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob

result:

ok 10 tokens

Test #88:

score: 20
Accepted
time: 57ms
memory: 17508kb

input:

1
500000
1 2 3 4 5 6 7 8 9 9 9 8 13 14 13 16 17 16 16 16 16 16 13 8 25 26 25 28 25 30 25 25 25 8 35 36 35 38 35 8 8 8 7 44 45 46 45 48 49 48 45 52 53 52 45 56 57 56 45 60 60 60 45 45 45 44 7 68 69 70 71 70 69 69 69 68 77 78 79 79 79 78 77 84 77 86 77 88 88 88 77 92 93 94 95 96 95 94 93 100 101 100 1...

output:

Alice

result:

ok "Alice"

Test #89:

score: 20
Accepted
time: 51ms
memory: 17404kb

input:

1
500000
1 2 3 4 5 6 7 8 9 8 7 12 12 12 7 16 17 16 19 16 16 16 7 24 25 24 27 24 7 6 31 32 33 32 35 32 37 32 31 40 41 40 31 44 45 46 47 46 45 50 45 52 45 45 45 44 57 58 59 58 61 58 57 64 65 66 65 64 64 64 64 64 57 44 31 31 31 31 31 6 81 82 83 82 81 6 87 87 87 6 6 6 5 94 95 96 97 96 95 95 95 95 95 94 ...

output:

Alice

result:

ok "Alice"

Test #90:

score: 20
Accepted
time: 55ms
memory: 17320kb

input:

1
500000
1 2 3 4 5 6 7 8 9 10 11 12 13 12 15 16 17 18 17 16 15 22 23 22 15 12 12 12 12 12 11 10 33 10 35 36 37 38 37 36 35 42 43 42 35 46 47 46 49 46 35 52 53 53 53 52 57 52 59 60 59 62 59 64 59 66 59 52 69 52 52 52 35 35 35 35 35 10 10 10 9 82 83 84 85 86 87 86 85 90 85 84 84 84 84 84 83 98 99 98 1...

output:

Bob

result:

ok "Bob"

Test #91:

score: 20
Accepted
time: 55ms
memory: 17520kb

input:

1
500000
1 2 3 4 5 6 7 8 9 10 11 12 13 12 15 12 12 12 12 12 11 10 10 10 9 8 27 28 27 27 27 27 27 8 35 8 8 8 7 40 41 42 43 42 45 46 45 42 49 49 49 42 41 54 54 54 41 58 59 58 61 58 58 58 41 66 41 68 41 41 41 40 73 74 75 74 77 78 77 74 81 74 83 74 85 74 74 74 73 90 91 90 73 94 95 96 95 95 95 95 95 94 1...

output:

Bob

result:

ok "Bob"

Test #92:

score: 20
Accepted
time: 48ms
memory: 17312kb

input:

1
500000
1 2 3 4 5 6 7 8 9 10 11 12 13 13 13 12 17 17 17 12 21 22 21 12 11 11 11 10 29 30 31 32 31 30 35 30 37 38 39 38 37 30 43 44 44 44 43 30 49 50 49 30 29 54 55 54 29 58 29 60 61 60 63 60 60 60 60 60 29 70 71 72 71 71 71 70 77 78 77 80 77 77 77 70 85 70 70 70 70 70 29 10 93 94 93 93 93 93 93 10 ...

output:

Alice

result:

ok "Alice"

Test #93:

score: 20
Accepted
time: 51ms
memory: 17388kb

input:

1
500000
1 2 3 4 5 6 7 6 9 10 11 12 11 10 9 9 9 9 9 6 21 21 21 6 25 6 27 6 6 6 6 6 5 34 35 35 35 34 39 40 41 40 40 40 39 46 46 46 39 50 51 50 50 50 39 39 39 34 34 34 34 34 5 64 65 65 65 64 64 64 64 64 5 74 75 76 77 78 77 80 81 80 77 84 85 84 87 84 89 90 89 84 93 84 95 84 84 84 84 84 77 102 103 102 1...

output:

Bob

result:

ok "Bob"

Test #94:

score: 20
Accepted
time: 51ms
memory: 17464kb

input:

1
500000
1 2 3 4 5 6 7 8 9 10 9 12 9 9 9 8 8 8 8 8 7 22 23 22 25 22 27 28 29 28 27 22 33 34 33 33 33 33 33 22 22 22 22 22 7 46 47 48 49 48 47 52 52 52 47 47 47 47 47 46 46 46 46 46 7 66 67 66 66 66 7 72 73 74 73 72 77 78 78 78 77 72 83 83 83 72 7 7 7 7 7 6 93 94 95 96 95 98 98 98 95 102 102 102 95 9...

output:

Alice

result:

ok "Alice"

Test #95:

score: 20
Accepted
time: 49ms
memory: 17328kb

input:

1
500000
1 2 3 4 5 6 7 8 9 10 11 12 13 12 15 12 12 12 11 20 21 20 11 24 25 24 24 24 24 24 11 32 33 32 32 32 11 10 39 40 41 40 40 40 39 46 47 46 39 50 51 50 50 50 39 56 57 56 39 39 39 39 39 10 10 10 10 10 9 70 71 72 71 70 75 76 75 78 75 80 81 82 81 81 81 80 87 88 89 88 91 92 91 88 95 88 97 98 97 88 1...

output:

Bob

result:

ok "Bob"

Subtask #4:

score: 30
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #96:

score: 30
Accepted
time: 55ms
memory: 13992kb

input:

10000
50
1 2 3 4 4 3 7 7 7 3 3 2 2 2 2 1 17 18 19 20 20 19 19 18 25 26 27 28 29 27 27 27 27 27 25 25 25 25 25 18 18 18 17 17 17 17 1 1 1
0 0 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1
50
1 2 3 4 4 3 7 8 7 10 11 11 7 7 7 3 3 3 2 2 2 1 23 24 25 26 2...

output:

Alice
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Bob
...

result:

ok 10000 tokens

Test #97:

score: 30
Accepted
time: 49ms
memory: 13976kb

input:

10000
50
1 2 3 4 3 3 3 3 3 2 2 2 1 14 15 15 14 18 19 20 21 19 23 19 19 19 19 19 18 30 31 32 33 31 35 36 31 31 31 31 31 30 30 30 30 14 14 14 14
0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 0 1 0 1 0 1 0 0 0 0
50
1 2 3 4 5 6 7 8 9 10 10 10 10 9 9 9 9 9 8 8 8 8 7 24 2...

output:

Bob
Alice
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Bo...

result:

ok 10000 tokens

Test #98:

score: 30
Accepted
time: 57ms
memory: 13944kb

input:

10000
50
1 2 2 3 4 5 5 5 8 4 10 12 8 12 8 11 11 9 4 14 20 8 12 12 2 5 2 13 1 28 20 19 5 8 17 10 10 6 38 34 4 39 36 41 44 18 13 4 40
0 1 1 1 1 0 1 1 1 0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 1 1 0 1 0 1 1 0 0 0 1 0 0 1 0 1 1 0 0 0
50
1 2 3 2 4 4 6 5 4 9 1 4 7 6 14 6 9 1 2 7 19 4 17 5 3 24 4 26 15 1...

output:

Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Bob
...

result:

ok 10000 tokens

Test #99:

score: 30
Accepted
time: 64ms
memory: 14024kb

input:

10000
50
1 2 3 4 2 2 2 2 1 10 11 12 13 12 15 16 16 16 15 20 21 12 12 12 12 11 27 28 29 29 29 28 33 33 33 28 28 28 11 11 10 10 10 10 1 1 1 1 1
0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 1 0 0 0 0 0
50
1 2 3 4 5 5 5 4 9 10 11 11 9 14 15 14 14 9 3 3 2 2 2 2 ...

output:

Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Alic...

result:

ok 10000 tokens

Test #100:

score: 30
Accepted
time: 53ms
memory: 13904kb

input:

1000
500
1 2 3 4 5 6 7 8 9 7 6 12 5 14 15 16 17 16 16 15 15 15 14 14 14 14 14 5 5 4 4 4 4 4 3 3 3 2 39 40 41 42 43 44 45 46 47 48 49 50 49 52 49 49 49 48 48 48 46 60 61 62 62 62 62 61 61 61 61 46 46 46 46 45 75 76 77 78 79 79 78 78 77 84 84 84 84 77 76 90 91 92 93 92 95 96 91 98 99 100 101 102 103 1...

output:

Alice
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Al...

result:

ok 1000 tokens

Test #101:

score: 30
Accepted
time: 45ms
memory: 13912kb

input:

1000
500
1 2 3 3 2 5 7 6 2 6 10 6 3 12 12 9 13 14 8 8 7 22 18 4 3 20 19 16 11 6 14 18 29 19 32 2 17 21 15 40 3 10 20 30 1 23 25 36 43 8 40 44 39 50 17 14 45 26 41 26 38 3 4 17 5 15 54 26 29 29 31 31 34 14 57 40 31 14 49 20 26 53 42 41 50 50 28 49 33 57 50 32 42 77 37 10 6 65 83 29 53 52 21 45 10 34 ...

output:

Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alic...

result:

ok 1000 tokens

Test #102:

score: 30
Accepted
time: 52ms
memory: 14040kb

input:

1000
500
1 2 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4...

output:

Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
...

result:

ok 1000 tokens

Test #103:

score: 30
Accepted
time: 53ms
memory: 13980kb

input:

1000
500
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

Alice
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Bob
Alice
Alice
Al...

result:

ok 1000 tokens

Test #104:

score: 30
Accepted
time: 49ms
memory: 14072kb

input:

100
5000
1 2 3 4 5 6 7 8 9 10 11 12 11 14 15 16 15 14 14 14 14 14 11 11 11 10 27 28 29 28 31 32 31 28 28 27 27 27 27 10 9 42 43 44 45 46 47 48 49 50 51 52 51 51 50 56 57 58 59 58 57 62 63 64 64 64 63 63 62 62 62 57 56 50 50 50 50 49 79 79 79 49 49 49 49 48 87 88 89 90 91 92 91 91 91 91 89 89 88 100 ...

output:

Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
...

result:

ok 100 tokens

Test #105:

score: 30
Accepted
time: 53ms
memory: 13988kb

input:

100
5000
1 2 3 4 5 5 4 4 3 10 10 10 3 3 3 3 2 18 19 20 21 22 23 24 25 26 25 24 29 30 31 31 30 34 35 34 37 37 37 37 37 29 43 44 29 29 29 29 24 24 24 24 24 23 23 23 23 23 22 60 61 62 63 64 62 60 60 21 21 20 71 72 73 74 75 76 77 77 77 77 77 76 75 75 75 75 74 74 74 73 73 73 73 72 95 96 97 98 99 98 98 98...

output:

Bob
Alice
Bob
Alice
Bob
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Al...

result:

ok 100 tokens

Test #106:

score: 30
Accepted
time: 48ms
memory: 14124kb

input:

100
5000
1 1 3 1 3 2 5 2 1 8 8 7 4 12 13 5 15 11 3 2 18 9 20 2 15 11 26 4 23 2 9 18 2 6 9 27 19 8 15 23 17 7 2 12 41 34 23 42 38 36 34 46 4 44 15 11 22 15 5 25 38 7 7 44 59 27 48 21 52 42 39 2 12 34 64 24 3 62 75 4 81 7 3 53 11 66 4 22 78 17 87 86 93 60 76 47 22 76 10 26 63 67 20 34 59 59 66 9 77 82...

output:

Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alic...

result:

ok 100 tokens

Test #107:

score: 30
Accepted
time: 57ms
memory: 12244kb

input:

10
50000
1 2 2 3 2 1 5 6 4 2 7 7 5 1 12 1 15 16 6 10 9 21 12 3 3 9 25 26 23 18 15 19 33 6 2 15 27 31 19 32 36 20 39 2 17 44 13 32 3 25 16 10 16 50 37 19 1 39 58 60 25 14 30 16 1 61 66 48 56 27 39 63 65 65 39 7 11 9 35 22 18 56 61 72 7 44 72 48 49 38 81 3 7 87 7 26 40 57 10 62 63 61 38 44 53 75 4 54 ...

output:

Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice

result:

ok 10 tokens

Test #108:

score: 30
Accepted
time: 54ms
memory: 12444kb

input:

10
50000
1 2 3 4 5 6 7 8 9 10 11 12 12 11 15 11 10 18 19 20 21 22 23 24 25 25 24 24 24 23 22 32 21 34 35 36 35 38 39 38 35 35 35 35 34 46 47 48 47 50 50 50 50 50 46 56 57 57 57 57 57 56 56 56 56 56 46 46 46 46 21 20 73 74 75 76 77 76 79 80 75 82 83 84 85 83 82 88 89 90 91 90 90 89 89 89 88 88 88 88 ...

output:

Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice

result:

ok 10 tokens

Test #109:

score: 30
Accepted
time: 54ms
memory: 14476kb

input:

10
50000
1 2 2 2 5 6 3 8 1 9 3 10 12 5 11 6 11 9 3 10 6 3 21 14 23 3 4 2 8 29 11 8 4 25 16 12 21 14 1 1 24 26 12 2 9 39 17 9 27 39 9 5 33 34 55 52 30 57 7 26 2 61 63 38 63 17 66 46 40 20 34 1 11 1 60 46 9 76 65 53 24 34 2 84 51 12 22 77 27 51 79 77 7 28 45 63 54 40 73 51 66 73 62 79 23 39 96 79 106 ...

output:

Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice

result:

ok 10 tokens

Test #110:

score: 30
Accepted
time: 51ms
memory: 12356kb

input:

10
50000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 26 25 30 30 25 25 25 25 25 24 24 23 23 23 23 23 22 22 22 22 22 21 50 51 52 53 52 51 50 57 58 59 60 61 62 63 63 63 63 62 68 62 62 61 61 61 61 61 60 77 78 77 77 77 77 59 59 59 59 59 58 58 57 57 57 57 57 21 20 97 98 99 100...

output:

Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice

result:

ok 10 tokens

Test #111:

score: 30
Accepted
time: 48ms
memory: 17464kb

input:

1
500000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 28 27 32 25 24 24 23 22 22 22 21 21 21 20 44 45 44 20 19 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 62 65 65 61 68 69 70 69 69 61 61 61 61 60 60 60 60 60 59 83 84 85 84 87 84 84 84 84 83 93 94 95 94 94 59 59 58 ...

output:

Bob

result:

ok "Bob"

Test #112:

score: 30
Accepted
time: 71ms
memory: 17520kb

input:

1
500000
1 1 1 1 2 5 7 6 6 10 5 6 12 3 1 3 6 16 6 4 10 20 19 4 9 8 1 8 10 28 9 24 14 23 24 22 24 17 3 12 12 37 40 13 22 6 19 7 26 3 2 8 16 37 43 50 22 19 50 28 11 43 34 47 45 38 12 30 31 27 41 61 69 59 20 28 15 16 27 42 18 61 8 13 69 72 40 9 24 6 79 24 90 46 56 20 83 38 77 40 34 102 79 75 71 23 89 4...

output:

Alice

result:

ok "Alice"

Test #113:

score: 30
Accepted
time: 69ms
memory: 17532kb

input:

1
500000
1 2 1 2 5 1 7 1 3 2 3 10 1 7 13 5 11 18 4 17 3 13 14 10 6 18 14 21 16 13 19 23 16 17 27 16 26 16 34 17 27 22 7 5 35 20 4 18 15 19 41 30 27 16 4 1 20 5 3 5 12 31 19 3 45 18 35 43 59 31 24 56 31 67 31 42 18 11 73 27 44 2 36 12 11 29 21 21 29 7 59 69 63 47 32 67 84 43 1 92 50 92 97 49 31 53 50...

output:

Alice

result:

ok "Alice"

Test #114:

score: 30
Accepted
time: 81ms
memory: 17316kb

input:

1
500000
1 1 3 1 4 5 7 2 2 4 4 6 4 5 6 16 17 4 2 2 9 3 2 11 2 22 23 6 25 24 30 23 14 5 21 30 37 28 17 10 3 12 13 3 36 24 24 45 34 1 25 48 10 1 29 33 30 25 8 47 52 59 10 54 54 65 55 38 44 29 11 41 16 43 53 70 38 27 2 17 55 64 8 40 1 31 23 44 88 13 48 82 11 61 28 46 75 3 84 94 54 37 63 81 105 90 53 56...

output:

Alice

result:

ok "Alice"

Test #115:

score: 30
Accepted
time: 55ms
memory: 17376kb

input:

1
500000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 24 23 23 23 22 30 31 32 33 34 35 35 34 38 34 34 34 34 34 33 32 46 46 46 46 46 31 31 30 30 30 30 22 22 22 21 61 62 62 62 62 62 61 21 21 21 20 20 19 74 75 76 77 76 76 74 81 82 81 84 81 74 19 19 19 18 91 92 93 94 95 96 97 98 99 98 ...

output:

Alice

result:

ok "Alice"

Test #116:

score: 30
Accepted
time: 48ms
memory: 17332kb

input:

1
500000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 26 25 30 31 30 33 30 30 25 25 25 25 25 24 24 24 24 23 46 47 48 49 49 48 52 48 48 48 47 57 58 59 60 61 62 62 61 61 61 60 68 68 60 59 72 73 74 74 74 73 72 72 72 72 58 58 58 58 58 57 57 57 47 47 46 46 46 46 23 23 22 21 21 ...

output:

Alice

result:

ok "Alice"

Test #117:

score: 30
Accepted
time: 53ms
memory: 17512kb

input:

1
500000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 28 28 28 28 27 36 37 36 39 36 36 36 26 44 45 46 47 48 49 49 48 52 53 54 48 48 48 47 47 44 61 62 62 62 62 61 61 61 61 44 44 44 25 74 75 76 77 77 77 77 77 76 75 84 85 86 87 88 87 85 84 92 84 84 84 84 75 75 75 75 ...

output:

Alice

result:

ok "Alice"

Test #118:

score: 30
Accepted
time: 83ms
memory: 17384kb

input:

1
500000
1 2 3 4 3 3 6 3 4 4 2 11 10 12 13 16 8 8 12 7 7 18 12 7 16 7 3 27 5 20 21 20 2 11 34 3 2 30 32 4 24 13 42 3 18 46 45 11 25 37 14 11 12 43 55 10 52 4 21 50 40 12 46 14 39 65 42 32 43 22 29 21 64 62 69 70 44 12 35 45 59 26 80 32 54 65 36 70 37 52 45 75 33 32 88 45 58 22 75 50 23 59 8 34 64 80...

output:

Alice

result:

ok "Alice"

Extra Test:

score: 0
Extra Test Passed