ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#197318 | #3429. 双人博弈 | zhaoyanmin | 100 | 93ms | 1624kb | C++11 | 411b | 2023-11-11 09:15:28 | 2023-11-11 13:01:48 |
answer
#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define debug for(i=0;i<n;i++) cout<<f[i]<<' ';cout<<endl;
const string out1="Alice",out2="Bob";
int f[100005];
signed main()
{
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++) scanf("%d",&f[i]);
sort(f,f+n);
for(i=n-2,n=1;i>=-1;i--)
if(f[i]==f[i+1]) n++;
else {if(n&1) {cout<<out1;return 0;} n=1;}
cout<<out2;
return 0;
}
详细
小提示:点击横条可展开更详细的信息
Subtask #1:
score: 20
Accepted
Test #1:
score: 20
Accepted
time: 0ms
memory: 1224kb
input:
2 1 2
output:
Alice
result:
ok "Alice"
Test #2:
score: 0
Accepted
time: 0ms
memory: 1224kb
input:
2 2 2
output:
Bob
result:
ok "Bob"
Test #3:
score: 0
Accepted
time: 0ms
memory: 1224kb
input:
2 2 4
output:
Alice
result:
ok "Alice"
Subtask #2:
score: 20
Accepted
Test #4:
score: 20
Accepted
time: 17ms
memory: 1620kb
input:
100000 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 31 32 33 34 ...
output:
Alice
result:
ok "Alice"
Test #5:
score: 0
Accepted
time: 20ms
memory: 1620kb
input:
100000 4852 5063 39780 40806 48265 81218 96735 115329 117809 123175 125946 134012 138499 147184 1516...
output:
Alice
result:
ok "Alice"
Subtask #3:
score: 20
Accepted
Test #6:
score: 20
Accepted
time: 0ms
memory: 1228kb
input:
10 1 4 4 1 6 6 4 6 6 4
output:
Bob
result:
ok "Bob"
Test #7:
score: 0
Accepted
time: 0ms
memory: 1224kb
input:
10 1 4 4 1 6 6 4 6 6 3
output:
Alice
result:
ok "Alice"
Subtask #4:
score: 40
Accepted
Test #8:
score: 40
Accepted
time: 20ms
memory: 1624kb
input:
100000 816970941 205006355 945030420 872718974 544433065 309498648 572338912 816155137 380139690 444...
output:
Bob
result:
ok "Bob"
Test #9:
score: 0
Accepted
time: 18ms
memory: 1620kb
input:
100000 892035194 54971177 269410793 465533634 639684700 213114683 443540512 301413525 277593864 2548...
output:
Alice
result:
ok "Alice"
Test #10:
score: 0
Accepted
time: 18ms
memory: 1620kb
input:
100000 816970941 205006354 945030420 872718974 544433065 309498648 572338912 816155137 380139690 444...
output:
Alice
result:
ok "Alice"
Extra Test:
score: 0
Extra Test Passed