QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#301883 | #7786. Graft and Transplant | zzuqy# | WA | 1ms | 3564kb | C++14 | 657b | 2024-01-10 13:47:16 | 2024-01-10 13:47:17 |
Judging History
answer
#include <iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<iomanip>
#include<algorithm>
#include<deque>
#define ll long long
#define mod 998244353
#define sc(A) scanf("%d",&A)
#define rep(A,B,C) for(int C=A;C<=B;++C)
#define fep(A,B,C) for(int C=A;C>=B;--C)
#define put(x) printf("%d\n",x)
#define db double
using namespace std;
const int MAXN=510,maxn=77;
int n,m,x,maxx=62,top;
int ru[MAXN],ans;
signed main()
{
//freopen("1.in","r",stdin);
sc(n);
rep(2,n,i)
{
int x,y;
sc(x);sc(y);
++ru[x];++ru[y];
}
rep(1,n,i)if(ru[i]!=1)++ans;
//put(ans);
puts(ans%2==1?"Bob":"Alice");
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3420kb
input:
4 1 2 2 3 3 4
output:
Alice
result:
ok "Alice"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
4 1 2 1 3 1 4
output:
Bob
result:
ok "Bob"
Test #3:
score: -100
Wrong Answer
time: 1ms
memory: 3564kb
input:
2 1 2
output:
Alice
result:
wrong answer 1st words differ - expected: 'Bob', found: 'Alice'