id
int32 0
32.5k
| code
stringlengths 95
8.4k
| label
stringclasses 65
values |
---|---|---|
32,100 | int main(){
int a[200],b[200];
int n,i,s=0,t=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){
s+=1;
}else if(a[i]==1&&b[i]==0||a[i]==2&&b[i]==1||a[i]==0&&b[i]==2){
t+=1;
}else if(a[i]==b[i]){
s+=0;
}
}
if(s>t){
printf("A");
}else if(s<t){
printf("B");
}else if(s=t){
printf("Tie");
}
return 0;
}
| 65 |
32,101 | int main(){
int n,i,a,b,c,d;
scanf("%d",&n);
i=1;
c=0;
d=0;
while(i<=n){
scanf("%d%d",&a,&b);
if(a==b){
i++;
}else if(a==0&&b==1){
c=c+1;
i++;
}else if(a==0&&b==2){
d=d+1;
i++;
}else if(a==1&&b==0){
d=d+1;
i++;
}else if(a==1&&b==2){
c=c+1;
i++;
}else if(a==2&&b==0){
c=c+1;
i++;
}else{d=d+1;
i++;
}
}
if(c>d){
printf("A\n");
}else if(c==d){
printf("Tie\n");
}else{printf("B\n");}
return 0;
}
| 65 |
32,102 | int main(){
int a,b,n,x[200][2],i;
scanf("%d",&n);
a=0;
b=0;
for(i=0;i<n;i++){
scanf("%d %d",&x[i][0],&x[i][1]);
if(x[i][0]==0){
if(x[i][1]==1) a=a+1;
else if(x[i][1]==2) b=b+1;
}
if(x[i][0]==1){
if(x[i][1]==2) a=a+1;
else if(x[i][1]==0) b=b+1;
}
if(x[i][0]==2){
if(x[i][1]==0) a=a+1;
else if(x[i][1]==1) b=b+1;
}
}
if(a>b){
printf("A\n");
}else if(a<b){
printf("B\n");
}else{
printf("Tie\n");
}
return 0;
}
| 65 |
32,103 | int main()
{
int n,i,p,q;
int a[100],b[100];
scanf("%d",&n);
p=0;
q=0;
for(i=0;i<n;i++)
{
scanf("%d%d",&a[i],&b[i]);
if(a[i]==0&&b[i]==1)
{
p++;
}
else if(a[i]==0&&b[i]==2)
{
q++;
}
else if(a[i]==0&&b[i]==0)
{
p=p;
}
else if(a[i]==1&&b[i]==2)
{
p++;
}
else if(a[i]==1&&b[i]==0)
{
q++;
}
else if(a[i]==1&&b[i]==1)
{
p=p;
}else if(a[i]==2&&b[i]==0)
{
p++;
}
else if(a[i]==2&&b[i]==1)
{
q++;
}
else if(a[i]==2&&b[i]==2)
{
p=p;
}
}
if(p==q)
{
printf("Tie");
}
else if(p>q)
{
printf("A");
}
else
{
printf("B");
}
return 0;
} | 65 |
32,104 | int main(){
int n,a=0,b=0,c=0,i,j;
scanf("%d",&n);
int sz[201][3];
for(i=0;i<n;i++){
for(j=0;j<2;j++){
scanf("%d",&sz[i][j]);
}
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++;
}else
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++;
}else
if(sz[i][0]==sz[i][1]){
a++;
b++;
}
}
if(a>b){
printf("A");
}else
if(b>a){
printf("B");
}else
if(b=a){
printf("Tie");
}
return 0;
}
| 65 |
32,105 | int main()
{
int n,a[200],b[200],result=0,i,j,k;
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) result=result+1;
else if(a[i]-b[i]==1||a[i]-b[i]==-2) result--;
}
if(result>0) printf("A");
if(result<0) printf("B");
if(result==0) printf("Tie");
}
| 65 |
32,106 | int main(){
int n;
scanf("%d",&n);
int sz[200][2];
int i,k;
for(i=0;i<n;i++){
for(k=0;k<2;k++){
scanf("%d",&sz[i][k]);
}
}
int 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=A+1;
}
else if(sz[i][0]==sz[i][1]){
B=B;
}
else{
B++;
}
}
if(A>B){
printf("A");
}
else if(A==B){
printf("Tie");
}
else{
printf("B");
}
return 0;
}
| 65 |
32,107 | int main() {
int n;
scanf("%d",&n);
int sz[n][2];
int i;
for(i=0;i<n;i++) {
scanf("%d %d",&(sz[i][0]),&(sz[i][1]));
}
int A=0,B=0,k;
for(i=0;i<n;i++) {
k=sz[i][0]-sz[i][1];
if(k==-1||k==2) {
A++;
}
if(k==1||k==-2) {
B++;
}
}
if(A>B) {
printf("A");
}
if(A<B) {
printf("B");
}
if(A==B) {
printf("Tie");
}
return 0;
} | 65 |
32,108 | int main()
{
int a=0,b=0,c=0,m,n,i,p;
scanf("%d",&p);
for (i=1;i<=p;i++)
{
scanf("%d%d",&m,&n);
if(m==n){c++;}else
{
if((n==m+1)||((n==0)&&(m==2))){a++;}else
{
b++;
}
}
}
if(a==b){printf("Tie");}else
{
if(a>b){printf("A");}else
{printf("B");}
}
return 0;
} | 65 |
32,109 |
main()
{
int a[200], b[200], n, count=0;
scanf("%d", &n);
int i;
for (i=0; i<n; i++)
{
scanf("%d %d", &a[i], &b[i]);
if (a[i]!=b[i])
{
if (a[i]==2)
{
if (b[i]==0)
count ++;
else
count --;
}
if (a[i]==1)
{
if (b[i]==2)
count ++;
else
count --;
}
if (a[i]==0)
{
if (b[i]==1)
count ++;
else
count --;
}
}
}
if (count>0)
printf("A\n");
if (count < 0)
printf("B");
if (count == 0)
printf("Tie");
}
| 65 |
32,110 | int main(){
int n,i,a,b,c=0,d=0;
scanf("%d",&n);
for (i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(a==0&&b==1){c=c+1;}
if(a==1&&b==2){c=c+1;}
if(a==2&&b==0){c=c+1;}
if(a==1&&b==0){d=d+1;}
if(b==1&&a==2){d=d+1;}
if(b==2&&a==0){d=d+1;}}
if(c==d){printf("Tie\n");}
if(c>d){printf("A\n");}
if(c<d){printf("B\n");}
return 0;}
| 65 |
32,111 | int main(){
int n,a,b,i,A,B,T;
A=0;
B=0;
T=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=A++;
else if((a==0&&b==0)||(a==1&&b==1)||(a==2&&b==2))
T=T++;
else if((b==0&&a==1)||(b==1&&a==2)||(b==2&&a==0))
B=B++;
}
if (A>B)
printf("A");
else if(B>A)
printf("B");
else if(A==B)
printf("Tie");
return 0;
} | 65 |
32,112 | int main(){
int n,a[200],b[200],c=0,d=0;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d %d\n",&a[i],&b[i]);}
for(int j=0;j<n;j++){
if((a[j]==0)&&(b[j]==0)){c+=0;d+=0;}
if((a[j]==0)&&(b[j]==1)){c++;}
if((a[j]==0)&&(b[j]==2)){d++;}
if((a[j]==1)&&(b[j]==0)){d++;}
if((a[j]==1)&&(b[j]==1)){c+=0;d+=0;}
if((a[j]==1)&&(b[j]==2)){c++;}
if((a[j]==2)&&(b[j]==0)){c++;}
if((a[j]==2)&&(b[j]==1)){d++;}
if((a[j]==2)&&(b[j]==2)){c+=0;d+=0;}
}
if(c<d){printf("B");}
if(c==d){printf("Tie");}
if(c>d){printf("A");}
return 0;
}
| 65 |
32,113 | int main(){
int n,a,b,A=0,B=0,tile=0,i;
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)))
tile+=1;
else if (((a==0)&&(b==1))||((a==1)&&(b==2))||((a==2)&&(b==0)))
A+=1;
else B+=1;
}
if ((A==B)||(tile==n)) printf("Tie");
else if (A>B) printf("A");
else printf("B");
return 0;
} | 65 |
32,114 | int main()
{
int n,a[200],b[200],i,A=0,B=0;
scanf("%d\n",&n);
for(i=0;i<n;i++)
scanf("%d %d\n",&a[i],&b[i]);
for(i=0;i<n;i++)
{
if(a[i]-b[i]==-1||a[i]-b[i]==2)
A++;
else{
if(a[i]-b[i]==0);
else
B++;
}
}
if(A<B)
printf("B");
else{
if(A>B)
printf("A");
else
printf("Tie");
}
return 0;
}
| 65 |
32,115 | int main (){
int a[10000],b[10000];
int n;
int x,y;
x=0;
y=0;
scanf("%d",&n);
for (int i=0;i<n;i++){
scanf("%d %d\n",&a[i],&b[i]);
}
for (int i=0;i<n;i++){
if(a[i]==0){
if (b[i]==0){x=x;y=y;}
if (b[i]==1){x++;}
if (b[i]==2){y++;}
}
if(a[i]==1){
if (b[i]==1){x=x;y=y;}
if (b[i]==2){x++;}
if (b[i]==0){y++;}
}
if(a[i]==2){
if (b[i]==2){x=x;y=y;}
if (b[i]==0){x++;}
if (b[i]==1){y++;}
}}
if (x==y){printf("Tie");}
if (x>y) {printf("A");}
if (x<y) {printf("B");}
return 0;
}
| 65 |
32,116 | int main()
{
int n,z=0,k=0;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
int a,b;
scanf("%d%d",&a,&b);
if(a!=b){if(a==0)
{
if(b==1)
{
z++;
}
}
else if(a==1)
{
if(b==2)
{
z++;
}
}
else if(a==2)
{
if(b==0)
{
z++;
}
}
}
else if(a==b)
{
k++;
}
}
if((n-z-k)==z)
{
printf("Tie");
}
else if((n-z-k)<z)
{
printf("A");
}
else if((n-z-k)>z)
{
printf("B");
}
return 0;
}
| 65 |
32,117 | int main(){
int n,sz[200][2],i,j,a=0,b=0;
scanf("%d",&n);
for(i=0;i<n;i++){
for(j=0;j<2;j++){
scanf("%d",&sz[i][j]);
}
}
for(i=0;i<n;i++){
if(sz[i][0]==0&&sz[i][1]==1){
a++;
}
if(sz[i][0]==1&&sz[i][1]==2){
a++;
}
if(sz[i][0]==0&&sz[i][1]==2){
b++;
}
if(sz[i][0]==1&&sz[i][1]==0){
b++;
}
if(sz[i][0]==2&&sz[i][1]==0){
a++;
}
if(sz[i][0]==2&&sz[i][1]==1){
b++;
}
}
if(a==b){
printf("Tie");
}
if(a>b){
printf("A");
}
if(a<b){
printf("B");
}
return 0;
} | 65 |
32,118 | int main(){
int a[400];
int i,j,n,m,s,p,q;
scanf("%d",&n);
m=2*n;
p=n/2;
for(i=0;i<m;i++)
{
scanf("%d",&(a[i]));
}
s=0;
q=0;
for(j=0;j<m;j=j+2)
{
if(a[j]==1&&a[j+1]==2)
s=s+1;
else if(a[j]==0&&a[j+1]==1)
s=s+1;
else if(a[j]==2&&a[j+1]==0)
s=s+1;
else if(a[j]==2&&a[j+1]==1)
q=q+1;
else if(a[j]==1&&a[j+1]==0)
q=q+1;
else if(a[j]==0&&a[j+1]==2)
q=q+1;
}
if (s==q)
printf("Tie");
else if(s>q)
printf("A");
else if(s<q)
printf("B");
return 0;
} | 65 |
32,119 | int main(){
int n;
int x,y;
x=0;y=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]-b[i]==-1||a[i]-b[i]==2){x++;}
else if(a[i]==b[i]){x=x;}
else{y++;}
}
if(x>y){printf("A");return 0;}
if(x<y){printf("B");}
else{printf("Tie");
}return 0;
} | 65 |
32,120 | main()
{
int i,j,k,n,sa=0,sb=0,a,b;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&a,&b);
if(a-b==-1 || a-b==2)sa++;
else if(a==b) {}
else sb++;
}
if(sa>sb)printf("A\n");
else if(sa==sb)printf("Tie\n");
else printf("B\n");
} | 65 |
32,121 | int main()
{
int n,ta=0,tb=0,i,a,b;
scanf("%d",&n);
for (i=1;i<=n;i++)
{
scanf("%d%d",&a,&b);
if (a==b) continue;
if (a==1)
if (b==2) ta++;
else tb++;
else if (a==2)
if (b==1) tb++;
else ta++;
else if (a==0)
if (b==1) ta++;
else tb++;
}
if (ta>tb) printf("A\n");
else if (ta<tb) printf("B\n");
else printf("Tie\n");
} | 65 |
32,122 | int main(){
int n,a=0,b=0,i=0,A1,B1;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&A1,&B1);
if(A1==B1){
a=a;
b=b;
}else if(A1!=B1){
if(((A1==0)&&(B1==1))||((A1==1)&&(B1==2))||((A1==2)&&(B1==0))){
a++;
}else{
b++;
}
}
}
if(a==b){
printf("Tie");
}else if(a>b){
printf("A");
}else if(b>a){
printf("B");
}
return 0;
} | 65 |
32,123 | int main(){
int n,i,c;
c=0;
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)){c=c+1;}
else if(a[i]==b[i]){c=c;}
else if((a[i]==0&&b[i]==2)||(a[i]==1&&b[i]==0)||(a[i]==2&&b[i]==1)){c=c-1;}}
if(c>0){printf("A");}
else if(c==0){printf("Tie");}
else if(c<0){printf("B");}
return 0;
}
| 65 |
32,124 | int main(){
int n,i;
int c=0;
int a[200],b[200];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if((a[i]-b[i])==(-1)||(a[i]-b[i])==2){
c++;}else if(a[i]==b[i]){
c=c;}else{c--;}
}
if(c>0){printf("A");}
else if(c<0){printf("B");}
else{printf("Tie");}
return 0;
}
| 65 |
32,125 | int main (){
int n;
int i;
int a=0,b=0;
scanf("%d",&n);
int sz[100][2];
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]){
continue;
}
else 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++;
}
else{
b++;
}
}
if(a>b){
printf("A");
}
else if(b>a){
printf("B");
}
else if(b=a){
printf("Tie");
}
return 0;
} | 65 |
32,126 | int main(){
int n,c=0,d=0,i,m;
scanf("%d",&n);
m=n;
int a[200],b[200];
double e;
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]==0&&b[i]==1)
c++;
else if(a[i]==1&&b[i]==2)
c++;
else if(a[i]==2&&b[i]==0)
c++;
else if(a[i]==b[i])
m--;
}
e=(double)m;
e=e/2;
if(c<e)
printf("B");
else if(c>e)
printf("A");
else if(c==e)
printf("Tie");
return 0;
} | 65 |
32,127 | int main(){
int n,i,s1[200],s2[200],a=0,b=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&s1[i],&s2[i]);
if((s1[i]-s2[i])==1)b++;
else if((s2[i]-s1[i])==1)a++;
else if(s2[i]>s1[i])b++;
else if(s2[i]<s1[i])a++;
}
if(a<b)printf("B");
else if(a==b)printf("Tie");
else if(a>b)printf("A");
return 0;
}
| 65 |
32,128 | int main()
{
int i,j,n,s=0,m=0;
int b[201];
int a[201][201];
scanf("%d",&n);
for(i=0;i<n;i++){
for(j=0;j<2;j++){
scanf("%d",&a[i][j]); } }
for(j=0;j<2;j++){
for(i=0;i<n;i++){
b[i]=a[i][0];}
for(i=0;i<n;i++){
if(a[i][1]==b[i]){
continue;} else if((a[i][1]==0&&b[i]==1)||(a[i][1]==1&&b[i]==2)||(a[i][1]==2&&b[i]==0)){
s++;} else{m++;}}
if(s==m){
printf("Tie");}
else if(s>m)
{printf("B");}
else{
printf("A");}
return 0;}}
| 65 |
32,129 | int main(){
int n,i,a=0,b=0;
scanf("%d",&n);
int A[200][200];
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){
if(A[i][1]==1){
a++;
}
if(A[i][1]==2){
b++;
}
}
if(A[i][0]==1){
if(A[i][1]==0){
b++;
}
if(A[i][1]==2){
a++;
}
}
if(A[i][0]==2){
if(A[i][1]==0){
a++;
}
if(A[i][1]==1){
b++;
}
}
}
if(a>b){
printf("A");
}
if(a<b){
printf("B");
}
if(a==b){
printf("Tie");
}
return 0;
} | 65 |
32,130 | int main(){
int n,a,b,x=0,y=0;
scanf("%d\n",&n);
for(int i=0;i<n;i++){
scanf("%d",&a);
scanf("%d",&b);
if(a==0&&b==0){
x=x;
}if(a==0&&b==1){
x++;
}if(a==0&&b==2){
y++;
}if(a==1&&b==0){
y++;
}if(a==1&&b==1){
x=x;
}if(a==1&&b==2){
x++;
}if(a==2&&b==0){
x++;
}if(a==2&&b==1){
y++;
}if(a==2&&b==2){
x=x;
}
}
if(x>y){
printf("A");
}
if(x<y){
printf("B");
}
if(x==y){
printf("Tie");
}
return 0;
}
| 65 |
32,131 | int main(){
int n,a,b,i,c,d,e;
scanf("%d",&n);
d=0;
e=0;
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
c=a-b;
if(c==-1||c==2){
d++;
}else{if(c!=0){
e++;}
}
}if(d>e){
printf("A");
}else{
if(d<e){
printf("B");
}else{
printf("Tie");
}
}
return 0;
}
| 65 |
32,132 | int main(){
int a,b;
int n,c=0;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(a==b){c=c;}
else if(a-b==1){c=c-1;}
else if(b-a==1){c+=1;}
else if(a-b==2){c+=1;}
else if(b-a==2){c=c-1;}
}
if(c>0){printf("A");}
else if(c<0){printf("B");}
else{printf("Tie");}
return 0;
}
| 65 |
32,133 | int main(){
int n,a,b,x=0,y=0,i;
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)){
x=x+1;}else if((b==0&&a==1)||(b==1&&a==2)||(b==2&&a==0)){
y=y+1;}else if(a==b){x=x,y=y;}
}
if(x==y){
printf("Tie");}else if(x>y){
printf("A");}else if(x<y){
printf("B");}
return 0;
} | 65 |
32,134 |
const int M = 200;
int main(int argc, char *argv[])
{
int n;
scanf("%d",&n);
int a[M],b[M];
int an,bn;
an =0;
bn =0;
for(int i = 0; i < n;i++)
{
scanf("%d %d",&a[i],&b[i]);
if(a[i]== 0 && b[i]==1)
an++;
if(a[i]==0 && b[i] == 2)
bn++;
if(a[i]==1 && b[i] == 0)
bn++;
if(a[i]==1 && b[i] == 2)
an++;
if(a[i]==2 && b[i] == 0)
an++;
if(a[i]==2 && b[i] == 1)
bn++;
}
if(an>bn)
printf("A");
if(an<bn)
printf("B");
if(an==bn)
printf("Tie");
return 1;
}
| 65 |
32,135 | int main(){
int n;
int i,j;
int p,q;
p=0;
q=0;
int a[200],b[200];
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d%d",&a[i-1],&b[i-1]);
if(a[i-1]==0&&b[i-1]==1)
{p++;}
if(a[i-1]==1&&b[i-1]==2)
{p++;}
if(a[i-1]==2&&b[i-1]==0)
{p++;}
if(a[i-1]==1&&b[i-1]==0)
{q++;}
if(a[i-1]==2&&b[i-1]==1)
{q++;}
if(a[i-1]==0&&b[i-1]==2)
{q++;}
}
if(p>q){printf("A");}
if(p<q){printf("B");}
if(p==q){printf("Tie");}
return 0;
} | 65 |
32,136 | int main()
{
int n,i=0,a,b,c,j=0,k=0;
scanf("%d",&n);
while(i<n){
scanf("%d%d",&a,&b);
c=a-b;
if(c==-1||c==2){
j++;
}else if(c==1||c==-2){
k++;
}
i++;
}
if(j>k){
printf("A");
}else if(j<k){
printf("B");
}else{
printf("Tie");
}
return 0;
} | 65 |
32,137 | int main(){
int n;
scanf("%d",&n);
int a[200],b[200];
int i,t=0,h=0;
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]==b[i]){
t=t+0;
h=h+0;
continue;
}
if((a[i]==0 && b[i]==1) || (a[i]==1 && b[i]==2) ||(a[i]==2 && b[i]==0)){
t++;
continue;
}else{
h++;
continue;
}
}
if(t>h)printf("A");
if(t<h)printf("B");
if(t==h)printf("Tie");
return 0;
} | 65 |
32,138 | int main(){
int a[201],b[201],i,n,j=0,k=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]&&b[i]-a[i]!=2)||a[i]-b[i]==2){
j++;}
if((a[i]>b[i]&&a[i]-b[i]!=2)||b[i]-a[i]==2){
k++;}
}
if(j>k){
printf("A");}
if(j<k){
printf("B");}
if(j==k){
printf("Tie");}
return 0;
} | 65 |
32,139 | int main()
{
int a[200],b[200];
int i,c=0,d=0,n;
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)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0)){
c=c+1;}
if((a[i]==0&&b[i]==2)||(a[i]==1&&b[i]==0)||(a[i]==2&&b[i]==1)){
d=d+1;}
}
if(c>d){
printf("A");}
if(c==d){
printf("Tie");}
if(c<d){
printf("B");}
return 0;
} | 65 |
32,140 | int main()
{
int n,i,j,s;
int a[200][3];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&(a[i][0]),&(a[i][1]));
}
j=0;s=0;
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))
j++;
if((a[i][1]==0&&a[i][0]==1)||(a[i][1]==1&&a[i][0]==2)||(a[i][1]==2&&a[i][0]==0))
s++;
}
if(j<s)
printf("B");
if(j>s)
printf("A");
if(j==s)
printf("Tie");
return 0;
}
| 65 |
32,141 | int main(){
int as=0,bs=0,n,a[200],b[200],i,j;
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]){as++;bs++;}
else{if(a[i]==1&&b[i]==0){bs++;}
else{if(a[i]==1&&b[i]==2){as++;}
else{if(a[i]==0&&b[i]==1){as++;}
else{if(a[i]==0&&b[i]==2){bs++;}
else{if(a[i]==2&&b[i]==0){as++;}
else{if(a[i]==2&&b[i]==1){bs++;}}}}}}}
}
if(as==bs){printf("Tie");}
else{if(as>bs){printf("A");}
else{printf("B");}}
return 0;
}
| 65 |
32,142 | int main(){
int t=0,s=0,m=0,a[MAX],b[MAX],i,j,n;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
}
for(j=0;j<n;j++){
if(a[j]==1&&b[j]==0)
s++;
else if(a[j]==1&&b[j]==2)
t++;
else if(a[j]==1&&b[j]==1)
m++;
else if(a[j]==0&&b[j]==1)
t++;
else if(a[j]==0&&b[j]==2)
s++;
else if(a[j]==0&&b[j]==0)
m++;
else if(a[j]==2&&b[j]==0)
t++;
else if(a[j]==2&&b[j]==1)
s++;
else if(a[j]==2&&b[j]==2)
m++;
}
if(t>s)
printf("A");
else if(s>t)
printf("B");
else
printf("Tie");
return 0;
}
| 65 |
32,143 | int main()
{
int sz[100][2];
int a=0,b=0;
int n,i,j;
scanf("%d",&n);
for(i=0;i<n;i++)
{
for(j=0;j<2;j++)
{
scanf("%d",&sz[i][j]);
}
}
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++;
else 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");
else if(a<b)
printf("B");
else
printf("Tie");
return 0;
} | 65 |
32,144 | int main(){
int n,i,a[200],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]==0){
t++;
}else if(b[i]==2){
s++;
}
}
else if(a[i]==2){
if(b[i]==0){
s++;
}else if(b[i]==1){
t++;
}
}
}
if(s>t){
printf("A");
}
else if(s<t){
printf("B");
}
else if(s=t){
printf("Tie");
}
return 0;
} | 65 |
32,145 | int main()
{
int n,x,y;
int a[201];
int b[201];
a[201]=0;
b[201]=0;
x=0;
y=0;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%d%d",&a[i],&b[i]);
if(a[i]+1==b[i]||a[i]-2==b[i])
x++;
else if(a[i]!=b[i])
y++;}
if(x>y)
printf("A");
else if(x<y)
printf("B");
else printf("Tie");
return 0;
}
| 65 |
32,146 | int main() {
int k,a[200],b[200],m=0,n=0,i;
scanf("%d",&k);
for(i=0;i<k;i++){
scanf("%d%d",&(a[i]),&(b[i]));
if(a[i]==0&&b[i]==1){
m++;
}else if(a[i]==0&&b[i]==2){
n++;
}else if(a[i]==1&&b[i]==0){
n++;
}else if(a[i]==1&&b[i]==2){
m++;
}else if(a[i]==2&&b[i]==1){
n++;
}else if(a[i]==2&&b[i]==0){
m++;
}
}
if(m==n){
printf("Tie");
}else if(m>n){
printf("A");
}else if(m<n){
printf("B");
}
return 0;
}
| 65 |
32,147 | int main()
{
int i,n,res=0;
int a[1000],b[1000],c[1000];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d%d",&a[i],&b[i]);
c[i]=a[i]-b[i];
}
for(i=0;i<n;i++)
{
if(c[i]==-1||c[i]==2)
res++;
if(c[i]==0)
res+=0;
if(c[i]==1||c[i]==-2)
res--;
}
if(res>0)printf("A\n");
if(res<0)printf("B\n");
if(res==0)printf("Tie\n");
return 0;
} | 65 |
32,148 | main()
{
int n,i,a[201],b[201],c=0,d=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]==-1||a[i]-b[i]==2)
c++;
else
{
if(a[i]!=b[i])
d++;
}
}
if(c>d)
printf("A");
else
{
if(c==d)
printf("Tie");
else
printf("B");
}
}
| 65 |
32,149 | int main(){
int n,a,b,i,m=0,p=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d%d",&a,&b);
if(a==0){
if(b==1)
m++;
if(b==2)
p++;
if(b==0){
m++;
p++;
}
}
if(a==1){
if(b==0)
p++;
if(b==2)
m++;
if(b==1){
m++;
p++;
}
}
if(a==2){
if(b==0)
m++;
if(b==1)
p++;
if(b==2){
m++;
p++;
}
}
}
if(m>p)
printf("A");
else if(m<p)
printf("B");
else
printf("Tie");
return 0;
}
| 65 |
32,150 | int main(){
int i,a=0,b=0,n,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]==B[i]){
a++;
b++;
}else if((A[i]-B[i]==-1)||(A[i]-B[i]==2)){
a++;
}else{
b++;
}
}
if(a>b){
printf("A");
}else if(a<b){
printf("B");
}else{
printf("Tie");
}
return 0;
} | 65 |
32,151 | int main(){
int i,a=0,A,b=0,B,n;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&A,&B);
if(A==B){
continue;
}
if((A==0&&B==1)||(A==1&&B==2)||(A==2&&B==0)){
a++;
}
if((B==0&&A==1)||(B==1&&A==2)||(B==2&&A==0)){
b++;
}
}
if(a==b){
puts("Tie");
}
if(a>b){
puts("A");
}
if(a<b){
puts("B");
}
return 0;
} | 65 |
32,152 | int main()
{
int n,i,A=0,B=0;
scanf("%d",&n);
int a[n],b[n];
for(i=0;i<n;i++)
{scanf("%d%d",&a[i],&b[i]);
if((3+a[i]-b[i])%3==2)
A++;
if((3+a[i]-b[i])%3==1)
B++;
}
if(A>B)
printf("A");
else if(B>A)
printf("B");
else
printf("Tie");
}
| 65 |
32,153 |
int main(){
int n,i,a,b,x=0,y=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
if(a==0&&b==1){
x++;
}else if(a==1&&b==2){
x++;
}else if(a==2&&b==0){
x++;
}else if(a==b){
x+=0;
}else{
y++;
}
}
if(x>y){
printf("A");
}else if(x==y){
printf("Tie");
}else{
printf("B");
}
return 0;
} | 65 |
32,154 | int main(){
int n,i,a,b,A,B;
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((a==1&&b==0)||(a==2&&b==1)||(a==0&&b==2)){
B++;
}
}
if(A==B){
printf("Tie");
}else if(A>B){
printf("A");
}else if(A<B){
printf("B");
}
return 0;
} | 65 |
32,155 | int main(){
int n,i;
int game[201][2]={0};
int a=0,b=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&game[i][0],&game[i][1]);
}
for(i=0;i<n;i++){
if(game[i][0]==game[i][1]){
continue;}
else if(game[i][0]==0&&game[i][1]==1){
a++;
continue;
}
else if(game[i][0]==0&&game[i][1]==2){
b++;
continue;
}
else if(game[i][0]==1&&game[i][1]==0){
b++;
continue;
}
else if(game[i][0]==1&&game[i][1]==2){
a++;
continue;
}
else if(game[i][0]==2&&game[i][1]==0){
a++;
continue;
}
else if(game[i][0]==2&&game[i][1]==1){
b++;
continue;
}
}
if(a==b){
printf("Tie");
}
else if(a>b){
printf("A");
}
else{
printf("B");
}
return 0;
} | 65 |
32,156 | int main()
{
int a[1000],b[1000];
int n,i,z=0,x=0;
scanf ("%d",&n);
for(i=0;i<=n-1;i=i+1){
scanf ("%d%d",&a[i],&b[i]);
}
for(i=0;i<=n-1;i=i+1){
if(a[i]==0&&b[i]==1)
z=z+1;
else if(a[i]==0&&b[i]==2)
x=x+1;
else if(a[i]==1&&b[i]==0)
x=x+1;
else if(a[i]==1&&b[i]==2)
z=z+1;
else if(a[i]==2&&b[i]==0)
z=z+1;
else if(a[i]==2&&b[i]==1)
x=x+1;
else if(a[i]==b[i])
z=z+0;
x=x+0;
}
if(z>x)
printf("A");
if(z<x)
printf("B");
if(z==x)
printf("Tie");
return 0;
} | 65 |
32,157 | int main(){
int n,a[200],b[200],sa=0,sb=0,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]==b[i]+1){sb++;}
else if(b[i]==a[i]+1){sa++;}
else if(a[i]==0&&b[i]==2){sb++;}
else if(a[i]==2&&b[i]==0){sa++;}
}
if(sa==sb){printf("Tie");}
else if(sa>sb){printf("A");}
else{printf("B");}
return 0;
} | 65 |
32,158 | int main() {
int n,i,a=0,b=0;
int A[201];
int 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]==0&&B[i]==1){
a+=1;
}else if(A[i]==0&&B[i]==2){
b+=1;
}else if(A[i]==1&&B[i]==0){
b+=1;
}else if(A[i]==1&&B[i]==2){
a+=1;
}else if(A[i]==2&&B[i]==0){
a+=1;
}else if(A[i]==2&&B[i]==1){
b+=1;
}else{
a=a;
b=b;
}
}
if(a<b){
printf("B");
}else if(a>b){
printf("A");
}else{
printf("Tie");
}
return 0;
}
| 65 |
32,159 | int main ()
{
int sz1[200],sz2[200];
int n;
int i,s1=0,s2=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&(sz1[i]),&(sz2[i]));
}
for(i=0;i<n;i++)
{
if((sz1[i]==0&&sz2[i]==1)||(sz1[i]==1&&sz2[i]==2)||(sz1[i]==2&&sz2[i]==0))
{
s1+=1;
}
if((sz1[i]==1&&sz2[i]==0)||(sz1[i]==2&&sz2[i]==1)||(sz1[i]==0&&sz2[i]==2))
{
s2+=1;
}
}
if(s1>s2)
{
printf("A");
}
if(s1<s2)
{
printf("B");
}
if(s1==s2)
{
printf("Tie");
}
return 0;
}
| 65 |
32,160 | main()
{
int n,i;
scanf("%d",&n);
int m1=0,m2=0;
for(i=0;i<n;i++)
{
int a,b;
scanf("%d %d",&a,&b);
if ((a==0&&b==0)||(a==1&&b==1)||(a==2&&b==2))
{m1+=1;m2+=1;}
if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0)) m1+=2;
if((a==1&&b==0)||(a==0&&b==2)||(a==2&&b==1)) m2+=2;
}
if(m1==m2) printf("Tie");
else if(m1>m2) printf("A");
else printf("B");
} | 65 |
32,161 | int main()
{
int n,a[200],b[200],c=0,d=0;
scanf("%d",&n);
int i=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){
c=c+1;
}
else if(a[i]==0&&b[i]==2){
d=d+1;
}
else if(a[i]==1&&b[i]==0){
d=d+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(a[i]==2&&b[i]==1){
d=d+1;
}
}
if(c<d){
printf("B");
}
else if(c>d){
printf("A");
}
else {
printf("Tie");
}
return 0;
}
| 65 |
32,162 | int main(){
int n,p[2],s=0,q;
double j;
scanf("%d",&n);
q=n;
for(int i=0;i<n;i++){
scanf("%d%d",&p[0],&p[1]);
if((p[0]==0&&p[1]==1)||(p[0]==1&&p[1]==2)||(p[0]==2&&p[1]==0)){
s++;
}else if(p[0]==p[1]){q--;}
}
j=(1.0*q)/(2*1.0);
if(s>j){printf("A");}
else if(s<j){printf("B");}
else{printf("Tie");}
return 0;
} | 65 |
32,163 | int main()
{
int n,a[200],b[200],i,c=0,d=0;
scanf("%d\n",&n);
for(i=0;i<n;i++){
scanf("%d %d\n",&a[i],&b[i]);
}
for(i=0;i<n;i++){
if(a[i]!=b[i]){if(a[i]==0){
if(b[i]==1){
c++;
}
else if(b[i]==2){
d++;
}
}
else if(a[i]==1){
if(b[i]==0){
d++;
}
else if(b[i]==2){
c++;
}
}
else if(a[i]==2){
if(b[i]==0){
c++;
}
else if(b[i]==1){
d++;
}
}}
else if(a[i]==b[i]){
c=c;
d=d;
}
}
if(c>d){
printf("A");
}
else if(c<d){
printf("B");
}
else if(c==d){
printf("Tie");
}
return 0;
} | 65 |
32,164 | int main()
{
int n, a = 0, b = 0;
scanf("%d", &n);
for (int i = 1; i <= n; i++)
{
int x, y;
scanf("%d %d", &x, &y);
if (x == y)
continue;
else
{
if (x == 0)
{
if (y == 1)
a++;
else
b++;
}
else if (x == 1)
{
if (y == 2)
a++;
else
b++;
}
else
{
if (y == 0)
a++;
else
b++;
}
}
}
if (a == b)
printf("Tie");
else if (a > b)
printf("A");
else
printf("B");
return 0;
}
| 65 |
32,165 | int main()
{
int a[210],b[210];
int n,sum=0,i;
scanf("%d\n",&n);
for(i=0;i<n;i++)
{
scanf("%d %d\n",&a[i],&b[i]);
if(a[i]==b[i])
continue;
if((a[i]==0)&&(b[i]==1))
sum++;
if((a[i]==1)&&(b[i]==2))
sum++;
if((a[i]==2)&&(b[i]==0))
sum++;
if((a[i]==1)&&(b[i]==0))
sum--;
if((a[i]==2)&&(b[i]==1))
sum--;
if((a[i]==0)&&(b[i]==2))
sum--;
}
if(sum>0)
printf("A\n");
if(sum==0)
printf("Tie\n");
if(sum<0)
printf("B\n");
} | 65 |
32,166 | int main(){
int n=0,A=0,B=0;
int a[200]={0},b[200]={0};
int i=0,j=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&a[i]);
scanf("%d",&b[i]);
}
for(j=0;j<n;j++){
if((a[j]==0&&b[j]==1)||(a[j]==1&&b[j]==2)||(a[j]==2&&b[j]==0)){
A++;
}else if((b[j]==0&&a[j]==1)||(b[j]==1&&a[j]==2)||(b[j]==2&&a[j]==0)){
B++;
}
}
if(A>B){
printf("%c",'A');
}else if(A<B){
printf("%c",'B');
}else{
printf("%c%c%c",'T','i','e');
}
return 0;
} | 65 |
32,167 | int main()
{
int n,i,g,j;
int a[200],b[200];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
}
g=0;
for(j=0;j<n;j++){
if((a[j]-b[j]==-1)||(a[j]-b[j]==2)){
g+=1;
}
else{
if(a[j]-b[j]==0){
g=g;
}
else{g+=-1;}
}
}
if(g>0){
printf("A");
}
if(g==0){
printf("Tie");
}
if(g<0){
printf("B");
}
return 0;
} | 65 |
32,168 | int main(){
int n;
scanf("%d",&n);
int i;
int A,B;
int Aw=0,Bw=0;
for(i=0;i<n;i++){
scanf("%d %d",&A,&B);
if(A==0&&B==1){
Aw += 1;
}else if(A==0&&B==2){
Bw +=1;
}else if(A==1&&B==0){
Bw +=1;
}else if(A==1&&B==2){
Aw +=1;
}else if(A==2&&B==0){
Aw +=1;
}else if(A==2&&B==1){
Bw +=1;
}
}
if(Aw>Bw){
printf("A\n");
}else if(Aw<Bw){
printf("B\n");
}else if(Aw=Bw){
printf("Tie\n");
}
return 0;
} | 65 |
32,169 |
int main()
{
int n,k,a,b,i,j;
int x[201];
int y[201];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&(x[i]));
scanf("%d",&(y[i]));
}
a=b=0;
for(i=0;i<n;i++)
{
if(x[i]==1)
{
if(y[i]==0) b=b+1;
if(y[i]==2) a=a+1;
}
if(x[i]==2)
{
if(y[i]==0) a=a+1;
if(y[i]==1) b=b+1;
}
if(x[i]==0)
{
if(y[i]==1) a=a+1;
if(y[i]==2) b=b+1;
}
}
if(a>b) printf("A");
else
{
if(a<b) printf("B");
else printf("Tie");
}
return 0;
} | 65 |
32,170 |
main()
{
int n,i,j, c,d;
int a=0,b=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d%d",&c,&d);
if(c==0&&d==1)a++;
if(c==0&&d==2)b++;
if(c==1)
{if(d==0)b++;
else if(d==2)a++;
}
else if(c==2)
{if(d==0)a++;
if(d==1)b++;}
}
if(a>b)printf("A");
else if(a<b)printf("B");
else printf("Tie");
}
| 65 |
32,171 | int main(){
int n,i,b=0,a=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]==0&&B[i]==1)||(A[i]==1&&B[i]==2)||(A[i]==2&&B[i]==0)){
a++;
}
}
for(i=0;i<n;i++){
if((A[i]==0&&B[i]==2)||(A[i]==1&&B[i]==0)||(A[i]==2&&B[i]==1)){
b++;
}
}
if(a>b){
printf("A");
}else if(a==b){
printf("Tie");
}else if(a<b){
printf("B");
}
return 0;
}
| 65 |
32,172 | int main (){
int A,B,Tie,n,i,a,b,r=0,m=0,k=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))
r++;
if(a==b)
m++;
if((b==0&&a==1)||(b==1&&a==2)||(b==2&&a==0))
k++;
}if(r>k)
printf("A");
else if(k>r){
printf("B");}
else {printf("Tie");}
return 0;
}
| 65 |
32,173 | main()
{
int n;
scanf("%d",&n);
int A=0,B=0,c=0;
for(int i=0;i<n;i++)
{
int a,b;
scanf("%d %d",&a,&b);
if(a==b)
c++;
else if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0))
A++;
else
B++;
}
if(A>B)
printf("A\n");
else if(A<B)
printf("B\n");
else
printf("Tie\n");
}
| 65 |
32,174 |
main()
{ int a[200],b[200];
int s=0;
int n;
scanf("%d",&n);
for(int i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);
if(a[i]==b[i]){s=s;}
if(a[i]==0&&b[i]==1){s++;}
if(a[i]==0&&b[i]==2){s--;}
if(a[i]==1&&b[i]==2){s++;}
if(a[i]==1&&b[i]==0){s--;}
if(a[i]==2&&b[i]==0){s++;}
if(a[i]==2&&b[i]==1){s--;}}
if(s>0){printf("A");}
if(s==0){printf("Tie");}
if(s<0){printf("B");}
}
| 65 |
32,175 | int main()
{
int n,a[200],b[200],i,tempa=0,tempb=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&&b[i]==1)
tempa++;
else if(a[i]==1&&b[i]==2)
tempa++;
else if(a[i]==2&&b[i]==0)
tempa++;
else if(a[i]==b[i])
{
tempa++;
tempb++;
}
else tempb++;
}
if(tempa>tempb)
printf("A");
if(tempa<tempb)
printf("B");
if(tempa==tempb)
printf("Tie");
return 0;
} | 65 |
32,176 | int main() {
int n,i,j,sz[199][2];
scanf("%d\n",&n);
for(i=0;i<n;i++){
scanf("%d %d\n",&(sz[i][0]), &(sz[i][1]));
}
j=0;
for(i=0;i<n;i++){
if(sz[i][1]-sz[i][0]==1||sz[i][0]-sz[i][1]==2){
j++;
}
if(sz[i][1]-sz[i][0]==-1||sz[i][0]-sz[i][1]==-2){
j--;
}
}
if(j>0){
printf("A");
}
if(j==0){
printf("Tie");
}
if(j<0){
printf("B");
}
return 0;
} | 65 |
32,177 | int main(){
int n,i,a=0,b=0;
int ai[200],bi[200];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&ai[i],&bi[i]);
}
for(i=0;i<n;i++){
if((bi[i]-ai[i]==1)||(ai[i]-bi[i]==2)){
a++;
}else if(ai[i]==bi[i]){
a=a+0;
}else{
b++;
}
}
if(a>b){
printf("A");
}else if(a<b){
printf("B");
}else{
printf("Tie");
}
return 0;
} | 65 |
32,178 | int main(){
int a[300],b[300],n,i,k=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&&b[i]==1)
k++;
if(a[i]==0&&b[i]==2)
k--;
if(a[i]==1&&b[i]==2)
k++;
if(a[i]==1&&b[i]==0)
k--;
if(a[i]==2&&b[i]==0)
k++;
if(a[i]==2&&b[i]==1)
k--;
}
if(k>0)
printf("A");
else if(k<0)
printf("B");
else
printf("Tie");
return 0;
}
| 65 |
32,179 | int main(){
int n,a[200],b[200],i,k=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]!=2&&b[i]-a[i]==1){
k++;
}else if(a[i]==2&&b[i]==0){
k++;
}else if(b[i]!=2&&a[i]-b[i]==1){
k--;
}else if(b[i]==2&&a[i]==0){
k--;
}else if(a[i]==b[i]){
k=k;
}
}
if(k==0){
printf("Tie");
}else if(k<0){
printf("B");
}else{
printf("A");
}
return 0;
}
| 65 |
32,180 | int main(){
int n,a,b,aa,bb;
cin>>n;
aa=0;
bb=0;
for (int i=0;i<n;i++) {
cin>>a>>b;
if (a-b==-1||a-b==2) aa++;
if (a-b==1||a-b==-2) bb++;
if (a==b) {a+=0;b+=0;}
}
if (aa>bb) cout<<"A";
if (aa<bb) cout<<"B";
if (aa==bb) cout<<"Tie";
return 0;
}
| 65 |
32,181 | int main(){
int n,i,a,b,k=0;
char s[8];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&a,&b);
if(a==0)
{
if(b==1)
{
k++;
}
if(b==2)
{
k--;
}
}
if(a==1)
{
if(b==0)
{
k--;
}
if(b==2)
{
k++;
}
}
if(a==2)
{
if(b==0)
{
k++;
}
if(b==1)
{
k--;
}
}
}
if(k>0)
{
printf("A");
}
else if(k==0)
{
printf("Tie");
}
else if(k<0)
{
printf("B");
}
return 0;
} | 65 |
32,182 | int main(){
int a,b,i,n,t=0,m=0,p=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
if(a==0&&b==0)
p++;
if(a==0&&b==1)
t++;
if(a==0&&b==2)
m++;
if(a==1&&b==0)
m++;
if(a==1&&b==1)
p++;
if(a==1&&b==2)
t++;
if(a==2&&b==0)
t++;
if(a==2&&b==1)
m++;
if(a==2&&b==2)
p++;}
if(t>m)
printf("A");
else if(t<m)
printf("B");
else if(t==m||p==n)
printf("Tie");
return 0;} | 65 |
32,183 | int main (){
int n;
scanf("%d\n",&n);
int sz[n][2];
for(int i=0;i<n;i++){
for(int j=0;j<2;j++){
scanf("%d",&sz[i][j]);
}
}
int sum1=0;
int sum2=0;
for(int i=0;i<n;i++){
if(sz[i][0]-sz[i][1]==-1||sz[i][0]-sz[i][1]==2){
sum1++;
}
else if(sz[i][0]-sz[i][1]==1||sz[i][0]-sz[i][1]==-2){
sum2++;
}
}
if(sum1>sum2){
printf("A");
}
else if(sum1<sum2){
printf("B");}
else {
printf("Tie");
}
return 0;
}
| 65 |
32,184 | int main(){
int a,b,x,y,z=0;
scanf("%d",&x);
for(y=0;y<x;y++){
scanf("%d %d",&a,&b);
if(a==0&&b==1)z=z+1;
if(a==1&&b==2)z=z+1;
if(a==2&&b==0)z=z+1;
if(b==0&&a==1)z=z-1;
if(b==1&&a==2)z=z-1;
if(b==2&&a==0)z=z-1;}
if(z>0)printf("A");
if(z<0)printf("B");
if(z==0)printf("Tie");
return 0;
} | 65 |
32,185 | int main()
{
int n,i,k;
int a,b,s=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
if(a==0){
if(b==1){
s=s+1;
}else if(b==2){
s=s-1;
}
}else if(a==1){
if(b==0){
s=s-1;
}else if(b==2){
s=s+1;
}
}else if(a==2){
if(b==0){
s=s+1;
}else if(b==1){
s=s-1;
}
}
}
if(s==0){
printf("Tie");
}else if(s>0){
printf("A");
}else{
printf("B");
}
return 0;
}
| 65 |
32,186 | int main()
{
int a[100],b[100],n,i,s=0,c=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]&&b[i]!=2){
s+=1;}
if(a[i]==2&&b[i]==0){
s+=1;
}
if(b[i]==2&&a[i]==1){
s+=1;
}
if(a[i]>b[i]&&a[i]!=2){
c+=1;
}
if(b[i]==2&&a[i]==0){
c+=1;
}
if(a[i]==2&&b[i]==1){
c+=1;
}
}
if(s>c){
printf("A");
}
if(s<c){
printf("B");
}
if(s==c){
printf("Tie");
}
return 0;
}
| 65 |
32,187 | int main(){
int n,m;
m=0;
int sz[2000][2];
scanf("%d",&n);
for(int i=0;i<n;i++){
for(int a=0;a<2;a++){
scanf("%d",&sz[i][a]);
}
if(sz[i][0]==0&&sz[i][1]==1){m++;}
if(sz[i][0]==sz[i][1]){m=m;}
if(sz[i][0]==0&&sz[i][1]==2){m--;}
if(sz[i][0]==1&&sz[i][1]==0){m--;}
if(sz[i][0]==1&&sz[i][1]==2){m++;}
if(sz[i][0]==2&&sz[i][1]==1){m--;}
if(sz[i][0]==2&&sz[i][1]==0){m++;}
}
if(m==0){printf("Tie");}
else if(m>0){printf("A");}
else if(m<0){printf("B");}
return 0;
}
| 65 |
32,188 | int main(){
int i,n,x,y,w;
int a,b;
a=0;b=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d %d",&x,&y);
w=y-x;
if(w==1){
a++;}else
if(w==2){
b++;}else
if(w==-1){
b++;}else
if(w==-2){
a++;}
}
if(a>b){
printf("A");
}else
if(a<b){
printf("B");
}else {
printf("Tie");
}
return 0;
}
| 65 |
32,189 | int main(){
int n,i,x,y,f=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&x,&y);
if(x-y==1)
f=f-1;
else if(y-x==1)
f=f+1;
else if(x-y==2)
f=f+1;
else if(y-x==2)
f=f-1;
}
if(f>0)
printf("A");
else if(f<0)
printf("B");
else if(f==0)
printf("Tie");
return 0;
} | 65 |
32,190 | int main(){
int n,i,a,b;
int sz[2][200];
scanf ("%d",&n);
for (i=0;i<=n-1;i++){
scanf("%d",&sz[0][i]);
scanf("%d",&sz[1][i]);
}
for (i=0,a=0,b=0;i<=n-1;i++){
if(sz[0][i]!=0&&sz[1][i]!=0&&sz[0][i]!=sz[1][i])
{if(sz[0][i]>sz[1][i]){b=b+1;}
else if(sz[0][i]<sz[1][i]){a=a+1;}
}
else if(sz[0][i]==sz[1][i]){continue;}
else if(sz[0][i]==0&&sz[1][i]==1){a=a+1;}
else if(sz[0][i]==0&&sz[1][i]==2){b=b+1;}
else if(sz[1][i]==0&&sz[0][i]==1){b=b+1;}
else if(sz[1][i]==0&&sz[0][i]==2){a=a+1;}
}
if(a>b){printf("A");}
else if(a<b){printf("B");}
else if(a==b){printf("Tie");}
return 0;
}
| 65 |
32,191 |
main()
{
int n,i,a=0,b=0;
int p[200],q[200];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d%d",&p[i],&q[i]);
if(p[i]!=q[i])
{
if(p[i]==0)
{
if(q[i]==1)
a=a+1;
else
b=b+1;
}
else if(p[i]==1)
{
if(q[i]==0)
b=b+1;
else
a=a+1;
}
else
{
if(q[i]==0)
a=a+1;
else
b=b+1;
}
}
}
if(a>b)
printf("A\n");
else if(a<b)
printf("B\n");
else
printf("Tie");
}
| 65 |
32,192 | int main(){
int n,i;
scanf("%d",&n);
int a[n],b[n];
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
}
int j=0;
for(i=0;i<n;i++){
if(a[i]==b[i]){
j=j;
}else if(b[i]-a[i]==1||a[i]-b[i]==2){
j++;
}else if(a[i]-b[i]==1||b[i]-a[i]==2){
j--;
}
}
if(j>0){
printf("A");
}else if(j==0){
printf("Tie");
}else if(j<0){
printf("B");
}
return 0;
}
| 65 |
32,193 | int main(){
int n,i,a[200],b[2000],p=0,q=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]==1){
q+=1;
}else if(a[i]-b[i]==2){
p+=1;
}else if(a[i]-b[i]==-1){
p+=1;
}else if(a[i]-b[i]==-2){
q+=1;
}else{
p=p;
q=q;
}
}
if(p>q){
printf("A");
}else if(p<q){
printf("B");
}else{
printf("Tie");
}
return 0;
} | 65 |
32,194 | int main(){
int i,j,n,a,b;
int A=0;
int B=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
if(a==b){
A=A;
B=B;
}else if(a==1&&b==0){
B++;
}else if(a==2&&b==0){
A++;
}else if(a==1&&b==2){
A++;
}else if(a==2&&b==1){
B++;
}else if(a==0&&b==1){
A++;
}else if(a==0&&b==2){
B++;
}
}
if(A==B){
printf("Tie");
}else if(A>B){
printf("A");
}else if(A<B){
printf("B");
}
return 0;
}
| 65 |
32,195 | int main(){
int n;
int i=0;
int count=0;
int a[200][2];
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){
count++;
}else if(a[i][0]==0&&a[i][1]==2){
count--;
}else if(a[i][0]==0&&a[i][1]==0){
count+=0;
}else if(a[i][0]==1&&a[i][1]==0){
count--;
}else if(a[i][0]==1&&a[i][1]==1){
count+=0;
}else if(a[i][0]==1&&a[i][1]==2){
count++;
}else if(a[i][0]==2&&a[i][1]==0){
count++;
}else if(a[i][0]==2&&a[i][1]==1){
count--;
}else if(a[i][0]==2&&a[i][1]==2){
count+=0;
}
}
if(count==0){
printf("Tie\n");
}else if(count>0){
printf("A\n");
}else{
printf("B\n");
}
return 0;
} | 65 |
32,196 | int main(){
int n,a[100],b[100],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&&b[i]==1){x=x+1;}
else if(a[i]==0&&b[i]==2){y=y+1;}
else if(a[i]==0&&b[i]==0){y=y+1;x=x+1;}
else if(a[i]==1&&b[i]==0){y=y+1;}
else if(a[i]==1&&b[i]==2){x=x+1;}
else if(a[i]==1&&b[i]==1){y=y+1;x=x+1;}
else if(a[i]==2&&b[i]==0){x=x+1;}
else if(a[i]==2&&b[i]==1){y=y+1;}
else if(a[i]==2&&b[i]==2){y=y+1;x=x+1;}
}
if(x>y){printf("A");}
else if(x<y){printf("B");}
else if(x==y){printf("Tie");}
return 0;
} | 65 |
32,197 | int main()
{
int n,i;
int A,B;
int 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++;
continue;
}
if(A==B){
a++;
b++;
continue;
}
else{
b++;
continue;
}
}
if(a>b){
printf("A\n");
return 0;
}
if(a==b){
printf("Tie\n");
return 0;
}
if(a<b){
printf("B\n");
return 0;}
return 0;
}
| 65 |
32,198 | int main(){
int i,n,a=0,b=0,c[200],d[200],e[200];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&c[i],&d[i]);
e[i]=c[i]-d[i];
if(e[i]==-1||e[i]==2)
a++;
else if(e[i]==1||e[i]==-2)
b++;
}
if(a>b)
printf("A");
else if(a<b)
printf("B");
else
printf("Tie");
return 0;
} | 65 |
32,199 | int main()
{
int n,a,b,p=0,q=0;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%d%d",&a,&b);
if(a-b==1) p++;
if(a-b==-2) p++;
if(a-b==-1) q++;
if(a-b==2) q++;
}
if(q>p) printf("A");
if(q<p) printf("B");
if(p==q) printf("Tie");
return 0;
} | 65 |