UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#197317#3429. 双人博弈ddh123100189ms5896kbC++11257b2023-11-11 09:07:252023-11-11 13:01:44

answer

#include<bits/stdc++.h>
using namespace std;
int n,x;
map<int,int>m;
int main(){
    scanf("%d",&n);
    for(int i=1;i<=n;i++)scanf("%d",&x),m[2e9-x]++;
    for(auto &&i:m)if(i.second&1){puts("Alice");return 0;};
    puts("Bob");
    return 0;
}

详细

小提示:点击横条可展开更详细的信息

Subtask #1:

score: 20
Accepted

Test #1:

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

input:

2
1 2

output:

Alice

result:

ok "Alice"

Test #2:

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

input:

2
2 2

output:

Bob

result:

ok "Bob"

Test #3:

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

input:

2
2 4

output:

Alice

result:

ok "Alice"

Subtask #2:

score: 20
Accepted

Test #4:

score: 20
Accepted
time: 32ms
memory: 5896kb

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: 28ms
memory: 5896kb

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: 1212kb

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: 1208kb

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: 40ms
memory: 3552kb

input:

100000
816970941 205006355 945030420 872718974 544433065 309498648 572338912 816155137 380139690 444...

output:

Bob

result:

ok "Bob"

Test #9:

score: 0
Accepted
time: 47ms
memory: 5892kb

input:

100000
892035194 54971177 269410793 465533634 639684700 213114683 443540512 301413525 277593864 2548...

output:

Alice

result:

ok "Alice"

Test #10:

score: 0
Accepted
time: 42ms
memory: 3552kb

input:

100000
816970941 205006354 945030420 872718974 544433065 309498648 572338912 816155137 380139690 444...

output:

Alice

result:

ok "Alice"

Extra Test:

score: 0
Extra Test Passed