id
int32 0
32.5k
| code
stringlengths 95
8.4k
| label
stringclasses 65
values |
---|---|---|
32,400 | int main(){
int n,i=0,a=0,b=0,c,d;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&c,&d);
if((c==0&&d==1)||(c==1&&d==2)||(c==2&&d==0))
a++;
else if(c==d){
b++;
a++;
}
else{
b++;
}
}
if(a==b)
printf("Tie");
else if(a>b)
printf("A");
else{
printf("B");
}
return 0;
}
| 65 |
32,401 | int main(){
int n,i,j,m,a=0,b=0;
int sz[200][200];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&m,&j);
if(m==0&&j==1){ a++;}
else if(m==1&&j==2){ a++;}
else if(m==2&&j==0){ a++;}
else if(m==1&&j==0){ b++;}
else if(m==2&&j==1){ b++;}
else if(m==0&&j==2){b++;}
else {};
}
if(a>b){printf("A");}
else if(a<b){printf("B");}
else{printf("Tie");}
return 0;
}
| 65 |
32,402 | int main(){
int n,i,a=0,b=0,c,d;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&c,&d);
if(c-d==1)b++;
else if(d-c==1)a++;
else if(d<c)a++;
else if(d>c)b++;
}
if(a<b)printf("B");
else if(a>b)printf("A");
else printf("Tie");
return 0;
} | 65 |
32,403 |
int main (){
int n,i,ta,tb;
int a[200],b[200],x[200];
scanf("%d",&n);
for (i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
}
ta=0;
tb=0;
for (i=0;i<n;i++){
x[i]=b[i]-a[i];
if (x[i]==1||x[i]==-2){
ta++;
}else if(x[i]==-1||x[i]==2){
tb++;
}
}
if(ta<tb){
printf("B\n");
}else if(ta==tb){
printf("Tie\n");
}else{
printf("A\n");
}
return 0;
}
| 65 |
32,404 | int main(){
int a,b,c=0,d=0,n,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if((a-b)==0) continue;
else if((a-b)==-1)
c++;
else if((a-b)==2)
c++;
else d++;
}
if(c>d) printf("A");
else if(c==d) printf("Tie");
else printf("B");
return 0;
}
| 65 |
32,405 | main()
{
int n,a,b,i,x,y;
x=0;y=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)
{x++;}
if(a==1&&b==0||a==2&&b==1||a==0&&b==2)
{y++;}
}
if(x>y)
printf("A\n");
if(x<y)
printf("B\n");
if(x==y)
printf("Tie\n");
}
| 65 |
32,406 | int main(){
int n,a,b,s[200][2],i,j;
scanf("%d",&n);
a=0;b=0;
for(i=0;i<n;i++){
scanf("%d %d",&s[i][0],&s[i][1]);
}
for(i=0;i<n;i++){
if(s[i][0]==s[i][1]){
a=a;b=b;
}
if(s[i][0]==0&&s[i][1]==1){
a++;b=b;
}
if(s[i][0]==0&&s[i][1]==2){
a=a;b++;
}
if(s[i][0]==1&&s[i][1]==0){
a=a;b++;
}
if(s[i][0]==1&&s[i][1]==2){
a++;b=b;
}
if(s[i][0]==2&&s[i][1]==1){
a=a;b++;
}
if(s[i][0]==2&&s[i][1]==0){
a++;b=b;
}
}
if(a>b){printf("A");}
if(a==b){printf("Tie");}
if(a<b){printf("B");}
return 0;
}
| 65 |
32,407 |
int j(int a,int b)
{
if(a>b)return -j(b,a);
if(b-a==1) return 1;
if(b==a) return 0;
if(b-a==2) return -1;
}
int main()
{
int n,s=0,i,a,b;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d%d",&a,&b);
s+=j(a,b);
}
if(s<0)printf("B");
else if(s==0)printf("Tie");
else printf("A");
return 0;
}
| 65 |
32,408 | int main()
{
int n,i,j,s1=0,t,s2=0;
char a[200],b[200];
scanf("%d",&n);
for(i=0,j=0;i<n,j<n;i++,j++)
{
scanf("%s %s",&a[i],&b[j]);
t=a[i]-b[i];
if(t==-1||t==2)
{
s1++;
}
else
if(t==1||t==-2)
{
s2++;
}
}
if(s1==s2)
{
printf("Tie");
}
else
if(s1>s2)
{
printf("A");
}
else
if(s1<s2)
{
printf("B");
}
return 0;
} | 65 |
32,409 | int main(){
int n,i,a,b,total;
total=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(a==0&&b==0){
}
else if(a==0&&b==1){
total++;
}
else if(a==0&&b==2){
total--;
}
else if(a==1&&b==0){
total--;
}
else if(a==1&&b==1){
}
else if(a==1&&b==2){
total++;
}
else if(a==2&&b==0){
total++;
}
else if(a==2&&b==1){
total--;
}
else if(a==2&&b==2){
}
}
if(total==0){
printf("Tie");
}
else if(total<0){
printf("B");
}
else{
printf("A");
}
return 0;
}
| 65 |
32,410 | int main()
{
int n,i,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++;
}else if(a==0&&b==0){
continue;
}else if(a==0&&b==2){
B++;
}else if(a==1&&b==0){
B++;
}else if(a==1&&b==1){
continue;
}else if(a==1&&b==2){
A++;
}else if(a==2&&b==0){
A++;
}else if(a==2&&b==1){
B++;
}else if(a==2&&b==2){
continue;
}
}
if (A>B){
printf("A");
}else if(A<B){
printf("B");
}else if(A=B){
printf("Tie");
}
return 0;
} | 65 |
32,411 | int main(){
int a[1000],b[1000],i,n,x=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]==b[i]){
}
else if(a[i]==0){
if(b[i]==1){
x++;
}
else if(b[i]==2){
x--;
}
}
else if(a[i]==1){
if(b[i]==2){
x++;
}
if(b[i]==0){
x--;
}
}
else if(a[i]==2){
if(b[i]==0){
x++;
}
if(b[i]==1){
x--;
}
}
}
if(x>0){
printf("A");
}
else if(x<0){
printf("B");
}
else{printf("Tie");}
}
| 65 |
32,412 | int main (){
int n,k,m;
int x,c;
x=0;
c=0;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d%d",&k,&m);
if(k==1&&m==2){x++;}
else if(k==0&&m==2){c++;}
else if(k==0&&m==1){x++;}
else if(k==2&&m==1){c++;}
else if(k==2&&m==0){x++;}
else if(k==1&&m==0){c++;}
}
if(x>c){printf("A");}
else if(x==c){printf("Tie");}
else if(x<c){printf("B");}
}
| 65 |
32,413 | int panduan(int a,int b){
if(a==b)
return 0;
else if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0))
return 1;
else
return -1;
}
int main(){
int n,a,b,x=0;
scanf("%d",&n);
while(n--){
scanf("%d%d",&a,&b);
x+=panduan(a,b);
}
if(x>0)
printf("A\n");
else if(x==0)
printf("Tie\n");
else
printf("B\n");
return 0;
} | 65 |
32,414 | int main(){
int n,i,a,b,x,y;
x=0,y=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)){x+=1;}
else if((a==1&&b==0)||(a==2&&b==1)||(a==0&&b==2)){y+=1;}
else if((a==1&&b==1)||(a==2&&b==2)||(a==0&&b==0)){x+=0,y+=0;}
}
if(x==y){printf("Tie");}
else if(x>y){printf("A");}
else if(x<y){printf("B");}
return 0;
} | 65 |
32,415 |
main()
{
int i,j,k,l,m,n;
scanf("%d",&n);
int a[n],b[n];
for(i=0;i<n;i++) scanf("%d %d",&a[i],&b[i]);
int res1,res2;
res1=res2=0;
for(i=0;i<n;i++)
{
if(a[i]==0)
{
if(b[i]==1) res1++;
if(b[i]==2) res2++;
}
if(a[i]==1)
{
if(b[i]==0) res2++;
if(b[i]==2) res1++;
}
if(a[i]==2)
{
if(b[i]==0) res1++;
if(b[i]==1) res2++;
}
}
if(res1==res2) printf("Tie");
if(res1>res2) printf("A");
if(res1<res2) printf("B");
}
| 65 |
32,416 | int main()
{
int n,i,q,a,b;
a=0;
b=0;
scanf("%d",&n);
int sz[n][2];
for(i=0;i<n;i++)
{
for(q=0;q<2;q++)
{
scanf("%d",&sz[i][q]);
}
}
for(i=0;i<n;i++)
{
if(sz[i][0]==0&&sz[i][1]==1)
{
a=a+1;
b=b;
}
else
{
if(sz[i][0]==1&&sz[i][1]==2)
{
a=a+1;
b=b;
}
else
{
if(sz[i][0]==2&&sz[i][1]==0)
{
a=a+1;
b=b;
}
else
{
if(sz[i][0]==sz[i][1])
{
a=a;
b=b;
}
else
{
a=a;
b=b+1;
}
}
}
}
}
if(a>b)
{
printf("A");
}
else
{
if(a==b)
{
printf("Tie");
}
else
{
printf("B");
}
}
return 0;
} | 65 |
32,417 | int main(){
int n,i,a,b,A,B;
scanf("%d", &n);
a=0;
b=0;
for(i=1;i<= n;i++){
scanf("%d %d", &A,&B);
if(A==0&&B==0||A==1&&B==1||A==2&&B==2){
a=a;}
else if(A==0&&B==1||A==1&&B==2||A==2&&B==0){
a=a+1;}
else if(A==0&&B==2||A==1&&B==0||A==2&&B==1){
b=b+1;}}
if(a>b){printf("A");}
else if(a<b){printf("B");}
else if(a=b){printf("Tie");}
return 0;
}
| 65 |
32,418 | int main(){
int n,i,j=0,k=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]){
j=j;
k=k;
}
else if((a[i]==0&&b[i]==1)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0)){
j++;
}
else
k++;
}
if(j==k){
printf("Tie");
}else if(j>k){
printf("A");
}else printf("B");
return 0;
}
| 65 |
32,419 | main()
{
int n,i,j=0,k=0,a,b;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d %d",&a,&b);
if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0))
j++;
else if((b==0&&a==1)||(b==1&&a==2)||(b==2&&a==0))
k++;
else if((a==0&&b==0)||(a==1&&b==1)||(a==2&&b==2))
;
else;
}
if(j>k)
printf("A");
else if(j<k)
printf("B");
else
printf("Tie");
} | 65 |
32,420 | int main(){
int m,n,l,z,a,b;
a=0,b=0;
scanf("%d",&l);
for(int i=0;i<l;i++){
scanf("%d %d",&m,&n);
z=m-n;
if(z==-1||z==2){b++;}
else if(z==1||z==-2){a++;}
}
if(a>b){printf("B");}
else if(b>a){printf("A");}
else if(b==a){printf("Tie");}
return 0;
}
| 65 |
32,421 | int main (){
int n,i,k;
scanf("%d",&n);
int sz[1000][1000];
for(i=0;i<n;i++){
for(k=0;k<2;k++){
scanf("%d",&sz[i][k]);
}
}
int a=0;
int b=0;
for(i=0;i<n;i++){
if(sz[i][0]==sz[i][1]){
continue;
}
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");
}
if(a<b){
printf("B");
}
if(a==b){
printf("Tie");
}
return 0;
}
| 65 |
32,422 | main()
{
int a=0,b=0,n,i,j,k;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&j,&k);
switch(j-k){
case 1:b++;break;
case -1:a++;break;
case 0: break;
case 2: a++;break;
case -2:b++;break;}
}
if(a>b)
printf("A");
if(a==b)
printf("Tie");
if(a<b)
printf("B");
} | 65 |
32,423 | int main(){
int i,m,n,a[200],b[200],p,q;
scanf("%d",&n);
p=0;
q=0;
for(i=0;i<n;i++){
scanf("%d %d\n",&a[i],&b[i]);
}
for(m=0;m<n;m++){
if(a[m]==b[m]){
p=p;
q=q;
}
else if(a[m]==0&&b[m]==1){
p=p+1;
q=q;
}
else if(a[m]==0&&b[m]==2){
p=p;
q=q+1;
}
else if(a[m]==1&&b[m]==0){
p=p;
q=q+1;
}
else if(a[m]==1&&b[m]==2){
p=p+1;
q=q;
}
else if(a[m]==2&&b[m]==0){
p=p+1;
q=q;
}
else if(a[m]==2&&b[m]==1){
p=p;
q=q+1;
}
}
if(p>q){
printf("A");
}
if(p<q){
printf("B");
}
if(p==q){
printf("Tie");
}
return 0;
} | 65 |
32,424 | int main(){
int n,i;
int aa=0;
int bb=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){
if(b[i]==1){
aa+=1;
}else if(b[i]==2){
bb+=1;
}
}else if(a[i]==1){
if(b[i]==0){
bb+=1;
}else if(b[i]==2){
aa+=1;
}
}else if(a[i]==2){
if(b[i]==0){
aa+=1;
}else if(b[i]==1){
bb+=1;
}
}
}
if(aa>bb){
printf("A");
}else if(aa<bb){
printf("B");
}else{
printf("Tie");
}
return 0;
}
| 65 |
32,425 | int main(){
int n,i,a[201],b[201],x=0,y=0,t=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d %d",&a[i],&b[i]);
if(a[i]==0){
if(b[i]==1)x=x+1;
else if(b[i]==2)y=y+1;
else if(b[i]==0)t=t+1;
}
else if(a[i]==1){
if(b[i]==1)t=t+1;
else if(b[i]==2)x=x+1;
else if(b[i]==0)y=y+1;
}
else if(a[i]==2){
if(b[i]==1)y=y+1;
else if(b[i]==2)t=t+1;
else if(b[i]==0)x=x+1;
}
}
if(x>y)printf("A");
else if(x<y)printf("B");
else if((x==0&&y==0)||x==y)printf("Tie");
return 0;
}
| 65 |
32,426 | int main(){
int n,c=0,d=0;
scanf("%d",&n);
int a[200],b[200];
for(int i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
}
for(int j=0;j<n;j++){
if(a[j]==0&&b[j]==1){c++;}
if(a[j]==1&&b[j]>a[j]){c++;}
if(a[j]==2&&b[j]==0){c++;}
if(b[j]==0&&a[j]==1){d++;}
if(b[j]==1&&a[j]>b[j]){d++;}
if(b[j]==2&&a[j]==0){d++;}
}
if(c>d){printf("A");}
if(c<d){printf("B");}
if(c==d){printf("Tie");}
return 0;
}
| 65 |
32,427 | int main()
{
int a[200],b[200],i,j,k,n;
j=0; k=0;
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) {j++;}
else { if(b[i]==2) {k++;}}
}
if(a[i]==1)
{
if(b[i]==2) {j++;}
else { if(b[i]==0) {k++;}}
}
if(a[i]==2)
{
if(b[i]==0) {j++;}
else { if(b[i]==1) {k++;}}
}
}
if(j==k) {printf("Tie");}
else
{
if(j>k) {printf("A");}
else {printf("B");}
}
return 0;
}
| 65 |
32,428 |
int main()
{int n;
cin>>n;
int i,a,b,ca=0,cb=0;
for(i=0;i<n;i++)
{
cin>>a>>b;
if(a==0&&b==1)
ca++;
else if(a==1&&b==2)
ca++;
else if(a==2&&b==0)
ca++;
else if(b==0&&a==1)
cb++;
else if(b==1&&a==2)
cb++;
else if(b==2&&a==0)
cb++;
}
if(ca>cb)
cout<<"A";
if(ca==cb)
cout<<"Tie";
if(cb>ca)
cout<<"B";
return 0;
}
| 65 |
32,429 | int main(){
int n,a,b;
scanf("%d",&n);
int aa[n],bb[n];
a=0;
for(int i=0;i<n;i++){
scanf("%d%d",&aa[i],&bb[i]);
}
for(int i=0;i<n;i++){
if(aa[i]==0&&bb[i]==1){
a++;
}
if(aa[i]==1&&bb[i]==2){
a++;
}
if(aa[i]==2&&bb[i]==0){
a++;
}
if(aa[i]==1&&bb[i]==0){
a--;
}
if(aa[i]==2&&bb[i]==1){
a--;
}
if(aa[i]==0&&bb[i]==2){
a--;
}
}
if(a==0){
printf("Tie");
}
if(a>0){
printf("A");
}
if(a<0){
printf("B");
}
return 0;
}
| 65 |
32,430 | int main(){
int n,a,b;
int p=0,q=0;
scanf("%d",&n);
int i;
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
if((a==0&&b==a)||(a==1&&b==1)||(a==2&&b==2))
p=p,q=q;
else if(a==0&&b==1||a==1&&b==2||a==2&&b==0)
p+=1;
else if(a==0&&b==2||a==1&&b==0||a==2&&b==1)
q+=1;
}
if(p==q)
printf("Tie");
else if(p<q)
printf("B");
else if(p>q)
printf("A");
return 0;
} | 65 |
32,431 | int main()
{
int n,i,a=0,b=0,c=0;
scanf("%d",&n);
int sz[200][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]==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]==sz[i][1])
{
c++;
}
else if((sz[i][1]==0&&sz[i][0]==1)||(sz[i][1]==1&&sz[i][0]==2)||(sz[i][1]==2&&sz[i][0]==0))
{
b++;
}
}
if(a>b)
{
printf("A");
}
else if(b>a)
{
printf("B");
}
else if(a==b)
{
printf("Tie");
}
return 0;
} | 65 |
32,432 | int main() {
int n,i,a,b,r=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d%d",&a,&b);
if(a==0&&b==1){
r+=1;
}else if(a==1&&b==2){
r+=1;
}else if(a==2&&b==0){
r+=1;
}else if(a==b){
r=r;
}else {
r=r-1;
}
}
if(r>0){
printf("A");
}else if(r<0){
printf("B");
}else {
printf("Tie");
}
return 0;
}
| 65 |
32,433 |
int main()
{
int ac = 0;
int bc = 0;
int a, b;
int i, n;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d", &a, &b);
if ((a + 1) % 3 == b)
ac++;
else if ((b + 1) % 3 == a)
bc++;
}
if (ac > bc)
printf("A");
else if (bc > ac)
printf("B");
else
printf("Tie");
return 0;
} | 65 |
32,434 | int main(){
int n;
scanf("%d",&n);
int a,b,c,m,j=0,k=0;
for(int i=0;i<n;i++){
scanf("%d %d",&a,&b);
c=a-b;
if(c==-1||c==2){
j++;
}
else if(c==1||c==-2){
k++;
}
}
m=j-k;
if(m==0){
printf("Tie");
}
else if(m<0){
printf("B");
}
else if(m>0){
printf("A");
}
return 0;
}
| 65 |
32,435 | int main(){
int n,a[100],b[100],i,sy[100],P=0,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]){
sy[i]=0;P++;}
else if(a[i]-b[i]==-1 || a[i]-b[i]==2){
sy[i]=1;A++;}
else {
sy[i]=-1;B++;}
}
for(i=0;i<n;i++){
if(A>B){
printf("A\n");break;}
else if(A<B){
printf("B\n");
break;
}else{
printf("Tie\n");
break;
}
}
return 0;
}
| 65 |
32,436 | int main()
{
int n,i;
int x,y,z;
x=0;
y=0;
z=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]==b[i])
z++;
else if((a[i]==0 && b[i]==1)||(a[i]==1 && b[i]==2)||(a[i]==2 && b[i]==0))
x++;
else
y++;
}
if(x<y)
printf("B");
else if(x==y)
printf("Tie");
else
printf("A");
return 0;
}
| 65 |
32,437 | int main ()
{
int i,a[max],b[max],m=0,q=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))
{m++;
}
else
{if((b[i]==0&&a[i]==1)||(b[i]==1&&a[i]==2)||(b[i]==2&&a[i]==0))
{q++;
}
else
{m++;
q++;
}
}}
if(m>q)
{printf("A\n");
}
else
{if(m==q)
{printf("Tie\n");
}
else
{printf("B\n");
}
}return 0;
} | 65 |
32,438 | int main (){
int n,i,a,b,aa=0,bb=0,pp=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
if(a==b-1||a==b+2){
aa=aa+1;
}else{
if(a==b){
pp=pp+1;
}else{
bb=bb+1;
}
}
}
if(aa>bb){
printf("A");
}else{
if(aa==bb){
printf("Tie");
}else{
printf("B");
}
}
return 0;
}
| 65 |
32,439 | int main(){
int n,a,b,i,m=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(a==b) m=m;
else if(b-a==1 || a-b==2) m=m+1;
else m=m-1;
}
if(m==0)printf("Tie");
else if(m>0)printf("A");
else if(m<0)printf("B");
return 0;
} | 65 |
32,440 | int main(){
int n,a=0,b=0,i,j,c=0,d=0;
int sz[100][100];
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++){
for(j=0;j<1;j++){
if((sz[i][j]==0&&sz[i][j+1]==1)||(sz[i][j]==1&&sz[i][j+1]==2)||(sz[i][j]==2&&sz[i][j+1]==0)){
c++;
}
else if((sz[i][j]==1&&sz[i][j+1]==0)||(sz[i][j]==2&&sz[i][j+1]==1)||(sz[i][j]==0&&sz[i][j+1]==2)){
d++;
}
}
}
if(c>d){
printf("A");
}
else if(d>c){
printf("B");
}
else
printf("Tie");
return 0;
}
| 65 |
32,441 | int main()
{
int n,i;
int c=0,d=0;
int a[max],b[max];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]==b[i]){
c++;
}
else if(a[i]==0&&b[i]==1||a[i]==1&&b[i]==2||a[i]==2&&b[i]==0){
d++;
}
}
if(n-c<2*d){
printf("A");
}
else if(n-c>2*d){
printf("B");
}
else{
printf("Tie");
}
return 0;
} | 65 |
32,442 | int main(){
int n,c=0,d=0,a,b,e=0;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d%d",&a,&b);
if(a-b==-1){
c++;
}
else if(a-b==2){
c++;
}
else if(a-b==1){
d++;
}
else if(a-b==-2){
d++;
}
}
if(c>d){
printf("A");
}
else if(c<d){
printf("B");
}
else {printf("Tie");}
return 0;
}
| 65 |
32,443 | int main()
{
int n,p,q,i;
int a[200];
int b[200];
p=0;
q=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){p++;}
if(b[i]==2){q++;}
}
else if(a[i]==1){
if(b[i]==2){p++;}
if(b[i]==0){q++;}
}
else if(a[i]==2){
if(b[i]==0){p++;}
if(b[i]==1){q++;}
}
}
if(p>q){printf("A");}
else if (p<q){printf("B");}
else if (p==q){printf("Tie");}
return 0;
}
| 65 |
32,444 | int main(){
int i,n;
int a,b;
int aa,bb;
scanf("%d",&n);
aa=bb=0;
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
a=(a-b+3)%3;
if(a==2)aa++;
else if(a==1)bb++;
}
if(aa<bb)printf("B");
else if(aa>bb)printf("A");
else printf("Tie");
return 0;
} | 65 |
32,445 | int main()
{
int n,i,j,x=0,y=0,z=0;
int a[201],b[201];
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]!=b[j])
{
if((a[j]==0&&b[j]==1)||(a[j]==1&&b[j]==2)||(a[j]==2&&b[j]==0))
{
x++;
}else
{
y++;
}
}else
{
continue;
}
}
if(x>y)
{
printf("A");
}else if(x<y)
{
printf("B");
}else if(x==y)
{
printf("Tie");
}
return 0;
} | 65 |
32,446 | int main(){
int n,a=0,b=0,x,y;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d%d\n",&x,&y);
if(x-y==1||(x==0&&y==2)){
b++;
}
if(y-x==1||(y==0&&x==2)){
a++;
}
}
if(a>b){
printf("A");
}
else if(a<b){
printf("B");
}
else{
printf("Tie");
}
return 0;
}
| 65 |
32,447 | int main()
{
int n,i,j,a=0,c;
int b[200][2];
scanf("%d",&n);
for(i=0;i<n;i++){
for(j=0;j<2;j++){
scanf("%d",&b[i][j]);
}
}
for(i=0;i<n;i++){
c=b[i][0]-b[i][1];
if(c==0)
a=a;
if(c==1||c==-2)
a=a-1;
if(c==-1||c==2)
a=a+1;
}
if(a==0)
printf("Tie");
if(a>0)
printf("A");
if(a<0)
printf("B");
return 0;
} | 65 |
32,448 | int main()
{
int n,i;
int p=0,q=0;
scanf("%d",&n);
int a[300],b[300];
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)||(a[i]==1&&b[i]==1)||(a[i]==2&&b[i]==2)){
p++;
q++;
}
else if((a[i]==0&&b[i]==1)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0)){
p++;
}
else
q++;
}
if(p>q)
printf("A");
else if(p<q)
printf("B");
else
printf("Tie");
return 0;
} | 65 |
32,449 | int main(){
int n,a,b,i,A=0,B=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d %d",&a,&b);
if(a==0){
if(b==0){
continue;
}
else if(b==1){
A++;
}
else{
B++;
}
}
else if(a==1){
if(b==0){
B++;
}
else if(b==1){
continue;
}
else{
A++;
}
}
else{
if(b==0){
A++;
}
else if(b==1){
B++;
}
else{
continue;
}
}
}
if(A>B){
printf("A");
}
else if(A<B){
printf("B");
}
else{
printf("Tie");
}
return 0;
}
| 65 |
32,450 | int main(){
int c=0,d=0,i,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]==0&&b[i]==1||a[i]==1&&b[i]==2||a[i]==2&&b[i]==0) c++;
else if(a[i]==b[i]){
c=c;d=d;
}else d++;
}
if(c>d) printf("A");
else if(c<d) printf("B");
else printf("Tie");
return 0;
} | 65 |
32,451 | int main(){
int n,i,p,q,a[1000],b[1000];
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]==0){
if(b[i]==1){
p++;
} else{
if(b[i]==2)
q++;
}
}else{
if(a[i]==1){
if(b[i]==0){
q++;
}else{
if(b[i]==2)
p++;
}
}else{
if(a[i]==2){
if(b[i]==0){
p++;
}else{
if(b[i]==1)
q++;
}
}
}
}
}
if(p>q){
printf("A");
}else{
if(p<q){
printf("B");
}else{
if(p==q)
printf("Tie");
}
}
return 0;
} | 65 |
32,452 | int main(){
int n,a[200],b[200],i,k,t,p;
k=0;
t=0;
p=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)){
k++;
}else if(a[i]==b[i]){
t++;
}else{
p++;
}
}
if(k>p){
printf("A");
}else if(k==p){
printf("Tie");
}else{
printf("B");
}
return 0;
}
| 65 |
32,453 | int main(){
int n,i;
int p=0,q=0;
int a[101],b[101];
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]==0){
p++;
q++;
}else if(b[i]==1){
p++;
}else if(b[i]==2){
q++;
}
}else if(a[i]==1){
if(b[i]==0){
q++;
}else if(b[i]==1){
p++;
q++;
}else if(b[i]==2){
p++;
}
}else if(a[i]=2){
if(b[i]==0){
p++;
}else if(b[i]==1){
q++;
}else if(b[i]==2){
p++;
q++;
}
}
}
if(p==q){
printf("Tie");
}else if(p>q){
printf("A");
}else if(p<q){
printf("B");
}
return 0;
} | 65 |
32,454 | int main()
{
int n,c;
scanf("%d",&n);
int a=0;
int b=0;
int cs[n][2];
for(int i=0;i<n;i++){scanf("\n%d %d",&cs[i][1],&cs[i][2]);}
for(int i=0;i<n;i++)
{c=cs[i][1]-cs[i][2];
if(c==-1||c==2){a++;}
else if(c==1||c==-2){b++;}
}
if(a>b){printf("A");}
else if(a<b){printf("B");}
else if(a==b) {printf("Tie");}
return 0;
}
| 65 |
32,455 | int main(){
int m,i,k=0;
int a,b;
scanf("%d",&m);
for(i=0;i<m;i++){
scanf("%d %d",&a,&b);
if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0)){
k++;
}else{
if(a!=b)
k--;
}
}
if(k>0)
printf("A");
if( k==0)
printf("Tie");
if(k<0)
printf("B");
return 0;
} | 65 |
32,456 | int main()
{
int a,b,n,i;
int p=0,q=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d%d",&a,&b);
if (a==2&&b==0)
{p+=1;}
else if(a==1&&b==2)
{p+=1;}
else if(a==0&&b==1)
{p+=1;}
else if(b==2&&a==0)
{q+=1;}
else if(b==1&&a==2)
{q+=1;}
else if(b==0&&a==1)
{q+=1;}
else if(a=b)
{p+=0;}
}
if(p>q)
{printf("A");}
else if(p<q)
{printf("B");}
else if(p=q)
{printf("Tie");}
return 0;
} | 65 |
32,457 |
int main()
{
int n,i;
int a=0,b=0;
int x,y;
scanf("%d\n",&n);
for(i=0;i<n;i++)
{
scanf("%d %d\n",&x,&y);
if(x==y){a++;b++;}
else
if(x-y==-1||x-y==2)a++;
else
b++;
}
if(a==b)printf("Tie");
else
if(a>b)printf("A");
else
printf("B");
} | 65 |
32,458 | int main()
{
int n;
int a,b,x=0,y=0;
scanf("%d",&n);
for(int i=0;i<n;i++)
{scanf("%d%d",&a,&b);
if(a==0)
{
if(b==1)
{x++;}
else
{
if(b==2)
{
y++;
}
}
}
if(a==1)
{
if(b==0)
{y++;}
else
{
if(b==2)
{x++;}
}
}
if(a==2)
{
if(b==0)
{x++;}
else
{if(b==1)
{y++;}}
}
}
if(x>y)
printf("A");
if(x==y)
printf("Tie");
if(x<y)
printf("B");
return 0;
} | 65 |
32,459 | int main()
{
int n,a,b,sa=0,sb=0;
int i;
scanf("%d",&n);
for (i=1;i<=n;i++)
{
scanf("%d%d",&a,&b);
if (a==b) continue;
else if (a==0&&b==1) sa++;
else if (a==1&&b==0) sb++;
else if (a==1&&b==2) sa++;
else if (a==2&&b==1) sb++;
else if (a==2&&b==0) sa++;
else if (a==0&&b==2) sb++;
}
if (sa>sb) printf("A\n");
else if (sb>sa) printf("B\n");
else printf("Tie\n");
}
| 65 |
32,460 | int main(){
int n,i,a,b,total=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
if(a==b){
}
else if(a==0&&b==1){
total++;
}
else if(a==0&&b==2){
total--;
}
else if(a==1&&b==0){
total--;
}
else if(a==1&&b==2){
total++;
}
else if(a==2&&b==0){
total++;
}
else if(a==2&&b==1){
total--;
}
}
if(total<0){
printf("B");
}
else if(total==0){
printf("Tie");
}
else if(total>0){
printf("A");
}
return 0;
} | 65 |
32,461 | int main()
{
int a[201],b[201],n,i,na,nb;
na=0;
nb=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)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0)){
na++;
}else if(a[i]==b[i]){
continue;
}
else{
nb++;
}
}
if(na>nb){
printf("A");
}else if(na<nb){
printf("B");
}else{
printf("Tie");
}
return 0;
} | 65 |
32,462 | int main()
{
int l,i,m=0,n=0,a[100],b[100];
scanf("%d",&l);
for(i=0;i<=l-1;i++)
{
scanf("%d",&a[i]);
scanf("%d",&b[i]);
if(a[i]!=b[i])
{
if(a[i]==1&&b[i]==0)
n++;
else if(a[i]==0&&b[i]==1)
m++;
else if(a[i]==2&&b[i]==1)
n++;
else if(a[i]==1&&b[i]==2)
m++;
else if(a[i]==0&&b[i]==2)
n++;
else if(a[i]==2&&b[i]==0)
m++;
}
}
if(m>n)
printf("A");
else if(m<n)
printf("B");
else
printf("Tie");
return 0;
} | 65 |
32,463 |
main()
{
int n,a[100],b[100],A=0,B=0;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%d%d",&a[i],&b[i]);
if(a[i]==b[i])
{
A=A+1;
B=B+1;
}
else if((a[i]==0)&&(b[i]==1))
A=A+1;
else if((a[i]==1)&&(b[i]==2))
A=A+1;
else if((b[i]==0)&&(a[i]==1))
B=B+1;
else if((b[i]==1)&&(a[i]==2))
B=B+1;
else if((a[i]==2)&&(b[i]==0))
A=A+1;
else if((b[i]==2)&&(a[i]==0))
B=B+1;
}
if(A>B)
printf("A");
else if(A<B)
printf("B");
else
printf("Tie");
}
| 65 |
32,464 |
int main(){
int n,i;
double jieguo=0.00;
scanf("%d\n",&n);
int a[n],b[n];
for (i=0;i<n;i++){
scanf("%d%d\n",&a[i],&b[i]);
if (a[i]==b[i]-1||a[i]==b[i]+2){jieguo=jieguo+1;}
else if (a[i]==b[i]){jieguo=jieguo;}
else {jieguo=jieguo-1;}
}
if (jieguo==0.00){printf("Tie");}
else if(jieguo>0.00){printf("A");}
else {printf("B");}
return 0;
} | 65 |
32,465 | int main(){
int n,i,j,A=0,B=0,Tie=0;
scanf("%d",&n);
int* lun=(int*)malloc(n*2*sizeof(int));
int* result=(int*)malloc(n*sizeof(int));
for(i=0;i<n*2;i++)
scanf("%d",lun+i);
for(i=0;i<n;i++)
for(j=0;j<1;j++)
if(*(lun+i*2+j)-*(lun+i*2+j+1)==-1||*(lun+i*2+j)-*(lun+i*2+j+1)==2)
*(result+i)=1;
else if(*(lun+i*2+j)==*(lun+i*2+j+1)) *(result+i)=0;
else *(result+i)=-1;
for(i=0;i<n;i++)
{if(*(result+i)==1)A++;
if(*(result+i)==0)Tie++;
if(*(result+i)==-1)B++;}
if(A>B)printf("A");
if(B>A)printf("B");
if(A==B)printf("Tie");
return 0;
}
| 65 |
32,466 | int main(){
int i,n,a,b,j=0,l=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)){
j=j+1;
}else if((b==0&&a==1)||(b==1&&a==2)||(b==2&&a==0)){
l=l+1;
}
}
if(j>l){
printf("A");
}else if(j<l){
printf("B");
}else{
printf("Tie");
}
return 0;
} | 65 |
32,467 | int main(){
int n,a=0,b=0;
int sz[200][2];
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d %d",&sz[i][0],&sz[i][1]);
}
for(int i=0;i<n;i++){
if(sz[i][0]==0){
if(sz[i][1]==1){
a++;
} else if(sz[i][1]==2){
b++;
}
}
if(sz[i][0]==1){
if(sz[i][1]==2){
a++;
} else if(sz[i][1]==0){
b++;
}
}
if(sz[i][0]==2){
if(sz[i][1]==0){
a++;
} else if(sz[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,468 | int main()
{
int i,awin,bwin,n;
int a[220],b[220];
scanf("%d",&n);
awin=0;
bwin=0;
for(i=1;i<=n;i++){
scanf("%d %d",&a[i],&b[i]);
if(a[i]==0&&b[i]==2){
bwin++;
}else{
if(a[i]==2&&b[i]==0){
awin++;
}else{
if(a[i]>b[i]){
bwin++;
}else{
if(b[i]>a[i]){
awin++;
}else{
continue;
}
}
}
}
}
if(awin>bwin){
printf("A");
}else{
if(bwin>awin){
printf("B");
}else{
printf("Tie");
}
}
return 0;
} | 65 |
32,469 | int main (){
int n;
scanf("%d",&n);
int i,a[n],b[n];
int m=0,j=0;
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]==b[i]){
}else if(a[i]==b[i]-1||a[i]==b[i]+2){
m++;
}else{
j++;
}
}
if(m>j){
printf("A");
}else if(m==j){
printf("Tie");
}else{
printf("B");
}
return 0;
} | 65 |
32,470 | int main()
{
int i,n,s=0,m=0;
int a[200],b[200];
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&&b[i]==1)||(a[i]==2&&b[i]==0)||(a[i]==1&&b[i]==2))
{
s++;
}
else if ((a[i]==1&&b[i]==0)||(a[i]==0&&b[i]==2)||(a[i]==2&&b[i]==1))
{
m++;
}
}
if (s>m)
{
printf ("A");
}
else if (s<m)
{
printf ("B");
}
else
{
printf ("Tie");
}
return 0;
}
| 65 |
32,471 |
int main() {
int n;
cin >> n;
int total = 0;
for(int i=0; i<n; i++) {
int a,b;
cin >> a >> b;
if(b == (a+1)%3) {
total += 1;
} else if(a == (b+1)%3) {
total -= 1;
}
}
if(total > 0) {
cout << "A" << endl;
} else if(total < 0) {
cout << "B" << endl;
} else {
cout << "Tie" << endl;
}
return 0;
} | 65 |
32,472 | int main(){
int i,k,t,j,n,a[201],b[201];
int c=0,f=0;
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]==0&&b[j]==1){
c=c+1;}
else if(a[j]==1&&b[j]==2){
c=c+1;}
else if(a[j]==2&&b[j]==0){
c=c+1;}
else if(a[j]==1&&b[j]==0){
f=f+1;}
else if(a[j]==2&&b[j]==1){
f=f+1;}
else if(a[j]==0&&b[j]==2){
f=f+1;}
}
if(f>c){
printf("B");
return 0;}
else if(c>f){
printf("A");
return 0;}
printf("Tie");
return 0;
}
| 65 |
32,473 | int main(){
int a=0,b=0;
int x,y;
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&x,&y);
if(x==0){
if(y==1){a+=1;
}
else if(y==2){b+=1;
}
}
else if(x==1){
if(y==2){a+=1;
}
else if(y==0){b+=1;
}
}
else if(x==2){
if(y==0){a+=1;
}
else if(y==1){b+=1;
}
}
}
if(a>b){printf("A");
}
else if(a<b){printf("B");
}
else if(a==b){printf("Tie");
}
return 0;
} | 65 |
32,474 | int main(){
int n,a,b,i,s=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d ",&a,&b);
if(a==0&&b==1){s=s+1;}
else if(a==1&&b==2){s=s+1;}
else if(a==2&&b==0){s=s+1;}
else if(a==1&&b==0){s=s-1;}
else if(a==2&&b==1){s=s-1;}
else if(a==0&&b==2){s=s-1;}
}
if(s>0){printf("A");}
else if(s<0){printf("B");}
else{printf("Tie");}
return 0;
} | 65 |
32,475 | int main(){
int n,x,y,s=0;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d %d",&x,&y);
if((x==0&&y==1)|(x==1&&y==2)|(x==2&&y==0)){
s++;
}else if(x==y){
}else{
s--;
}
}
if(s==0){
printf("Tie");
}
if(s>0){
printf("A");
}
if(s<0){
printf("B");
}
return 0;
} | 65 |
32,476 | int main()
{
int n,j,o1=0,p1=0;
scanf("%d",&n);
for(j=0;j<n;j++)
{
int o,p;
scanf("%d%d",&o,&p);
if(o==p);
else if((o==0&&p==1)||(o==1&&p==2)||(o==2&&p==0)) o1++;
else p1++;
}
if(o1>p1) printf("A\n");
else if(p1>o1) printf("B\n");
else printf("Tie\n");
} | 65 |
32,477 | int main()
{
int n,i,a,b,s,j;
a=0;
b=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&s,&j);
if((s==0&&j==1)||(s==1&&j==2)||(s==2&&j==0)){
a++;
}else if((j==0&&s==1)||(j==1&&s==2)||(j==2&&s==0)){
b++;
}else if((s==0&&j==0)||(s==1&&j==1)||(s==2&&j==2)){
a=a+0;
b=b+0;
}
}
if(a>b)
printf("A");
else if(a<b)
printf("B");
else if(a=b)
printf("Tie");
return 0;
}
| 65 |
32,478 | int main(){
int n,i,cqa[200],cqb[200],a,b;
a=0;
b=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&cqa[i],&cqb[i]);
}
for(i=0;i<n;i++){
if(cqa[i]==cqb[i]){
a=a;
b=b;
}
if(cqa[i]-1==cqb[i]){
a=a;
b=b+1;
}
if(cqa[i]+1==cqb[i]){
a=a+1;
b=b;
}
if(cqa[i]+2==cqb[i]){
a=a;
b=b+1;
}
if(cqa[i]-2==cqb[i]){
a=a+1;
b=b;
}}
if(a==b){
printf("Tie");
}
if(a<b){
printf("B");
}
if(a>b){
printf("A");
}
return 0;
} | 65 |
32,479 | int main(){
int sz[200][2];
int n,i,j,a,b;
a=0;
b=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&sz[i][0]);
scanf("%d",&sz[i][1]);
}
for(j=0;j<n;j++){
if(sz[j][0]==0){
if(sz[j][1]==1){
a++;
}else if(sz[j][1]==2){
b++;
}
}else if(sz[j][0]==1){
if(sz[j][1]==2){
a++;
}else if(sz[j][1]==0){
b++;
}
}else if(sz[j][0]==2){
if(sz[j][1]==0){
a++;
}else if(sz[j][1]==1){
b++;
}
}
}
if(a>b){
printf("A");
}else if(a<b){
printf("B");
}else{
printf("Tie");
}
return 0;
} | 65 |
32,480 | int jg(int a,int b);
int main(){
int n,i;
int ay=0,by=0,pj=0;
int sza[max],szb[max];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&sza[i],&szb[i]);
}
for(i=0;i<n;i++){
if(jg(sza[i],szb[i])==1){
ay++;
}else{
if(jg(sza[i],szb[i])==2){
by++;
}else{
pj++;
}
}
}
if(ay==by){
printf("Tie");
}else{
if(ay>by){
printf("A");
}else{
printf("B");
}
}
return 0;
}
int jg(int a,int b){
if((a==0&&b==0)||(a==1&&b==1)||(a==2&&b==2)){
return 0;
}else{
if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0)){
return 1;
}else{
return 2;
}
}
}
| 65 |
32,481 | int main ()
{
int n,i;
int a[1000];
int b[1000];
int result[1000];
int ax=0,bx=0;
scanf ("%d",&n);
for (i=0;i<n;i++)
{ //0?????1?????2????
scanf ("%d %d",&a[i],&b[i]);
if (a[i]==0&&b[i]==0){result[i]=0;}
else if (a[i]==1&&b[i]==1){result[i]=0;}
else if (a[i]==2&&b[i]==2){result[i]=0;}
else if (a[i]==0&&b[i]==1){result[i]=1;}
else if (a[i]==0&&b[i]==2){result[i]=2;}
else if (a[i]==1&&b[i]==2){result[i]=1;}
else if (a[i]==1&&b[i]==0){result[i]=2;}
else if (a[i]==2&&b[i]==0){result[i]=1;}
else if (a[i]==2&&b[i]==1){result[i]=2;}
}
for (i=0;i<n;i++)
{
if (result[i]==1){ax++;}
else if (result[i]==2){bx++;}
}
if (ax>bx) {printf ("A");}
else if (ax<bx) {printf ("B");}
else if (ax==bx) {printf ("Tie");}
return 0;
} | 65 |
32,482 | int main()
{ int n,i,m,k;
int a[100];
int s=0,l=0,t=0;
scanf("%d\n",&n);
for(i=0;i<n;i++){
scanf("%d%d",&m,&k);
if(m==k){a[i]=2;}
if((m==0&&k==1)||(m==1&&k==2)||(m==2&&k==0)){a[i]=1;}
if((k==0&&m==1)||(k==1&&m==2)||(k==2&&m==0)){a[i]=0;}
}
for(i=0;i<n;i++){
if(a[i]==1){s=s+1;}
if(a[i]==0){l=l+1;}
if(a[i]==2){t=t+1;}
}
if(s==l||t==n){
printf("Tie");
}
if(s>l){
printf("A");
}
if(s<l){printf("B");}
return 0;
} | 65 |
32,483 | int main(){
int i,n,s=0,f=0,p=0,a,b;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(a-b==-1||a-b==2){
s++;
}
if(a-b==0){
p++;
}
if(a-b==1||a-b==-2){
f++;
}
}
if(s==f){
printf("Tie");
}
if(s>f){
printf("A");
}
if(s<f){
printf("B");
}
return 0;
}
| 65 |
32,484 | int main(){
int n,a,b,k,t=0,i=0,o=0;
scanf("%d",&n);
for(k=0;k<n;k++){
scanf("%d%d",&a,&b);
if(a==b){t++;}
else if(a==0&&b==1){i++;}
else if(a==0&&b==2){o++;}
else if(a==1&&b==0){o++;}
else if(a==1&&b==2){i++;}
else if(a==2&&b==0){i++;}
else if(a==2&&b==1){o++;}
}
if(i>o){
printf("A");
}
else if(i<o){
printf("B");}
else if(i==o){
printf("Tie");}
return 0;
} | 65 |
32,485 | int main()
{
int n,i,suma=0,sumb=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
int a,b;
scanf("%d %d",&a,&b);
if(b-a==1||b-a==-2)suma++;
if(a-b==1||a-b==-2)sumb++;
}
if(suma>sumb)printf("A");
if(suma<sumb)printf("B");
if(suma==sumb)printf("Tie");
}
| 65 |
32,486 | int main(){
int n,a[200],b[200],i,e,t;
scanf("%d",&n);
e=0;
t=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)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0)){
e++;
}
}
for(i=0;i<n;i++){
if((b[i]==0&&a[i]==1)||(b[i]==1&&a[i]==2)||(b[i]==2&&a[i]==0)){
t++;
}
}
if(e==t){
printf("Tie");
}else if(e>t){
printf("A");
}else{
printf("B");
}
return 0;
} | 65 |
32,487 |
int main() {
int n; scanf("%d", &n);
int i, count = 0, a, b;
for (i = 0; i < n; ++ i) {
scanf("%d %d", &a, &b);
if (a == 0 && b == 1)
count ++;
else if (a == 0 && b == 2)
count --;
else if (a == 1 && b == 0)
count --;
else if (a == 1 && b == 2)
count ++;
else if (a == 2 && b == 0)
count ++;
else if (a == 2 && b == 1)
count --;
}
if (count > 0) printf("A\n");
else if (count < 0) printf("B\n");
else printf("Tie\n");
return 0;
}
| 65 |
32,488 | int main()
{
int n,i,a,b;
int s[200];
int p[200];
a=0;
b=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&s[i],&p[i]);
if(s[i]==0&&p[i]==1||s[i]==1&&p[i]==2||s[i]==2&&p[i]==0){
a++;
}
else if(p[i]==0&&s[i]==1||p[i]==1&&s[i]==2||p[i]==2&&s[i]==0){
b++;
}
else if(p[i]==0&&s[i]==0||p[i]==1&&s[i]==1||p[i]==2&&s[i]==2){
a=a;
b=b;
}
}
if(a>b){
printf("A");
}
if(a<b){
printf("B");
}
if(a==b){
printf("Tie");
}
return 0;
} | 65 |
32,489 | int main()
{
int A,B,a[200],b[200],n,i;
scanf("%d",&n);
A=0;
B=0;
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(b[i]-a[i]==1||a[i]-b[i]==2){
A++;
}
else if(a[i]==b[i]){continue;}
else{B++;}
}
if(A>B){printf("A");}
else if(A==B){printf("Tie");}
else{printf("B");}
return 0;
}
| 65 |
32,490 | // ?????.cpp : ??????????????
//
int main()//(int argc, _TCHAR* argv[])
{
int n,N;
int a=0,b=0;
scanf("%d",&N);
for(n=1;n<=N;n++)
{
int A,B;
scanf("%d%d",&A,&B);
if((A==0&&B==1)||(A==1&&B==2)||(A==2&&B==0))a=a+1;
else
{
if((B==0&&A==1)||(B==1&&A==2)||(B==2&&A==0))b=b+1;
else ;
}
}
if(a>b)printf("A\n");
else
{
if(b>a)printf("B\n");
else printf("Tie\n");
}
return 0;
}
| 65 |
32,491 | int main(){
int n;
scanf("%d",&n);
int a[200],b[200];
for(int i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
}
int sa=0,sb=0;
for(int k=0;k<n;k++){
if((a[k]==0&&b[k]==1)||(a[k]==1&&b[k]==2)||(a[k]==2&&b[k]==0)){
sa++;
}else if((a[k]==1&&b[k]==0)||(a[k]==2&&b[k]==1)||(a[k]==0&&b[k]==2)){sb++;}
}
if(sa>sb){
printf("A");
}else if(sa<sb){
printf("B");
}else{printf("Tie");}
return 0;
} | 65 |
32,492 | int awin=0,bwin=0;
void fuck(int a,int b);
int main()
{
int n;
int a[200],b[200];
int i;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d%d",&a[i],&b[i]);
for(i=0;i<n;i++)
fuck(a[i],b[i]);
if(awin>bwin)
printf("A\n");
else if(awin<bwin)
printf("B\n");
else
printf("Tie\n");
return 0;
}
void fuck(int a,int b)
{
if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0))
awin++;
else if((a==1&&b==0)||(a==2&&b==1)||(a==0&&b==2))
bwin++;
} | 65 |
32,493 | int main(){
int a,b,i,n,m;
int x[200];
int y[200];
scanf("%d",&n);
for(i=0;i<=n-1;i++){
scanf("%d%d",&(x[i]),&(y[i]));
}
a=0;
b=0;
for(i=0;i<=n-1;i++){
m=x[i]-y[i];
if(m==-1||m==2){
a++;
}
if(m==1||m==-2){
b++;}
}
if(a>b){
printf("A");
}
if(a==b){
printf("Tie");}
if(a<b){
printf("B");}
return 0;
} | 65 |
32,494 |
main()
{
int n,i,j,k,s[200][2],a=0,b=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&s[i][0],&s[i][1]);
if(s[i][0]==0)
{
if(s[i][1]==1)
a++;
else
{
if(s[i][1]==2)
b++;
else;
}
}
if(s[i][0]==1)
{
if(s[i][1]==2)
a++;
else
{
if(s[i][1]==0)
b++;
else;
}
}
if(s[i][0]==2)
{
if(s[i][1]==0)
a++;
else
{
if(s[i][1]==1)
b++;
else;
}
}
}
if(a>b)
printf("A");
else
{
if(a<b)
printf("B");
else
printf("Tie");
}
}
| 65 |
32,495 | main()
{
int n;
int i,j,x=0,y=0;
scanf("%d",&n);
int a[200][2]={10};
for(j=0;j<n;j++)
{
scanf("%d",&a[j][0]);
scanf("%d",&a[j][1]);
}
for(i=0;i<n;i++)
{
if (a[i][0]==0&&a[i][1]==1) x++;
if (a[i][0]==1&&a[i][1]==0) y++;
if (a[i][0]==0&&a[i][1]==2) y++;
if (a[i][0]==2&&a[i][1]==0) x++;
if (a[i][0]==1&&a[i][1]==2) x++;
if (a[i][0]==2&&a[i][1]==1) y++;
if (a[i][0]==a[i][1]&&a[i][0]<10) ;
}
if (x>y)
printf("A");
if (x==y)
printf("Tie");
if(x<y)
printf("B");
printf("\n");
} | 65 |
32,496 | int main(){
int i,n,a[200]={0},b[200]={0},x=0,y=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d\n",&a[i],&b[i]);
if(a[i]==0&&b[i]==1){
x++;}
else if(a[i]==1&&b[i]==2){
x++;}
else if(a[i]==2&&b[i]==0){
x++;}
else if(a[i]==1&&b[i]==0){
y++;}
else if(a[i]==2&&b[i]==1){
y++;}
else if(a[i]==0&&b[i]==2){
y++;}
else if(a[i]==b[i]){
continue;}}
if(x>y){
printf("A");}
if(x<y){
printf("B");}
if(x==y){
printf("Tie");}
return 0;
} | 65 |
32,497 | int main(){
int n;
int a=0;
int b=0;
int ax[250];
int bx[250];
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d %d",&ax[i], &bx[i]);
}
for(int i=0;i<n;i++){
if((ax[i]==1)&&(bx[i]==0)){b=b+1;}
if((ax[i]==0)&&(bx[i]==1)){a=a+1;}
if((ax[i]==2)&&(bx[i]==0)){a=a+1;}
if((ax[i]==1)&&(bx[i]==2)){a=a+1;}
if((ax[i]==2)&&(bx[i]==1)){b=b+1;}
if((ax[i]==0)&&(bx[i]==2)){b=b+1;}
if(ax[i]==bx[i]){a=a;b=b;}
}
if(a>b){printf("A");}
if(a<b){printf("B");}
if(a==b){printf("Tie");}
return 0;
}
| 65 |
32,498 | int main(){
int i,n,a[200],b[200],ai=0,bi=0;
scanf("%d\n",&n);
for(i=0;i<n-1;i++){
scanf("%d %d\n",&a[i],&b[i]);
}
scanf("%d %d",&a[n-1],&b[n-1]);
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)){
ai+=1;
}else if(a[i]==b[i]){
}else{
bi+=1;
}
}
if(ai>bi){
printf("A");
}else if(ai==bi){
printf("Tie");
}else{
printf("B");
}
return 0;
} | 65 |
32,499 | int main(){
int n,a[200],b[200],x,y,i;
scanf("%d",&n);
x=0;
y=0;
for(i=0;i<n;i++){
scanf("\n%d%d",&a[i],&b[i]);
}
for(i=0;i<n;i++){
if(a[i]==b[i]-1||a[i]-b[i]==2){x++;}
else if(a[i]-b[i]==1||b[i]-a[i]==2){y++;}
}
if(x>y){printf("A");}
else if(x<y){printf("B");}
else if(x=y){printf("Tie");}
return 0;
} | 65 |