id
int32 0
32.5k
| code
stringlengths 95
8.4k
| label
stringclasses 65
values |
---|---|---|
32,000 | int main(){
int n;
scanf("%d",&n);
int i,a[200],b[200],t=0,e,p=0,m;
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
}
for(i=0;i<n;i++){
if((a[i]==0&&b[i]==1)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0))
{t++;}
else if(a[i]==b[i]){
p++;}
}
m=n-p;
if(m!=0){
if(m%2==0){
e=m/2;
if(t==e)
printf("Tie");
else if(t>e)
printf("A");
else
printf("B");
}
else{
e=m/2;
if(t>e)
printf("A");
else
printf("B");} }
else
printf("Tie");
return 0;
}
| 65 |
32,001 | int main(){
int n,c[200][2],a=0,b=0;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d %d\n",&c[i][0],&c[i][1]);
if(c[i][0]==0){
if(c[i][1]==1){
a++;}
if(c[i][1]==2){
b++;}
if(c[i][1]==0){
a++;
b++;}
}
if(c[i][0]==1){
if(c[i][1]==0){
b++;}
if(c[i][1]==2){
a++;}
if(c[i][1]==1){
a++;
b++;}
}
if(c[i][0]==2){
if(c[i][1]==0){
a++;}
if(c[i][1]==1){
b++;}
if(c[i][1]==2){
a++;
b++;}
}}
if(a>b){
printf("A");}
if(a==b){
printf("Tie");}
if(a<b){
printf("B");}
return 0;} | 65 |
32,002 | int main(){
int a=0,b=0,n,i;
int ga[200],gb[200];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&ga[i],&gb[i]);
if(ga[i]==0&&gb[i]==1){
a+=1;
}
else if(ga[i]==0&&gb[i]==2){
b+=1;
}
else if(ga[i]==1&&gb[i]==0){
b+=1;
}
else if(ga[i]==1&&gb[i]==2){
a+=1;
}
else if(ga[i]==2&&gb[i]==0){
a+=1;
}
else if(ga[i]==2&&gb[i]==1){
b+=1;
}
else if(ga[i]==gb[i]){
continue;
}
}
if(a==b){
printf("Tie");
}
else if(a>b){
printf("A");
}
else if(a<b){
printf("B");
}
return 0;
}
| 65 |
32,003 | main()
{
int n,A,B,Aw=0,Bw=0;
scanf("%d",&n);
while(n--)
{
scanf("%d%d",&A,&B);
if(A==0)
{
if(B==1)
Aw++;
else if(B==2)
Bw++;
}
else if(A==1)
{
if(B==2)
Aw++;
else if(B==0)
Bw++;
}
else
{
if(B==0)
Aw++;
else if(B==1)
Bw++;
}
}
if(Aw>Bw)
printf("A");
else if(Aw<Bw)
printf("B");
else
printf("Tie");
}
| 65 |
32,004 | int main(){
int n,i,j=0,k=0,c=0;
int a[100],b[100];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]==0){
if(b[i]==0){
c++;
}else if(b[i]==1){
j++;
}else if(b[i]==2){
k++;
}
}else if(a[i]==1){
if(b[i]==0){
k++;
}else if(b[i]==1){
c++;
}else if(b[i]==2){
j++;
}
}else if(a[i]==2){
if(b[i]==0){
j++;
}else if(b[i]==1){
k++;
}else if(b[i]==2){
c++;
}
}
}
if(j==k){
printf("Tie");
}else if(j>k){
printf("A");
}else if(j<k){
printf("B");
}
return 0;
}
| 65 |
32,005 | int main()
{
int n,a[200],b[200],i,x=0,y=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]==0){
if(b[i]==1){
x++;
}else if(b[i]==2){
y++;
}
}else if(a[i]==1){
if(b[i]==2){
x++;
}else if(b[i]==0){
y++;
}
}else if(a[i]==2){
if(b[i]==0){
x++;
}else if(b[i]==1){
y++;
}
}
}
if(x>y){
printf("A");
}else if(x<y){
printf("B");
}else{
printf("Tie");
}
return 0;
} | 65 |
32,006 | int main(){
int n,i,s=0,a[200],b[200];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&a[i]);
scanf("%d",&b[i]);
if((a[i]==0&&b[i]==1)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0)){
s=s+1;
}
else if(a[i]==b[i]){
s=s+0;
}
else{
s=s-1;
}
}
if(s>0){
printf("A");
}
else if(s==0){
printf("Tie");
}
else if(s<0){
printf("B");
}
return 0;
}
| 65 |
32,007 | int main(){
int n,sz[2],a=0,b=0,i;
scanf("%d\n",&n);
for(i=0;i<n;i++){
scanf("%d %d",&(sz[0]),&(sz[1]));
if((sz[0]==0&&sz[1]==1)||(sz[0]==1&&sz[1]==2)||(sz[0]==2&&sz[1]==0)){
a++;
}
else if((sz[0]==1&&sz[1]==0)||(sz[0]==2&&sz[1]==1)||(sz[0]==0&&sz[1]==2)){
b++;
}
}
if(a>b){
printf("A");
}
else if(a<b){
printf("B");
}
else{
printf("Tie");
}
return 0;
}
| 65 |
32,008 |
int main() {
int n;
scanf("%d",&n);
struct game{int g1;int g2;}g[n];
int i;
int p=0;
for(i=0;i<n;i++)
{
scanf("%d %d",&(g[i].g1),&(g[i].g2));
if((g[i].g1==0 && g[i].g2==1) || (g[i].g1==1 && g[i].g2==2)||g[i].g1==2 && g[i].g2==0){p++;}
else if(g[i].g1==g[i].g2){}
else{p--;}
}
if(p>0){printf("A");}
else if(p<0){printf("B");}
else if(p==0){printf("Tie");}
return 0;
} | 65 |
32,009 |
int main()
{
int n,a[2000],b[2000],i,j,c,d[2];
scanf("%d",&n);
d[0]=0;
d[1]=0;
for(j=0;j<n;j++)
{
scanf("%d%d",&a[j],&b[j]);
c=a[j]-b[j];
if(c==1) d[1]++;
else if(c==2) d[0]++;
else if(c==-1) d[0]++;
else if(c==-2) d[1]++;
else continue;
}
if(d[0]>d[1]) printf("A\n");
else if(d[0]<d[1]) printf("B\n");
else printf("Tie\n");
return 0;
}
| 65 |
32,010 | int main(){
int a[N],b[N],n,i,p,q;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
}
p=0;
q=0;
for(i=0;i<n;i++){
if(a[i]-b[i]==1||a[i]-b[i]==-2){
q++;
}else if(a[i]-b[i]!=0){
p++;
}
}
if(p>q){
printf("A");
}else if(q>p){
printf("B");
}else{
printf("Tie");
}
return 0;
}
| 65 |
32,011 | int main()
{
int n,T=0,A=0,B=0;
int sz[200][2];
scanf("%d",&n);
for(int i=0;i<n;i++)
{
for(int a=0;a<2;a++)
{
scanf("%d",&sz[i][a]);
}
}
for(int b=0;b<n;b++)
{
if((sz[b][0]==0&&sz[b][1]==1)||(sz[b][0]==1&&sz[b][1]==2)||(sz[b][0]==2&&sz[b][1]==0))
A++;
if((sz[b][0]==1&&sz[b][1]==0)||(sz[b][0]==2&&sz[b][1]==1)||(sz[b][0]==0&&sz[b][1]==2))
B++;
}
if(A==B)
printf("Tie");
if(A>B)
printf("A");
if(A<B)
printf("B");
return 0;
} | 65 |
32,012 | int main(){
int n;
scanf("%d",&n);
int b[n][2];
int i,j,a=0,c=0;
for(i=0;i<n;i++){
scanf("%d%d",&b[i][0],&b[i][1]);
}
for(i=0;i<n;i++){
if(b[i][0]==0&&b[i][1]==1){
a++;
}else if(b[i][0]==1&&b[i][1]==2){
a++;
}else if(b[i][0]==2&&b[i][1]==0){
a++;
}else if(b[i][1]==1&&b[i][0]==2){
c++;
}else if(b[i][1]==0&&b[i][0]==1){
c++;
}else if(b[i][1]==2&&b[i][0]==0){
c++;
}else if(b[i][0]==b[i][1]){
continue;
}
}
if(a>c){
printf("A");
}else if(a<c){
printf("B");
}else if(a==c){
printf("Tie");
}
return 0;
}
| 65 |
32,013 | int main(){
int n,i,sz[200][2],a,b;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&sz[i][0],&sz[i][1]);
}
a=0;b=0;
for(i=0;i<n;i++){
if(((sz[i][0]==0)&&(sz[i][1]==1))||((sz[i][0]==1)&&(sz[i][1]==2))||((sz[i][0]==2)&&(sz[i][1]==0))){
a++;
}
if(sz[i][0]==sz[i][1]){
continue;
}
if(((sz[i][0]==1)&&(sz[i][1]==0))||((sz[i][0]==2)&&(sz[i][1]==1))||((sz[i][0]==0)&&(sz[i][1]==2))){
b++;
}
}
if(a>b){
printf("A");
}
if(a==b){
printf("Tie");
}
if(a<b){
printf("B");
}
return 0;
}
| 65 |
32,014 | int main(){
int n;
scanf("%d",&n);
int a[MAX],b[MAX];
for(int i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
}
int sum1=0;
int sum2=0;
for(int k=0;k<n;k++){
if(a[k]-b[k]==-1){
sum1=sum1+1;
}else if(a[k]-b[k]==1){
sum2=sum2+1;
}else if(a[k]-b[k]==2){
sum1=sum1+1;
}else if(a[k]-b[k]==-2){
sum2=sum2+1;
}else if(a[k]==b[k]){
sum1=sum1+1;
sum2=sum2+1;
}
}
if(sum1>sum2){
printf("A");
}else if(sum1<sum2){
printf("B");
}else{
printf("Tie");
}
return 0;
}
| 65 |
32,015 | int main(){
int n,sz[100][2],i,a,b;
a=0;
b=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&sz[i][0],&sz[i][1]);
}
for(i=0;i<n;i++){
if(sz[i][0]==sz[i][1]){
a=a+1;
b=b+1;
}else if(sz[i][0]-sz[i][1]==-1||sz[i][0]-sz[i][1]==2){
a=a+1;
}else{
b=b+1;
}
}
if(a==b){
printf("Tie");
}else if(a>b){
printf("A");
}else if(a<b){
printf("B");
}
return 0;
}
| 65 |
32,016 |
int main()
{
int t,a[200],b[200],m=0,n=0,i;
scanf("%d",&t);
for(i=0;i<t;i++)
{
scanf("%d %d",&a[i],&b[i]);
if(a[i]==0&&b[i]==1)
m=m+1;
if(a[i]==1&&b[i]==2)
m=m+1;
if(a[i]==2&&b[i]==0)
m=m+1;
if(a[i]==0&&b[i]==2)
n=n+1;
if(a[i]==2&&b[i]==1)
n=n+1;
if(a[i]==1&&b[i]==0)
n=n+1;
}
if(m>n)
printf("A");
if(m<n)
printf("B");
if(m==n)
printf("Tie");
return 0;
} | 65 |
32,017 | int main ()
{
int n,i,a,b,m=0,p=0;
scanf("%d",&n);
for (i=0;i<n;i++){
scanf("%d %d",&a,&b);
if((a==0&&b==0)||(a==1&&b==1)||(a==2&&b==2)){
m=m+0;
p=p+0;
}
if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0)){
m=m+1;
p=p+0;
}
if((a==0&&b==2)||(a==1&&b==0)||(a==2&&b==1)){
m=m+0;
p=p+1;
}
}
if(m==p){
printf("Tie");
}
if(m>p){
printf("A");
}
if(m<p){
printf("B");
}
return 0;
}
| 65 |
32,018 | int main()
{
int n,a=0,b=0,i;
int A,B;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d%d",&A,&B);
if(A!=B)
{
if(A==0)
{
if(B==1)
a++;
else
b++;
}
if(A==1)
{
if(B==2)
a++;
else
b++;
}
if(A==2)
{
if(B==0)
a++;
else
b++;
}
}
}
if(a>b)
printf("A");
if(a<b)
printf("B");
if(a==b)
printf("Tie");
return 0;
} | 65 |
32,019 | int main(){
int n,i,A,B;
int a[100],b[100];
scanf("%d",&n);
A=0;
B=0;
for(i=1;i<=n;i++){
scanf("%d%d",&a[i],&b[i]);
}
for(i=1;i<=n;i++){
if(a[i]-b[i]==1||b[i]-a[i]==2){
B=B+1;
}
else if(b[i]-a[i]==1||a[i]-b[i]==2){
A=A+1;
}
}
if(A>B){
printf("A\n");
}
else if(A==B){
printf("Tie\n");
}
else{
printf("B\n");
}
return 0;
} | 65 |
32,020 | int a[210],b[210],n;
int pd(int a,int b)
{
if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0))
return 1;
else if(a==b)
return 0;
else
return -1;
}
main()
{
scanf("%d",&n);
int i;
for(i=0;i<n;i++)
scanf("%d %d",&a[i],&b[i]);
int s=0;
for(i=0;i<n;i++)
s=s+pd(a[i],b[i]);
if(s>0)
printf("A");
else if(s==0)
printf("Tie");
else
printf("B");
}
| 65 |
32,021 | int main(){
int n,i,a[200],b[200];
int A=0,B=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]==b[i]){
continue;
}
if(a[i]==0){
if(b[i]==2){B+=1;}
else{A+=1;}
}
if(a[i]==1){
if(b[i]==0){B+=1;}
else{A+=1;}
}
if(a[i]==2){
if(b[i]==1){B+=1;}
else{A+=1;}
}
}
if(A>B){
printf("A");
}
if(A<B){printf("B");}
if(A==B){printf("Tie");}
return 0;
} | 65 |
32,022 | int main()
{
int n,x=0,y=0,i;
scanf("%d\n",&n);
for(i=0;i<n;i++)
{
int a,b;
scanf("%d%d",&a,&b);
if(a==b) {x++;y++;}
else if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0)) x++;
else if((a==1&&b==0)||(a==2&&b==1)||(a==0&&b==2)) y++;
}
if(x>y) printf("A");
else if(x<y) printf("B");
else if(x==y) printf("Tie");
return 0;
}
| 65 |
32,023 | int main(){
int a=0,b=0,n,i,c,d,e,f;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d%d",&c,&d);
e=d-c;
f=c-d;
if(e==1||f==2)a++;
else if(f==1||e==2)b++;
}
if(a>b)printf("A");
else if(b>a)printf("B");
else printf("Tie");
return 0;
} | 65 |
32,024 | int main(){
int a[200],n,i,b[200],s=0,t=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
}
for(i=0;i<n;i++){
if(a[i]==0){
if(b[i]==1){
s++;
}else if(b[i]==2){
t++;
}
}else if(a[i]==1){
if(b[i]==2){
s++;
}else if(b[i]==0){
t++;
}
}else{
if(b[i]==0){
s++;
}else if(b[i]==1){
t++;
}
}
}
if(s>t){
printf("A");
}else if(s<t){
printf("B");
}else{
printf("Tie");
}
return 0;
}
| 65 |
32,025 | int main(){
int n,a[100],i,b[100],c,d;
scanf("%d",&n);
c=0;
d=0;
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
if(a[i]==b[i]){
}else if(a[i]==0&&b[i]==1){
c=c+1;
}else if(a[i]==1&&b[i]==2){
c=c+1;
}else if(a[i]==2&&b[i]==0){
c=c+1;
}else if(b[i]==0&&a[i]==1){
d=d+1;
}else if(b[i]==1&&a[i]==2){
d=d+1;
}else if(b[i]==2&&a[i]==0){
d=d+1;
}
}
if(c>d){
printf("A");
}else if(c==d){
printf("Tie");
}else if(c<d){
printf("B");
}
return 0;
} | 65 |
32,026 |
main()
{
int a[1000];
int b[1000];
int n;
int s=0,t=0;
scanf("%d",&n);
int i,j,k;
for(i=0;i<n;i++)
{
scanf("%d %d",&a[i],&b[i]);
if(a[i]==0&&b[i]==1) s++;
else if(a[i]==0&&b[i]==2) t++;
else if(a[i]==1&&b[i]==0) t++;
else if(a[i]==b[i])
{
s=s+0;
t=t+0;
}
else if(a[i]==1&&b[i]==2) s++;
else if(a[i]==2&&b[i]==0) s++;
else if(a[i]==2&&b[i]==1) t++;
}
if(s>t) printf("A");
else if(s<t) printf("B");
else printf("Tie");
}
| 65 |
32,027 | int main (){
int n,a,b,i=0,j=0;
scanf("%d",&n);
while(n--){
scanf("%d%d",&a,&b);
if(a==0&&b==1){i++;}
if(a==0&&b==2){j++;}
if(a==1&&b==0){j++;}
if(a==1&&b==2){i++;}
if(a==2&&b==0){i++;}
if(a==2&&b==1){j++;}
}
if(i>j){printf("A");}
if(i<j){printf("B");}
if(i==j){printf("Tie");}
return 0;
}
| 65 |
32,028 | int main()
{
int n,i,a[N],b[N],c[N],s=0,t=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&a[i],&b[i]);
if(a[i]==b[i])
c[i]=0;
else if(a[i]==0&&b[i]==1)
c[i]=1;
else if(a[i]==0&&b[i]==2)
c[i]=-1;
else if(a[i]==1&&b[i]==0)
c[i]=-1;
else if(a[i]==1&&b[i]==2)
c[i]=1;
else if(a[i]==2&&b[i]==0)
c[i]=1;
else if(a[i]==2&&b[i]==1)
c[i]=-1;
}
for(i=0;i<n;i++)
{
if(c[i]==1)
s++;
else if(c[i]==-1)
t++;
}
if(s>t)
printf("A");
else if(s<t)
printf("B");
else printf("Tie");
return 0;
} | 65 |
32,029 | int main()
{
int n,a=0,b=0;
int sz1[201],sz2[201];
int i=0;
scanf("%d",&n);
for(i;i<=n;i++)
{
scanf("%d%d",&sz1[i],&sz2[i]);
}
i=0;
for(i;i<=n;i++)
{
if(sz1[i]==0&&sz2[i]==1)
a+=1;
if(sz1[i]==1&&sz2[i]==2)
a+=1;
if(sz1[i]==2&&sz2[i]==0)
a+=1;
if(sz2[i]==0&&sz1[i]==1)
b+=1;
if(sz2[i]==1&&sz1[i]==2)
b+=1;
if(sz2[i]==2&&sz1[i]==0)
b+=1;
}
if(a>b)
printf("A");
if(a<b)
printf("B");
if(a==b)
printf("Tie");
return 0;
}
| 65 |
32,030 | int main (){
int n,i,a,b,x=0,y=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
{scanf("%d %d",&a,&b);
if(a==b){x=x;y=y;}
if(a==0&&b==1){x=x+1;}
if(b==0&&a==1){y=y+1;}
if(a==1&&b==2){x=x+1;}
if(a==2&&b==1){y=y+1;}
if(a==0&&b==2){y=y+1;}
if(a==2&&b==0){x=x+1;}
}
if(x>y) printf("A");
if(x==y) printf("Tie");
if(x<y) printf("B");
return 0;
}
| 65 |
32,031 | int main(){
int n;
int a[200],b[200];
int A,B;
A=0;
B=0;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
}
for(int j=0;j<n;j++){
if(a[j]==b[j]){A++;B++;}
else if((a[j]==0)&&(b[j]==1)){A++;}
else if((a[j]==1)&&(b[j]==2)){A++;}
else if((a[j]==2)&&(b[j]==0)){A++;}
else{B++;}
}
if(A>B)printf("A");
if(B>A)printf("B");
if(B==A)printf("Tie");
return 0;} | 65 |
32,032 | int main()
{
int n,m,i,j,p,q;
scanf("%d",&n);
m=0;
for(i=0;i<n;i++)
{
scanf("%d %d",&p,&q);
if(p==q)
continue;
if((p==0&&q==1)||(p==1&&q==2)||(p==2&&q==0))
m++;
else
m--;
}
if(m==0)
printf("Tie");
if(m>0)
printf("A");
if(m<0)
printf("B");
return 0;
} | 65 |
32,033 | int main()
{
int a,b,A=0,B=0,n,i,j;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&a,&b);
j=a-b;
if(j==-1||j==2)
A++;
else if(j==1||j==-2)
B++;
}
if(A>B)
printf("A");
if(A<B)
printf("B");
if(A==B)
printf("Tie");
} | 65 |
32,034 | int main()
{
int n,a,b,i,a1=0,b1=0,c1=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&a,&b);
if((a<b&&(b-a)==1)||(a>b&&(a-b)==2))
a1++;
else if(a==b) c1++;
else b1++;
}
if(a1>b1)
printf("A");
else if(a1<b1)
printf("B");
else
printf("Tie");
}
| 65 |
32,035 |
int main(int argc, char *argv[])
{
int n,i;
scanf("%d",&n);
int a[200],b[200];
int t=0,j=0;
for(i=0;i<n;i++)
{
scanf("%d%d", &a[i],&b[i]);
}
for(i=0;i<n;i++)
{
if(a[i]==0&&b[i]==1){
t++;
}
else if(a[i]==1&&b[i]==2){
t++;
}
else if(a[i]==2&&b[i]==0){
t++;
}
else if(a[i]==b[i]){
continue;
}
else{
j++;
}
}
if(t==j){
printf("Tie");
}
else if(t>j){
printf("A");
}
else if(t<j){
printf("B");
}
return EXIT_SUCCESS;
} | 65 |
32,036 |
int main () {
int num;
cin >> num;
int aWinCount = 0;
int bWinCount = 0;
for (int i = 0; i < num; i++) {
int a, b;
cin >> a >> b;
if (a == 0) {
if (b == 1) {
aWinCount++;
} else if (b == 2) {
bWinCount++;
}
}
if (a == 1) {
if (b == 0) {
bWinCount++;
} else if (b == 2) {
aWinCount++;
}
}
if (a == 2) {
if (b == 1) {
bWinCount++;
} else if (b == 0) {
aWinCount++;
}
}
}
if (aWinCount == bWinCount) {
cout << "Tie" << endl;
} else if (aWinCount > bWinCount) {
cout << "A" << endl;
} else {
cout << "B" << endl;
}
}
| 65 |
32,037 | int main(){
int n,a[200],b[200],sa=0,sb=0,i;
scanf("%d\n",&n);
for(i=0;i<n;i++)
{
scanf("%d%d",&(a[i]),&(b[i]));
}
for(i=0;i<n;i++)
{
if(a[i]==0)
{
if(b[i]==1)
sa++;
if(b[i]==2)
sb++;
}
if(a[i]==1)
{
if(b[i]==0)
sb++;
if(b[i]==2)
sa++;
}
if(a[i]==2)
{
if(b[i]==0)
sa++;
if(b[i]==1)
sb++;
}
}
if(sa>sb)
printf("A");
if(sa<sb)
printf("B");
if(sa==sb)
printf("Tie");
return 0;
} | 65 |
32,038 | int main(){
int n,i,as=0,bs=0,p=0;
int a[200],b[200];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
}
for(i=0;i<n;i++){
if(a[i]==0&&b[i]!=0){
if(b[i]==1){
as++;
}else{
bs++;
}
}else if(a[i]==2&&b[i]!=2){
if(b[i]==0){
as++;
}else{
bs++;
}
}else if(a[i]==1&&b[i]!=1){
if(b[i]==2){
as++;
}else{
bs++;
}
}
}
if(as>bs){
printf("A");
}else if(bs>as){
printf("B");
}else{
printf("Tie");
}
return 0;
}
| 65 |
32,039 | int main()
{
int n;
int i;
int a[200][2];
int ascore=0,bscore=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i][0]);
scanf("%d",&a[i][1]);
if(a[i][0]==0&&a[i][1]==1)ascore++;
if(a[i][0]==0&&a[i][1]==2)bscore++;
if(a[i][0]==1&&a[i][1]==0)bscore++;
if(a[i][0]==1&&a[i][1]==2)ascore++;
if(a[i][0]==2&&a[i][1]==0)ascore++;
if(a[i][0]==2&&a[i][1]==1)bscore++;
}
if(ascore>bscore)printf("A");
if(bscore>ascore)printf("B");
if(ascore==bscore)printf("Tie");
} | 65 |
32,040 | int main(){
int N;
int i;
int A[200],B[100];
int a,b;
a=0;
b=0;
scanf("%d",&N);
for(i=0;i<N;i++){
scanf("%d %d",&A[i],&B[i]);
if((A[i]==0&&B[i]==1)||(A[i]==1&&B[i]==2)||(A[i]==2&&B[i]==0)){
a=a+1;
}else if((B[i]==0&&A[i]==1)||(B[i]==1&&A[i]==2)||(B[i]==2&&A[i]==0)){
b=b+1;
}else if((A[i]==0&&B[i]==0)||(A[i]==1&&B[i]==1)||(A[i]==2&&B[i]==2)){
continue;
}
}
if(a>b){
printf("A");
}else if(a==b){
printf("Tie");
}else {
printf("B");
}
return 0;
}
| 65 |
32,041 |
int main()
{
int n,a,b,i,c,k=0,j=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{scanf("%d %d",&a,&b);
c=a-b;
if(c==-1||c==2) k++;
else if(c!=0) j++;
}
if(k>j) printf("A");
else if(k==j) printf("Tie");
else printf("B");
return 0;
} | 65 |
32,042 | int main()
{
int n,i,as,bs,pj;
int a[200],b[200];
scanf("%d",&n);
as=0,bs=0,pj=0;
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
}
for(i=0;i<n;i++){
if(a[i]==b[i]){
pj=pj+1;
}
if(a[i]==0&&b[i]==1){
as=as+1;
}
if(a[i]==1&&b[i]==2){
as=as+1;
}
if(a[i]==2&&b[i]==0){
as=as+1;
}
if(b[i]==0&&a[i]==1){
bs=bs+1;
}
if(b[i]==1&&a[i]==2){
bs=bs+1;
}
if(b[i]==2&&a[i]==0){
bs=bs+1;
}
}
if(as>bs){
printf("A");
}
if(as<bs){
printf("B");
}
if(bs==as){
printf("Tie");
}
return 0;
}
| 65 |
32,043 | int main()
{
int n,i,a=0,b=0,c=0;
int y[1000][2]={{1,1},{1,1},{1,1},{1,1},{1,1},{1,1},{1,1},{1,1},{1,1},{1,1}};
scanf("%d",&n);
for(i=0;i<=n-1;i++)
scanf("%d%d\n",&y[i][1],&y[i][2]);
for(i=0;i<=n-1;i++)
{if(( y[i][1]==0&&y[i][2]==1)||(y[i][1]==1&&y[i][2]==2)||(y[i][1]==2&&y[i][2]==0))
a=a+1;
else if(y[i][1]==y[i][2])
c=c+1;
else b=b+1;}
if(a>b) printf("A\n");
else if(a<b)printf("B\n");
else printf("Tie\n");
}
| 65 |
32,044 | int main(){
int n,a[200],b[200],i,sum1=0,sum2=0;
scanf("%d\n",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]==b[i]){
sum1=sum1+1;
sum2=sum2+1;
}
if((a[i]==0&&b[i]==1)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0)){
sum1=sum1+1;
}
if((a[i]==0&&b[i]==2)||(a[i]==1&&b[i]==0)||(a[i]==2&&b[i]==1)){
sum2=sum2+1;
}
}
if(sum1>sum2){
printf("A");
}
if(sum1<sum2){
printf("B");
}
if(sum1==sum2){
printf("Tie");
}
return 0;
} | 65 |
32,045 |
main()
{
int n,ai=0,bi=0,c;
scanf("%d",&n);
int a,b;
for(c=0;c<n;c++)
{
scanf("%d %d",&a,&b);
if(a==b)
;
else
{
if(a==0 && b==1)
ai++;
else
{
if(a==1 && b==2)
ai++;
else
{
if(a==2 && b==0)
ai++;
else
bi++;
}
}
}
}
if (ai>bi)
printf("A");
else ;
if (ai==bi)
printf("Tie");
else ;
if (ai<bi)
printf("B");
else ;
}
| 65 |
32,046 |
int i=0,n=0,m=0,p=0,q=0,r=0,t=0,e=0,k=0;
int a[1000][1000],b[1000][1000];
int main (){
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a[i][0],&a[i][1]);
}
for(i=0;i<n;i++){
if(a[i][0]==0&&a[i][1]==1)t++;
if(a[i][0]==1&&a[i][1]==2)t++;
if(a[i][0]==2&&a[i][1]==0)t++;
if(a[i][0]==1&&a[i][1]==0)e++;
if(a[i][0]==2&&a[i][1]==1)e++;
if(a[i][0]==0&&a[i][1]==2)e++;
}
if(e>t)printf("B");
else if(e<t)printf("A");
else if(e=t)printf("Tie");
return 0;
}
| 65 |
32,047 | main()
{
int n,i,j,k,win=0,lose=0;
int a[200]={0},b[200]={0};
scanf("%d",&n);
for(i=1;i<=n;i++)
scanf("%d%d",&a[i],&b[i]);
for(i=1;i<=n;i++)
{
if(a[i]==b[i]);
else
{
if(a[i]==0)
{
if(b[i]==1) win++;
else lose++;
}
if(a[i]==1)
{
if(b[i]==0) lose++;
else win++;
}
if(a[i]==2)
{
if(b[i]==0) win++;
else lose++;
}
}
}
if(win==lose) printf("Tie\n");
if(win>lose) printf("A\n");
if(win<lose) printf("B\n");
} | 65 |
32,048 |
int main(){
int i,n;
int a=0,b=0;
scanf("%d",&n);
int sz[800];
for(i=1;i<=n;i++){
scanf("%d %d",&(sz[0]),&(sz[1]));
if(sz[0]==sz[1]){a+=0;b+=0;}
else if(sz[0]!=sz[1]){
if(sz[0]==0&&sz[1]==1){a++;}
else if(sz[0]==1&&sz[1]==2){a++;}
else if(sz[0]==2&&sz[1]==0){a++;}
else if(sz[0]==1&&sz[1]==0){b++;}
else if(sz[0]==2&&sz[1]==1){b++;}
else if(sz[0]==0&&sz[1]==2){b++;}}}
if(a>b){printf("A");}
else if(a<b){printf("B");}
else if(a==b){printf("Tie");}
return 0;}
| 65 |
32,049 | int main(){
int a[500],b[500],i,j,n,m;
i=0;
j=0;
scanf("%d",&n);
for(m=0;m<n;m++){
scanf("%d", &(a[m]));
scanf("%d", &(b[m]));
if(a[m]==0&&b[m]==1)
i+=1;
else if(a[m]==1&&b[m]==2)
i+=1;
else if(a[m]==2&&b[m]==0)
i+=1;
else if(a[m]==b[m])
continue;
else
j+=1;
}
if(i>j)
printf("A");
else if(i<j)
printf("B");
else
printf("Tie");
return 0;
}
| 65 |
32,050 |
int main(){
int n,a,b,x,y,i,j;
a=0;b=0;i=0;j=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&x,&y);
if(x-y==1){b++;}
else if(y-x==1){a++;}
else if(x-y==2){a++;}
else if(y-x==2){b++;}
}
if(a>b){printf("A");}
else if(a<b){printf("B");}
else if(a=b){printf("Tie");}
return 0;
} | 65 |
32,051 | int main(){
int n;
scanf("%d",&n);
struct point{
int a,b;
}
sz[200];
int i;
for(i=0;i<n;i++){
scanf("%d%d",&sz[i].a,&sz[i].b);
}
int x=0;
for(i=0;i<n;i++){
if(sz[i].a==1&&sz[i].b==0){
x+=1;
}
if(sz[i].a==0&&sz[i].b==1){
x-=1;
}
if(sz[i].a==2&&sz[i].b==0){
x-=1;
}
if(sz[i].a==0&&sz[i].b==2){
x+=1;
}
if(sz[i].a==1&&sz[i].b==2){
x-=1;
}
if(sz[i].a==2&&sz[i].b==1){
x+=1;
}
}
if(x>0){
printf("B\n");
}
else if(x==0){
printf("Tie\n");
}
else if(x<0){
printf("A\n");
}
return 0;
} | 65 |
32,052 | int main(){
int n,A=0,B=0,i;
scanf("%d",&n);
int a[n],b[n];
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
if((a[i]==0&&b[i]==1)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0)){
A++;
}else if(a[i]==b[i]){
continue;
}else{
B++;
}
}
if(A>B){
printf("A");
}else if(A<B){
printf("B");
}else{
printf("Tie");
}
return 0;
}
| 65 |
32,053 | int main(){
struct{
int a,b;
}sz[100];
int n,i,x=0,y=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&sz[i].a,&sz[i].b);
}
for(i=0;i<n;i++){
if(sz[i].a-sz[i].b==-1||sz[i].a-sz[i].b==2){x++;}
else if(sz[i].a-sz[i].b==1||sz[i].a-sz[i].b==-2){y++;}
else{continue;}
}
if(x>y){printf("A");}
else if(x==y){printf("Tie");}
else{printf("B");}
return 0;
}
| 65 |
32,054 | int main(){
int a=0,b=0,n;
int ac[200],bc[200];
scanf("%d\n",&n);
for(int i=0;i<n;i++)
{scanf("%d %d\n",&(ac[i]),&(bc[i]));}
for(int j=0;j<n;j++)
{if(ac[j]==bc[j]){
a=a,b=b;}
else if(ac[j]-bc[j]==-1){
a=a+1,b=b;}
else if(ac[j]-bc[j]==2){
a=a+1,b=b;}
else{a=a,b=b+1;}
}
if(a==b){printf("Tie");}
else if(a>b){printf("A");}
else{printf("B");}
return 0;
} | 65 |
32,055 | int main(){
int n,A=0;
scanf("%d",&n);
int a[n],b[n];
for(int i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if((a[i]==0&&b[i]==1)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0)){A++;}
else if(a[i]!=b[i]){A--;}
}
if(A>0){printf("A");}
if(A<0){printf("B");}
if(A==0){printf("Tie");}
return 0;
} | 65 |
32,056 | int main (){
int n,i,x,y;
scanf("%d",&n);
int a[n],b[n];
for(i=1;i<n+1;i++){
scanf("%d %d",&a[i],&b[i]);
}
x=0,y=0;
for(i=1;i<n+1;i++){
if(a[i]-b[i]==1||b[i]-a[i]==2){
y++;
}else if(a[i]-b[i]==2||b[i]-a[i]==1){
x++;
}else{
x=x,y=y;
}
}
if(x>y){
printf("A");
}else if(x<y){
printf("B");
}else{
printf("Tie");
}
return 0;
} | 65 |
32,057 | int main()
{
int n,i,a[200],b[200],sum=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d%d",&a[i],&b[i]);
if((a[i]==0&&b[i]==1)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0))
sum++;
else if((b[i]==0&&a[i]==1)||(b[i]==1&&a[i]==2)||(b[i]==2&&a[i]==0))
sum--;
else if((b[i]==0&&a[i]==0)||(b[i]==1&&a[i]==1)||(b[i]==2&&a[i]==2))
sum=sum;
}
if(sum>0)
printf("A");
else if(sum==0)
printf("Tie");
else if(sum<0)
printf("B");
return 0;
} | 65 |
32,058 | int main()
{
int n;
scanf ("%d",&n);
int s[200];
int i;
for (i=0;i<200;i++)
s[i]=0;
for (i=0;i<n;i++)
{
int a,b;
scanf ("%d%d",&a,&b);
if (a-b==-1||a-b==2)
s[i]=1;
if (a-b==1||a-b==-2)
s[i]=2;
if (a==b)
s[i]=0;
}
int A=0,B=0;
for (i=0;i<n;i++)
{
if (s[i]==1)
A++;
if (s[i]==2)
B++;
}
if (A>B)
printf ("A\n");
if (B>A)
printf ("B\n");
if (A==B)
printf ("Tie\n");
} | 65 |
32,059 |
int main(){
int q,i,a=0,b=0,m,n;
scanf("%d",&q);
for(i=0;i<q;i++){
scanf("%d %d",&m,&n);
if(m==0&&n==1) a++;
else if(m==0&&n==2) b++;
else if(m==1&&n==2) a++;
else if(m==1&&n==0) b++;
else if(m==2&&n==0) a++;
else if(m==2&&n==1) b++;}
if(a>b) printf("A");
else if(a<b) printf("B");
else printf("Tie");
return 0;
} | 65 |
32,060 | int main(){
int n,a,b,sa=0,sb=0;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d%d", &a,&b);
if(a==0){
if(b==0){
sa=sa+1;
sb=sb+1;
}else if(b==1){
sa=sa+1;
}else{
sb=sb+1;
}
}else if(a==1){
if(b==1){
sa=sa+1;
sb=sb+1;
}else if(b==2){
sa=sa+1;
}else{
sb=sb+1;
}
}else{
if(b==2){
sa=sa+1;
sb=sb+1;
}else if(b==0){
sa=sa+1;
}else{
sb=sb+1;
}
}}
if(sa>sb){
printf("A");
}else if(sa<sb){
printf("B");
}else{
printf("Tie");
}
return 0;
}
| 65 |
32,061 | int main(){
int n,a[1000][2],i,j,A=0,B=0;
scanf("%d",&n);
for(i=0;i<n;i++){
for(j=0;j<2;j++){
scanf("%d",&a[i][j]);
}
}
for(i=0;i<n;i++){
if(a[i][0]==0&&a[i][1]==0){;}
if(a[i][0]==1&&a[i][1]==1){;}
if(a[i][0]==2&&a[i][1]==2){;}
if(a[i][0]==0&&a[i][1]==1){A++;}
if(a[i][0]==0&&a[i][1]==2){B++;}
if(a[i][0]==1&&a[i][1]==0){B++;}
if(a[i][0]==1&&a[i][1]==2){A++;}
if(a[i][0]==2&&a[i][1]==0){A++;}
if(a[i][0]==2&&a[i][1]==1){B++;}
}
if(A>B){printf("A");}
else if(A<B){printf("B");}
else if(A=B){printf("Tie");}
return 0;
} | 65 |
32,062 | int main()
{
int n,i,j;
int a[300][2];
int countA=0;
int countB=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
for(j=0;j<2;j++)
{
scanf("%d",&a[i][j]);
}
}
for(i=0;i<n;i++)
{
if( (a[i][0]==0 && a[i][1]==1) || (a[i][0]==1 && a[i][1]==2) || (a[i][0]==2 && a[i][1]==0) )
{
countA=countA+1;
}
else if((a[i][0]==0 && a[i][1]==0) || (a[i][0]==1 && a[i][1]==1) || (a[i][0]==2 && a[i][1]==2))
{
countA=countA+1;
countB=countB+1;
}
else
{
countB=countB+1;
}
}
if(countA>countB)
{
printf("A");
}
else if(countB>countA)
{
printf("B");
}
else
{
printf("Tie");
}
return 0;
}
| 65 |
32,063 | int main()
{
int n,i,j,a[200],b[200],p,q;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
}
for(i=0,p=0,q=0;i<n;i++){
if((a[i]==0&&b[i]==1)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0))
p++;
else if((a[i]==0&&b[i]==2)||(a[i]==1&&b[i]==0)||(a[i]==2&&b[i]==1))
q++;
}
if(p==q)
printf("Tie");
else if(p>q)
printf("A");
else if(p<q)
printf("B");
return 0;
} | 65 |
32,064 | int main(){
int a[200],b[200],c,d=0,e=0,f,g;
scanf("%d",&c);
for(f=0;f<c;f++){
scanf("%d%d",&a[f],&b[f]);
if(a[f]==0){
if(b[f]==1){
d++;
}
if(b[f]==2){
e++;
}
}
if(a[f]==1){
if(b[f]==2){
d++;
}
if(b[f]==0){
e++;
}
}
if(a[f]==2){
if(b[f]==0){
d++;
}
if(b[f]==1){
e++;
}
}
}
if(d>e){
printf("A");
}
if(d==e){
printf("Tie");
}
if(d<e){
printf("B");
}
return 0;
} | 65 |
32,065 | main()
{
int n,i=1,A=0,B=0;
scanf("%d",&n);
while(i<=n){
int a,b;
scanf("%d %d",&a,&b);
if((b==0&&a==1)||(b==1&&a==2)||(b==2&&a==0))
B=B+1;
else if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0))
A=A+1;
i=i+1;
}
if(A>B)
printf("A");
else if(B>A)
printf("B");
else if(A==B)
printf("Tie");
}
| 65 |
32,066 | int main()
{
int n,i,m=0,q=0;
int a[201],b[201];
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d %d",&a[i],&b[i]);
for(i=0;i<n;i++)
{
if(a[i]-b[i]==-1||a[i]-b[i]==2)
m++;
else if(a[i]==b[i])
m=m+1-1;
else if(a[i]-b[i]==1||a[i]-b[i]==-2)
q++;
}
if(m==q)
printf("Tie");
else if(m>q)
printf("A");
else if(m<q)
printf("B");
return 0;
} | 65 |
32,067 | int main()
{
int n,i,A[200],B[200],V=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&A[i],&B[i]);
if(A[i]==2&&B[i]==0)
V++;
else if(A[i]==0&&B[i]==2)
V--;
else
if(A[i]>B[i])
V--;
else if(A[i]<B[i])
V++;
}
if(V>0)
puts("A");
else if(V<0)
puts("B");
else
puts("Tie");
return 0;
} | 65 |
32,068 | int main(){
int n,a=0,b=0,c,d,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&c,&d);
if(c==d)
continue;
else if(c==0&&d==2)
b++;
else if(c==2&&d==0)
a++;
else if(c-d<0)
a++;
else if(c-d>0)
b++;
}
if(a>b)
printf("A");
if(a==b)
printf("Tie");
if(a<b)
printf("B");
return 0;
} | 65 |
32,069 |
int main()
{
int n,i,A=0,B=0,a,b;
scanf ("%d",&n);
for (i=0;i<n;i++){
scanf("%d%d",&a,&b);
if(a==0&&b==1){
A++;}
else if (a==1&&b==0){
B++;
}
else if (a==1&&b==2){
A++;
}
else if (a==2&&b==1){
B++;
}
else if (a==0&&b==2){
B++;
}
else if (a==2&&b==0){
A++;
}
}
if (A>B)
printf("A");
else if (A<B)
printf("B");
else
printf("Tie");
return 0;
}
| 65 |
32,070 |
int main()
{
int n;
cin>>n;
int a=0,b=0;
for(int i=0;i<n;i++){
int a1,b1;
cin>>a1>>b1;
if(a1==0){
if(b1==1) a++;
if(b1==2) b++;
}else if(a1==1){
if(b1==2) a++;
if(b1==0) b++;
}else{
if(b1==0) a++;
if(b1==1) b++;
}
}
if(a>b) cout<<"A";
if(a<b) cout<<"B";
if(a==b) cout<<"Tie";
cout<<endl;
return 0;
}
| 65 |
32,071 | int main(){
struct s{
int b,c;
}a[201];
int i,n,p=0,q=0;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d%d",&(a[i].b),&(a[i].c));
for(i=0;i<n;i++){
if((a[i].b)==1&&(a[i].c)==2)
p+=1;
else if((a[i].b)==2&&(a[i].c)==0)
p+=1;
else if((a[i].b)==0&&(a[i].c)==1)
p+=1;
else if((a[i].b)==1&&(a[i].c)==0)
q+=1;
else if((a[i].b)==2&&(a[i].c)==1)
q+=1;
else if((a[i].b)==0&&(a[i].c)==2)
q+=1;
}
if(p>q)
printf("A");
else if(p<q)
printf("B");
else if(p=q)
printf("Tie");
return 0;
} | 65 |
32,072 | int main()
{
int n,i=0,j=0,k;
int a[200],b[200];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d%d",&a[i],&b[i]);
}
for(k=0,i=0,j=0;k<n;k++)
{
if(a[k]==0&&b[k]==1)
i++;
else if(a[k]==1&&b[k]==2)
i++;
else if(a[k]==2&&b[k]==0)
i++;
else if(a[k]==0&&b[k]==2)
j++;
else if(a[k]==1&&b[k]==0)
j++;
else if(a[k]==2&&b[k]==1)
j++;
else
continue;
}
if(i>j)
printf("A");
if(i<j)
printf("B");
if(i==j)
printf("Tie");
return 0;
} | 65 |
32,073 | int main()
{
int n,i,x=0,y=0;
int a[200],b[200];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&(a[i]),&(b[i]));
}for(i=0;i<n;i++){
if(a[i]==0&&b[i]==1){
x=x+1;
}else if(a[i]==1&&b[i]==2){
x=x+1;
}else if(a[i]==2&&b[i]==0){
x=x+1;
}
if(a[i]==1&&b[i]==0){
y=y+1;
}else if(a[i]==2&&b[i]==1){
y=y+1;
}else if(a[i]==0&&b[i]==2){
y=y+1;
}
}if(x>y){
printf("A");
}if(x<y){
printf("B");
}if(x==y){
printf("Tie");
}
return 0;
}
| 65 |
32,074 | int main()
{int a,n,b,c=0,d=0,i;
scanf("%d",&n);
for(i=0;i<n;i++)
{scanf("%d %d",&a,&b);
if (a==0)
{if(b==1)
c+=1;
if(b==2)
d+=1;
}
if (a==1)
{if(b==2)
c+=1;
if(b==0)
d+=1;
}
if (a==2)
{if(b==1)
d+=1;
if(b==0)
c+=1;
}
}
if(c>d)
printf("A");
if(c<d)
printf("B");
if(c==d)
printf("Tie");
return 0;
} | 65 |
32,075 | int main(){
int a,b,c,d,n,i,t;
scanf("%d",&n);
c=0;d=0;
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
t=a-b;
if(t==-1||t==2){
c=c+1;
}else if(t!=0){
d=d+1;
}
}
if(c>d){
printf("A");
}else if(c<d){
printf("B");
}else{
printf("Tie");
}
return 0;
}
| 65 |
32,076 | int main () {
int n,a[200][2],i,j,x=0,y=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
for(j=0;j<2;j++)
{
scanf("%d",&a[i][j]);
}
if((a[i][0]==0&&a[i][1]==1)||(a[i][0]==1&&a[i][1]==2)||(a[i][0]==2&&a[i][1]==0))
{
x++;
}
else if(a[i][0]==a[i][1])
{
y++;
}
}
if(x*2==(n-y))
{
printf("Tie");
}
else if(x*2<(n-y))
{
printf("B");
}
else
{
printf("A");
}
return 0;
} | 65 |
32,077 | int main()
{
int n,i,c=0,d=0;
scanf("%d",&n);
int a[n],b[n];
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
}
for(i=0;i<n;i++){
if(a[i]<b[i]){
if(a[i]==0&&b[i]==2){
d=d+1;
}
else{
c=c+1;
}
}
else if(a[i]>b[i]){
if(b[i]==0&&a[i]==2){
c=c+1;
}
else{
d=d+1;
}
}
}
if(c>d){printf("A");}
else if(d>c){printf("B");}
else{printf("Tie");}
return 0;
} | 65 |
32,078 | int a[200][2];
int main()
{
int n,i,win,tie,lose;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d%d",&a[i][0],&a[i][1]);
win=0;
tie=0;
lose=0;
for(i=0;i<n;i++)
{
if(a[i][0]==0&&a[i][1]==1)
win+=1;
else if(a[i][0]==1&&a[i][1]==2)
win+=1;
else if(a[i][0]==2&&a[i][1]==0)
win+=1;
else if(a[i][0]==a[i][1])
tie+=1;
}
lose=n-win-tie;
if(win>lose)
printf("A\n");
else if(win<lose)
printf("B\n");
else
printf("Tie\n");
return 0;
}
| 65 |
32,079 | int main(){
int a[200],b[200],s1=0,s2=0,n,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
}
for(i=0;i<n;i++){
if(a[i]==b[i]){s1++;s2++;}
if(a[i]==0){if(b[i]==1)s1++;
if(b[i]==2)s2++;
}
if(a[i]==1){if(b[i]==2)s1++;
if(b[i]==0)s2++;
}
if(a[i]==2){if(b[i]==0)s1++;
if(b[i]==1)s2++;
}
}
if(s1>s2)printf("A");
if(s1<s2)printf("B");
if(s1==s2)printf("Tie");
return 0;
} | 65 |
32,080 | int main()
{
int a[200], b[200], i, r=0, n;
scanf("%d", &n);
for(i=0;i<=(n-1);i++)
{
scanf("%d%d", &a[i], &b[i]);
}
for(i=0;i<=(n-1);i++)
{
if(((a[i]==0)&&(b[i]==1))||((a[i]==1)&&(b[i]==2))||((a[i]==2)&&(b[i]==0)))
{
r++;
}
else if(((b[i]==0)&&(a[i]==1))||((b[i]==1)&&(a[i]==2))||((b[i]==2)&&(a[i]==0)))
{
r--;
}
}
if(r>0)
{
printf("A");
}
else if(r<0)
{
printf("B");
}
else if(r==0)
{
printf("Tie");
}
return 0;
}
| 65 |
32,081 | int main(){
int n,i,a,b,s,t;
s=0;t=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
if((a==2&&b==0)||(a==1&&b==2)||(a==0&&b==1)){s++;}
else if((a==0&&b==2)||(a==2&&b==1)||(a==1&&b==0)){t++;}
else if(a==b){continue;}
}
if(s>t){printf("A");}
else if(s<t){printf("B");}
else if(s==t){printf("Tie");}
return 0;
} | 65 |
32,082 | int main(){
int i,j,k,num,a[200],b[200],m=0,n=0;
scanf("%d",&num);
for(i=0;i<num;i++){
scanf("%d %d",&a[i],&b[i]);
if(a[i]==b[i]){
m++;
n++;
}else if((a[i]==0&&b[i]==1)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0))
m++;
else if((b[i]==0&&a[i]==1)||(b[i]==1&&a[i]==2)||(b[i]==2&&a[i]==0))
n++;
}
if(m>n)
printf("A");
else if(m<n)
printf("B");
else
printf("Tie");
return 0;
} | 65 |
32,083 | int main(){
int n;
int a[1000],b[1000];
scanf("%d",&n);
int i,c,d;
c=0;
d=0;
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
if(a[i]-b[i]==0){
c+=0;
}else if((b[i]-a[i]==1)||((a[i]==2)&&(b[i]==0))){
c+=1;
}else{
d+=1;
}
}
if(c>d){
printf("A");
}else if(c<d){
printf("B");
}else{
printf("Tie");
}
return 0;
} | 65 |
32,084 |
main()
{
int n;
scanf("%d",&n);
int a=0,b=0;
for (int i=0;i<n;i++)
{
int x,y;
scanf("%d %d",&x,&y);
if (x-y==-1 || x-y==2) a++;
else if (x==y) continue;
else b++;
}
if (a>b) printf("A\n");
else if (a<b) printf("B\n");
else printf("Tie\n");
} | 65 |
32,085 | int main(){
int n,i,a,b,x=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(a==0){
if(b==1) x+=1;
else if(b==2) x-=1;
}
else if(a==1){
if(b==0) x-=1;
else if(b==2) x+=1;
}
else{
if(b==0) x+=1;
if(b==1) x-=1;
}
}
if(x>0) printf("A");
else if(x==0) printf("Tie");
else printf("B");
return 0;
} | 65 |
32,086 | int main() {
int a,b,n,i,c,d;
scanf ("%d",&n);
d=0;
c=0;
for (i=0;i<n;i++){
scanf ("%d %d",&a,&b);
if(a==0&&b==1){
c++;
}
else if (a==0&&b==2){
d++;
}
else if (a==1&&b==0){
d++;
}
else if (a==1&&b==2){
c++;
}
else if (a==2&&b==0){
c++;
}
else if (a==2&&b==1){
d++;
}
else {
i=i;
}
}
if (c>d){
printf ("A");
}
else if (c<d){
printf ("B");
}
else if (c==d){
printf ("Tie");
}
return 0;
}
| 65 |
32,087 | int main()
{
int n,i,a,b,sum=0,huk=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&a,&b);
if(a==1&&b==0||a==0&&b==2||a==2&&b==1)
{
huk++;
}
if(a==0&&b==1||a==1&&b==2||a==2&&b==0)
{
sum++;
}
}
if(sum>huk)
printf("A");
else if(sum<huk)
printf("B");
else
printf("Tie");
return 0;
}
| 65 |
32,088 | int main(){
int n,i,a,b,aw=0,bw=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d %d",&a,&b);
if(a==0&&b==1){aw++;}
if(a==1&&b==2){aw++;}
if(a==2&&b==0){aw++;}
if(a==1&&b==0){bw++;}
if(a==2&&b==1){bw++;}
if(a==0&&b==2){bw++;}}
if(aw>bw){printf("A");}
else if(aw<bw){printf("B");}
else{printf("Tie");}
return 0;
} | 65 |
32,089 | int main(){
int n,i,a=0,b=0;
int sz[200][2];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&sz[i][0],&sz[i][1]);
}
for(i=0;i<n;i++){
if(sz[i][0]==sz[i][1]){
a++;
b++;
}else if(sz[i][0]==0&&sz[i][1]==1){
a++;
}else if(sz[i][0]==0&&sz[i][1]==2){
b++;
}else if(sz[i][0]==1&&sz[i][1]==0){
b++;
}else if(sz[i][0]==1&&sz[i][1]==2){
a++;
}else if(sz[i][0]==2&&sz[i][1]==0){
a++;
}else{
b++;
}
}
if(a==b){
printf("Tie");
}else if(a>b){
printf("A");
}else{
printf("B");
}
return 0;
} | 65 |
32,090 | int main(){
int n,a=0,b=0,i,c,d;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&c,&d);
if((c-d)==-1||(c-d)==2){
a++;
}else if((d-c)==-1||(d-c)==2)
b++;
}
if(a>b)
printf("A");
else if(b>a)
printf("B");
else
printf("Tie");
return 0;
} | 65 |
32,091 | int main(){
int sz[2000];
int cz[2000];
int n,i;
int sum=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&sz[i]);
scanf("%d",&cz[i]);
if((sz[i]==0&&cz[i]==1)||(sz[i]==1&&cz[i]==2)||(sz[i]==2&&cz[i]==0)){
sum++;}
else if((cz[i]==0&&sz[i]==1)||(cz[i]==1&&sz[i]==2)||(cz[i]==2&&sz[i]==0)){
sum--;}
}
if(sum==0)
printf("Tie");
else if(sum>0)
printf("A");
else if(sum<0)
printf("B");
return 0;
} | 65 |
32,092 | int main(){
int n;
scanf("%d",&n);
struct suoyou{
int qian;
int hou;
int jg;
}suoyous[202];
int i;
for(i=0;i<n;i++){
scanf("%d%d",&suoyous[i].qian,&suoyous[i].hou);
if(suoyous[i].qian==0&&suoyous[i].hou==1){
suoyous[i].jg=1;
}else if(suoyous[i].qian==1&&suoyous[i].hou==2){
suoyous[i].jg=1;
}else if(suoyous[i].qian==2&&suoyous[i].hou==0){
suoyous[i].jg=1;
}else if(suoyous[i].qian==0&&suoyous[i].hou==2){
suoyous[i].jg=0;
}else if(suoyous[i].qian==0&&suoyous[i].hou==0){
suoyous[i].jg=2;
}else if(suoyous[i].qian==1&&suoyous[i].hou==1){
suoyous[i].jg=2;
}else if(suoyous[i].qian==1&&suoyous[i].hou==0){
suoyous[i].jg=0;
}else if(suoyous[i].qian==0&&suoyous[i].hou==1){
suoyous[i].jg=1;
}else if(suoyous[i].qian==2&&suoyous[i].hou==1){
suoyous[i].jg=0;
}else if(suoyous[i].qian==2&&suoyous[i].hou==2){
suoyous[i].jg=2;
}
}
int s=0;
for(i=0;i<n;i++){
if(suoyous[i].jg==1){
s++;
}
}
int m=0;
for(i=0;i<n;i++){
if(suoyous[i].jg==0){
m++;
}
}
if(s>m){
printf("A");
}else if(s<m){
printf("B");
}else if(s==m){
printf("Tie");
}
return 0;
} | 65 |
32,093 | int main(){
int n,a,b,c=0,d=0;
scanf("%d",&n);
while(n--){
scanf("%d %d",&a,&b);
if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0)){c++;}
if(a==b){c++;
d++;}
if((b==0&&a==1)||(b==1&&a==2)||(b==2&&a==0)){d++;}
}
if(c>d)printf("A");
if(c<d)printf("B");
if(c==d)printf("Tie");
return 0;
}
| 65 |
32,094 | int main(){
int n,a[120],b[120];
int r=0,t=0,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
if((a[i]==0&&b[i]==1)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0)){
t+=1;}
else if((a[i]==0&&b[i]==2)||(a[i]==1&&b[i]==0)||(a[i]==2&&b[i]==1)){
r+=1;}
else {
t+=0;
r+=0;}
}
if(t>r){
printf("A");}
else if(r>t){
printf("B");}
else {
printf("Tie");}
return 0;
}
| 65 |
32,095 | int main(){
int n,a,b,i,A=0,B=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0)){
A++;
}
else if((b==0&&a==1)||(b==1&&a==2)||(b==2&&a==0)){
B++;
}
else if((a==0&&b==0)||(a==1&&b==1)||(a==2&&b==2)){
A+=0;
B+=0;
}
}
if(A>B){
printf("A");
}
else if(B>A){
printf("B");
}
else if(A=B){
printf("Tie");
}
return 0;
}
| 65 |
32,096 | int main(){
int n,i,a[100],b[100],c=0,d=0,e=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
}
for(i=0;i<n;i++){
if(a[i]==b[i]) e++;
else if((a[i]==0&&b[i]==1)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0)) c++;
else if((a[i]==0&&b[i]==2)||(a[i]==1&&b[i]==0)||(a[i]==2&&b[i]==1)) d++;
}
if(c>d) printf("A\n");
else if(c<d) printf("B\n");
else if(c=d) printf("Tie\n");
return 0;
}
| 65 |
32,097 |
int main()
{
int n,a,b,i,j;
int c[200][2];
scanf ("%d",&n);
a=0;
b=0;
for(i=0;i<n;i++){
for(j=0;j<2;j++){
scanf("%d",&c[i][j]);
}
}
for(i=0;i<n;i++){
if((c[i][0]==0&&c[i][1]==1)||(c[i][0]==1&&c[i][1]==2)||(c[i][0]==2&&c[i][1]==0)){
a++;
}else if(c[i][0]==c[i][1]){
a=a+0;
b=b+0;
}else{
b++;
}
}
if(a>b){
printf("A");
}if(b>a){
printf("B");
}if(a==b){
printf("Tie");
}
return 0;
}
| 65 |
32,098 | int main(){
int n;
scanf("%d",&n);
int a[200],b[200];
int c=0,d=0;
int i;
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
}
for(i=0;i<n;i++){
if((a[i]==0&&b[i]==1)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0)){
c++;
}else if((b[i]==0&&a[i]==1)||(b[i]==1&&a[i]==2)||(b[i]==2&&a[i]==0)){
d++;
}else if((a[i]==0&&b[i]==0)||(a[i]==1&&b[i]==1)||(a[i]==2&&b[i]==2)){
continue;
}
}
if(c>d){
printf("A");
}else if(c<d){
printf("B");
}else{
printf("Tie");
}
return 0;
} | 65 |
32,099 | int main(){
int a[200],b[200];
int n,i;
int a1=0,b1=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
}
for(i=0;i<n;i++){
if(a[i]==b[i])continue;
if(a[i]==0){
if(b[i]==1)a1++;
if(b[i]==2)b1++;
}
if(a[i]==1){
if(b[i]==2)a1++;
if(b[i]==0)b1++;
}
if(a[i]==2){
if(b[i]==0)a1++;
if(b[i]==1)b1++;
}
}
if(a1==b1){printf("Tie");}
if(a1>b1){printf("A");}
if(a1<b1){printf("B");}
return 0;
} | 65 |