id
int32 0
32.5k
| code
stringlengths 95
8.4k
| label
stringclasses 65
values |
---|---|---|
32,300 | int main(){
int a=0,b=0;
int i,n;
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){
a++;
}else if(A[i]==0&&B[i]==2){
b++;
}else if(A[i]==0&&B[i]==0){
a++;
b++;
}else if(A[i]==1&&B[i]==2){
a++;
}else if(A[i]==1&&B[i]==0){
b++;
}else if(A[i]==1&&B[i]==1){
a++;
b++;
}else if(A[i]==2&&B[i]==0){
a++;
}else if(A[i]==2&&B[i]==1){
b++;
}else if(A[i]==2&&B[i]==2){
a++;
b++;
}
}
if(a>b){
printf("A");
}else if(a<b){
printf("B");
}else if(a==b){
printf("Tie");
}
return 0;
}
| 65 |
32,301 | int main(){
int n,i;
int A[200],B[200];
int countA=0,countB=0;
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)){
countA++;
}else if((A[i]-B[i]==1)||(A[i]-B[i]==-2)){
countB++;
}
}
if(countA>countB) {
printf("A");
}else if(countB>countA){
printf("B");
}else {
printf("Tie");
}
return 0;
}
| 65 |
32,302 |
int main()
{
int n,a=0,x,y,i;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d%d",&x,&y);
switch(x-y)
{
case -1:
case 2: a+=1;break;
case 1:
case -2: a-=1;break;
}
}
if(a>0) printf("A");
else if(a<0) printf("B");
else printf("Tie");
return 0;
} | 65 |
32,303 | int main(){
int n,i,k=0,l=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]==1){
if(b[i]<a[i]){
l=l+1;
}
else if(b[i]>a[i]){
k=k+1;
}
}
if(a[i]==2){
if(b[i]==0){
k=k+1;
}
else if(b[i]==1){
l=l+1;
}
}
if(a[i]==0){
if(b[i]==1){
k=k+1;
}
else if(b[i]==2){
l=l+1;
}
}
}
if(k>l){
printf("A");
}
else if(k<l){
printf("B");
}
else if(k==l){
printf("Tie");
}
return 0;
} | 65 |
32,304 | int main()
{
int i,n,a[200],b[200],x=0,y=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]==0){x=x+1;y=y+1;}
if(a[i]==0&&b[i]==1){x=x+1;}
if(a[i]==0&&b[i]==2){y=y+1;}
if(a[i]==1&&b[i]==0){y=y+1;}
if(a[i]==1&&b[i]==1){x=x+1;y=y+1;}
if(a[i]==1&&b[i]==2){x=x+1;}
if(a[i]==2&&b[i]==0){x=x+1;}
if(a[i]==2&&b[i]==1){y=y+1;}
if(a[i]==2&&b[i]==2){x=x+1;y=y+1;}
}
if(x>y){printf("A");}
if(x<y){printf("B");}
else if(x==y){printf("Tie");}
return 0;
}
| 65 |
32,305 | main()
{
int n,i,j,a[400]={0},A=0,B=0;
scanf("%d",&n);
for(i=0;i<=2*n-1;i++)
scanf("%d",&a[i]);
for(i=0;i<=2*n-2;i+=2)
{
if(a[i]==1&&a[i+1]==2)
A+=1;
if(a[i]==2&&a[i+1]==0)
A+=1;
if(a[i]==0&&a[i+1]==1)
A+=1;
if(a[i]==2&&a[i+1]==1)
B+=1;
if(a[i]==1&&a[i+1]==0)
B+=1;
if(a[i]==0&&a[i+1]==2)
B+=1;
}
if(A>B)
printf("A");
if(A<B)
printf("B");
if(A==B)
printf("Tie");
}
| 65 |
32,306 | int main() {
int n,A=0,B=0,a[200],b[200],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]){A+=0;B+=0;}
else if((a[i]==0 && b[i]==1) || (a[i]==1 && b[i]==2) || (a[i]==2 && b[i]==0)){A+=1;}
else if((a[i]==0 && b[i]==2) || (a[i]==1 && b[i]==0) || (a[i]==2 && b[i]==1)){B+=1;}
}
if(A>B){printf("A");}
else if(A<B){printf("B");}
else{printf("Tie");}
return 0;
} | 65 |
32,307 | int fun(int x,int y){
if((x==0&&y==1)||(x==1&&y==2)||(x==2&&y==0))return 1;
if((y==0&&x==1)||(y==1&&x==2)||(y==2&&x==0))return -1;
if((x==0&&y==0)||(x==1&&y==1)||(x==2&&y==2))return 0;
}
int main(){
int n,x,y,j=0,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&x,&y);
j=j+fun(x,y);
}
if(j>0)printf("A");
if(j<0)printf("B");
if(j==0)printf("Tie");
return 0;
}
| 65 |
32,308 | int main()
{
int n,i,e,f;
int a[200], b[200];
scanf("%d",&n);
i=0;
e=0;
f=0;
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){
e++;
}
if(b[i]==0&&a[i]==1||b[i]==1&&a[i]==2||b[i]==2&&a[i]==0){
f++;
}
}
if(e>f){
printf("A");
}
if(e<f){
printf("B");
}
if(e==f){
printf("Tie");
}
return 0;
}
| 65 |
32,309 | 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]);}
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))
x++;
else if((a[i]==1&&b[i]==0)||(a[i]==2&&b[i]==1)||(a[i]==0&&b[i]==2))
y++;
}
if (x>y)
printf("A");
else if (x<y)
printf("B");
else if (x=y)
printf("Tie");
return 0;
} | 65 |
32,310 | int main()
{
int n,i=0,a=0,b=0;
struct cq1{
int x,y;
} cq[200];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&(cq[i].x),&(cq[i].y));
}
for(i=0;i<n;i++){
if(((cq[i].x==0)&&(cq[i].y==1))||((cq[i].x==1)&&(cq[i].y==2))||((cq[i].x==2)&&(cq[i].y==0))){
a=a+1;
}else if(((cq[i].y==0)&&(cq[i].x==1))||((cq[i].y==1)&&(cq[i].x==2))||((cq[i].y==2)&&(cq[i].x==0))){
b=b+1;
}
}
if(a>b){
printf("A");
}
else if(a<b){
printf("B");
}else if(a==b){
printf("Tie");
}
return 0;
}
| 65 |
32,311 | int main()
{
int n;
scanf("%d\n",&n);
int sz[200],sb[200];
int i,j;
for(i=0;i<n;i++){
scanf("%d ",&sz[i]);
scanf("%d\n",&sb[i]);
}
int a=0,b=0,tie=0;
for(i=0;i<n;i++){
if(sz[i]==0&&sb[i]==1){
a=a+1;}
else if(sz[i]==1&&sb[i]==2){
a=a+1;}
else if(sz[i]==2&&sb[i]==0){
a=a+1;}
else if(sz[i]==0&&sb[i]==2){
b=b+1;}
else if(sz[i]==1&&sb[i]==0){
b=b+1;}
else if(sz[i]==2&&sb[i]==1){
b=b+1;}
else{tie=tie+1;}
}
if(a>b){printf("A");}
else if(a<b){printf("B");}
else{printf("Tie");}
return 0;
}
| 65 |
32,312 | int main(){
int i,n,j,k=0,m=0;
int sz[200][2];
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]-sz[i][1]==-1)||(sz[i][0]-sz[i][1]==2)) {k++;}
else if((sz[i][0]-sz[i][1]==1)||(sz[i][0]-sz[i][1]==-2)) {m++;}
else if(sz[i][0]-sz[i][1]==0){k=k+1;m=m+1;}
}
if(k>m) {printf("A");}
else if(k<m) {printf("B");}
else if(k==m) {printf("Tie");}
return 0;
}
| 65 |
32,313 | int main()
{
int n,x=0,y,z=0;
scanf("%d",&n);
int c[n],d[n];
for(int i=0;i<n;i++){
scanf("%d %d",&c[i],&d[i]);
}
for(int i=0;i<n;i++)
{
if(c[i]==d[i]){z++;}
if(c[i]==0&&d[i]==1){x++;}
if(c[i]==1&&d[i]==2){x++;}
if(c[i]==2&&d[i]==0){x++;}
}
y=n-x-z;
if(x==y){printf("Tie");}
if(x<y){printf("B");}
if(x>y){printf("A");}
return 0;
} | 65 |
32,314 | int main()
{
int sz1[200],sz2[200],n,a=0,b=0,c=0;
scanf("%d",&n);
for(int i=0;i<n;i++)
{scanf("%d%d",&(sz1[i]),&(sz2[i]));}
for(int k=0;k<n;k++)
{ if(((sz1[k]-sz2[k])==1)||((sz2[k]-sz1[k])==2))
{b++;}
else if(((sz2[k]-sz1[k])==1)||((sz1[k]-sz2[k])==2))
{a++;}
else if(sz2[k]==sz1[k])
{c++;}
}
if(a>b)
{printf("A");}
if(b>a)
{printf("B");}
if(a==b)
{printf("Tie");}
return 0;
}
| 65 |
32,315 | int main()
{
int n,a[200],b[200],i,sum1=0,sum2=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&a[i],&b[i]);
if(a[i]==b[i])
continue;
else if(a[i]==0 && b[i]==1)
sum1++;
else if(a[i]==0 && b[i]==2)
sum2++;
else if(a[i]==1 && b[i]==0)
sum2++;
else if(a[i]==1 && b[i]==2)
sum1++;
else if(a[i]==2 && b[i]==0)
sum1++;
else if(a[i]==2 && b[i]==1)
sum2++;
}
if(sum1==sum2)
printf("Tie\n");
if(sum1>sum2)
printf("A\n");
if(sum2>sum1)
printf("B\n");
return 0;
}
| 65 |
32,316 | int main(){
int n,i,a,b;
int sum=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))){
sum+=0;
}else if(((a==0)&&(b==1))||((a==1)&&(b==2))||((a==2)&&(b==0))){
sum+=1;
}else{
sum-=1;
}
}
if(sum>0){
printf("A");
}else if(sum<0){
printf("B");
}else if(sum==0){
printf("Tie");
}return 0;
} | 65 |
32,317 | int main(){
int n,i,SA=0,SB=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]-1||a[i]==b[i]+2){
SA++;
}
else if(b[i]==a[i]-1||b[i]==a[i]+2){SB++;}
else{SA=SA;SB=SB;}
}
if(SA>SB){printf("A");}
else if(SA<SB){printf("B");}
else if(SA=SB){printf("Tie");}
return 0;
} | 65 |
32,318 | int main(){
int n,i,result;
result=0;
scanf("%d\n",&n);
int a[200][2];
for(i=0;i<n;i++){
scanf("%d%d",&a[i][0],&a[i][1]);
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)){
result=result+1;
}else if(a[i][0]==a[i][1]){
result=result;
}else if((a[i][0]==0&&a[i][1]==2)||(a[i][0]==1&&a[i][1]==0)||(a[i][0]==2&&a[i][1]==1))
result=result-1;
}
if(result>0){
printf("A");
}else if(result<0){
printf("B");
}else if(result==0){
printf("Tie");
}
return 0;
}
| 65 |
32,319 | int main()
{
int n,a=0,b=0;
scanf("%d",&n);
int num[n][2];
for(int i=0;i<n;i++)
{
scanf("%d",&num[i][0]);
scanf("%d",&num[i][1]);
}
for(int i=0;i<n;i++)
{
if(num[i][1]-num[i][0]==1||num[i][0]-num[i][1]==2)
{
a++;
}
if(num[i][0]-num[i][1]==1||num[i][1]-num[i][0]==2)
{
b++;
}
}
if(a>b)
{printf("A");}
if(a==b)
{printf("Tie");}
if(b>a)
{printf("B");}
return 0;
}
| 65 |
32,320 | int main()
{
int n,i,a,b,as,bs,tie;
as=0;
bs=0;
tie=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d%d",&a,&b);
if(a==0&&b==1){
as++;}
else if(a==0&&b==0){
tie++;}
else if(a==1&&b==1){
tie++;}
else if(a==1&&b==2){
as++;}
else if(a==2&&b==0){
as++;}
else if(a==2&&b==2){
tie++;}
}
bs=n-as-tie;
if(as>bs){printf("A");}
else if(as-bs==0){printf("Tie");}
else if(as<bs){printf("B");}
return 0;
} | 65 |
32,321 | int main(){
int n,x,y,i,a=0,b=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&x,&y);
if((x==0&&y==1)||(x==2&&y==0)||(x==1&&y==2)){
a++;}
if((x==1&&y==0)||(x==0&&y==2)||(x==2&&y==1)){
b++;}}
if(a==b){printf("Tie");}
if(a>b){printf("A");}
if(a<b){printf("B");}
return 0;} | 65 |
32,322 | int main(){
int n,i,a,b,c,j=0,k=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d\n",&a,&b);
c=a-b;
if(c==0){
continue;
}else if(c==-1||c==2){
j++;
}else{
k++;
}
}
if(j>k){
printf("A");
}else if(k>j){
printf("B");
}else if(j==k){
printf("Tie");
}
return 0;
} | 65 |
32,323 | int main()
{
int a,b,i,k,n,m;
scanf("%d",&n);
k=0;
m=0;
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
if(b-a==1)
k=k+1;
if(a-b==2)
k=k+1;
if(a-b==1)
m=m+1;
if(b-a==2)
m=m+1;
}
if(k>m)
printf("A");
if(k<m)
printf("B");
if(k==m)
printf("Tie");
return 0;
} | 65 |
32,324 | int main(){
int i, n, a=0, b=0, kg[300][5];
scanf("%d", &n);
for(i=0;i<n;i++){
scanf("%d%d", &kg[i][0], &kg[i][1]);
if(kg[i][0]==0&&kg[i][1]==1){
a++;
}else if(kg[i][0]==0&&kg[i][1]==2){
b++;
}else if(kg[i][0]==1&&kg[i][1]==0){
b++;
}else if(kg[i][0]==1&&kg[i][1]==2){
a++;
}else if(kg[i][0]==2&&kg[i][1]==0){
a++;
}else if(kg[i][0]==2&&kg[i][1]==1){
b++;
}
}
if(a>b){
printf("A");
}else if(a<b){
printf("B");
}else{
printf("Tie");
}
return 0;
} | 65 |
32,325 | int main(){
int n,i,a=0,b=0;
int A[200],B[200];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&A[i],&B[i]);
int c=A[i]-B[i];
if(c==-1||c==2) a++;
else if(c==1||c==-2) b++;}
if(a>b) printf("A");
else if(a==b) printf("Tie");
else printf("B");
return 0;
} | 65 |
32,326 | int main () {
int n,i,A=0,B=0;
int a[200];
int b[200];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d\n",&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++;
else if((b[i]==0&&a[i]==1)||(b[i]==1&&a[i]==2)||(b[i]==2&&a[i]==0))
B++;
}
if(A>B)
printf("A");
else if(A<B)
printf("B");
else
printf("Tie");
return 0;
} | 65 |
32,327 | int main(){
int n,a,b,c=0,d=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)){
c=c+1;
}else if(a==b){
c=c+0;
d=d+0;
}else{
d=d+1;
}
}
if(c>d){
printf("A");
}
if(c<d){
printf("B");
}
if(c==d){
printf("Tie");
}
return 0;
}
| 65 |
32,328 | int main(){
int n;
scanf("%d",&n);
int a=0;
int b=0;
int i;
for(i=0;i<n;i++){
int p;
int q;
scanf("%d %d",&p,&q);
if(p-q!=0){
if(p-q==-1||p-q==2){
a++;
}
else{
b++;
}
}
}
if(a==b){
printf("Tie");
}
else if(a>b){
printf("A");
}
else{
printf("B");
}
return 0;
} | 65 |
32,329 | int main(){
int n,a[200],b[200],i,c,d,e;
scanf("%d",&n);
c=0;
d=0;
e=0;
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++;
}
else if(((a[i]==1)&&(b[i]==0))||((a[i]==2)&&(b[i]==1))||((a[i]==0)&&(b[i]==2))){
d++;
}
else{
e++;
}
}
if(c>d){
printf("A");
}
else if(c<d){
printf("B");
}
else if(c==d){
printf("Tie");
}
return 0;
}
| 65 |
32,330 | int main(){
int i,n,a[500],b[500],m=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)){
m=m+1;}
else if(a[i]==b[i]){continue;}
else{p=p+1;}
}
if(m>p){printf("A");}
else if(m<p){printf("B");}
else{printf("Tie");}
return 0;
}
| 65 |
32,331 | int main(){
int n,a,b,i;
a=b=i=0;
int sz[2];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&sz[0],&sz[1]);
if(sz[0]==0&&sz[1]==1){a++;}else if
(sz[0]==0&&sz[1]==2){b++;}else if
(sz[0]==1&&sz[1]==0){b++;}else if
(sz[0]==1&&sz[1]==2){a++;}else if
(sz[0]==2&&sz[1]==0){a++;}else if
(sz[0]==2&&sz[1]==1){b++;}
}
if(a>b){printf("A");}
if(a==b){printf("Tie");}
if(a<b){printf("B");}
return 0;
}
| 65 |
32,332 | int main(){
int i,n,a,b,c,A,B;
scanf("%d",&n);
for(a=0,b=0,c=0,i=0;i<n;i++){
scanf("%d %d",&A,&B);
if((A==0)&&(B==1)){
a++;
}
else if((A==1)&&(B==2)){
a++;
}
else if((A==2)&&(B==0)){
a++;
}
else if((A==1)&&(B==0)){
b++;
}
else if((A==2)&&(B==1)){
b++;
}
else if((A==0)&&(B==2)){
b++;
}
else if((B==0)&&(A==0)){
c++;
}
else if((B==1)&&(A==1)){
c++;
}
else if((B==2)&&(A==2)){
c++;
}
//printf("%d-%d ",a,b);
}
//printf("%d %d",a,b);
if(a>b){
printf("A");
}
else if(a==b){
printf("Tie");
}
else if(a<b){
printf("B");
}
return 0;
}
| 65 |
32,333 | int main()
{
int n,i,s[200],z[200],a,b;
a=0;
b=0;
scanf("%d", &n);
for(i=0;i<n;i++){
scanf("%d%d", &s[i], &z[i]);}
for(i=0;i<n;i++){
if(s[i]-z[i]==1) {
b++;}
if(s[i]-z[i]==2) {
a++;}
if(s[i]-z[i]==-1) {
a++;}
if(s[i]-z[i]==-2) {
b++;}
}
if(b>a) {
printf("B");}
else {
if(b<a) {
printf("A");}
else {
printf("Tie");}
}
return 0;
}
| 65 |
32,334 | int main (){
int m,n,s,i,a[200],b[200];
scanf("%d",&n);
s=0;
m=0;
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]==1&&b[i]==0)
s++;
if(a[i]==0&&b[i]==2)
s++;
if(a[i]==2&&b[i]==1)
s++;
if(a[i]==0&&b[i]==1)
m++;
if(a[i]==1&&b[i]==2)
m++;
if(a[i]==2&&b[i]==0)
m++;
}
if(s>m)
printf("B");
if(s==m)
printf("Tie");
if(s<m)
printf("A");
return 0;
}
| 65 |
32,335 | int main()
{
int n,a,b,i,c,d;
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;
}else if(a==0&&b==2){
d=d+1;
}else if(a==1&&b==0){
d=d+1;
}else if(a==1&&b==2){
c=c+1;
}else if(a==2&&b==0){
c=c+1;
}else if(a==2&&b==1){
d=d+1;
}else{
c=c;
d=d;
}
}
if(c>d){
printf("A");
}else if(c<d){
printf("B");
}else{
printf("Tie");
}
return 0;
}
| 65 |
32,336 | 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==0)
y++;
else if(a==0&&b==2)
y++;
else if(a==2&&b==0)
x++;
else if(a==1&&b==2)
x++;
else if(a==2&&b==1)
y++;
}
if(x>y){
printf("A");
}else if(x<y){
printf("B");
}else if(x==y){
printf("Tie");
}
return 0;
} | 65 |
32,337 | int main(){
int n,i,c=0,d=0;
int a[1000],b[1000];
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]==1)||(a[i]-b[i]==-2)) d++;
else ;
}
if(c>d) printf("A");
else if(c<d) printf("B");
else printf("Tie");
return 0;
} | 65 |
32,338 | int main(){
int a,b,x,y,n,i;
scanf("%d",&n);
a=0;
b=0;
for(i=0;i<n;i++){
scanf("%d%d",&x,&y);
if((x-y)*(x-y)==1){
if(x>y){
b++;
}else{
a++;
}
}
if((x-y)*(x-y)==4){
if(x>y){
a++;
}else{
b++;
}
}
}
if(a>b){
printf("A\n");
}
if(a==b){
printf("Tie\n");
}
if(a<b){
printf("B\n");
}
return 0;
} | 65 |
32,339 | int main (){
int n, a[202], b[202], i, j=0, k=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)){j++;}
if(a[i]==b[i]){j++;k++;}
if((a[i]==0&&b[i]==2)||(a[i]==1&&b[i]==0)||(a[i]==2&&b[i]==1)){k++;}
}
if(j>k){printf("A");}else{
if(j<k){printf("B");}else{
printf("Tie");}}
return 0;
}
| 65 |
32,340 | int main(){
int A=0,B=0;
int a,b,n,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(a==0&&b!=0){
if(b==2){
B++;;
}
else
A++;
}
else if(a==2&&b!=2){
if(b==0){
A++;
}
else
B++;
}
else if(a==1&&b!=1){
if(b==0){
B++;
}
else
A++;
}
}
if(A==B){
printf("Tie");
}
else if(A>B){
printf("A");
}
else {
printf("B");
}
return 0;
}
| 65 |
32,341 | int main(){
int n,i,m,a,b,c=0,d=0;
double s,t;
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)) c=c+1;
if ((b==0&&a==1)||(b==1&&a==2)||(b==2&&a==0)) d=d+1;
}
if (c>d) printf("A");
if (c<d) printf("B");
if (c==d) printf("Tie");
return 0;
} | 65 |
32,342 | int main()
{
int n,i,a=0,b=0;
scanf("%d",&n);
int q[n],p[n];
for(i=0;i<n;i++)
{scanf("%d%d",&q[i],&p[i]);
if(q[i]==0&&p[i]==1||(q[i]==1&&p[i]==2)||(q[i]==2&&p[i]==0))a=a+1;
if(p[i]==0&&q[i]==1||(p[i]==1&&q[i]==2)||(p[i]==2&&q[i]==0))b=b+1;
}//printf("%d%d\n",a,b);
if(a>b)printf("A");
if(a<b)printf("B");
if(a==b)printf("Tie");
return 0;
} | 65 |
32,343 | main()
{
int n,a[100],b[100],i,x,y;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&a[i],&b[i]);
}
x=0,y=0;
for(i=0;i<n;i++)
{
if(a[i]==0&&b[i]==1)
x++;
else if(a[i]==0&&b[i]==2)
y++;
else if(a[i]==1&&b[i]==0)
y++;
else if(a[i]==1&&b[i]==2)
x++;
else if(a[i]==2&&b[i]==0)
x++;
else if(a[i]==2&&b[i]==1)
y++;
}
if(x==y) printf("Tie\n");
if(x<y) printf("B\n");
if(x>y) printf("A\n");
} | 65 |
32,344 |
int main()
{ int n,i;
int a,b;
int t=0,m=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(a==b){
t=t+1;
m=m+1;
}else if(((a==0)&&(b==1))||((a==1)&&(b==2))||((a==2)&&(b==0))){
t=t+1;
}else{
m=m+1;
}
}
if(t==m){printf("Tie\n");}else if(t>m){
printf("A\n");}else {printf("B\n");}
return 0;
}
| 65 |
32,345 | int main(){
int n,a[MAX],b[MAX],i,j,k;
k=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
j=a[i]-b[i];
if(j==-1||j==2){
k++;
}else if(j==1||j==-2){
k--;
}else if(j==0){
k=k;
}
}
if(k>0){
printf("A");
}else if(k==0){
printf("Tie");
}else if(k<0){
printf("B");
}
return 0;
} | 65 |
32,346 | int main(){
int a,b,i,n,p=0,q=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&a);
scanf("%d",&b);
if((a-b==1)||(b-a==2)){
q++;
}else if((b-a==1)||(a-b==2)){
p++;
}else if(a==b){
p=p;
q=q;
}
}
if(p>q){
printf("A");
}else if(p<q){
printf("B");
}else if(p==q){
printf("Tie");
}
return 0;
}
| 65 |
32,347 | int main(){
int n,x,y,i,a,b;
scanf("%d",&n);
a=0;b=0;i=0;
while (i<n){
scanf("%d%d",&x,&y);
if ((x==0)&&(y==1)){
a=a+1;
}
else if ((x==0)&&(y==2)){
b=b+1;
}
else if ((x==1)&&(y==0)){
b=b+1;
}
else if ((x==1)&&(y==2)){
a=a+1;
}
else if ((x==2)&&(y==0)){
a=a+1;
}
else if ((x==2)&&(y==1)){
b=b+1;
}
i=i+1;
}
if (a>b) {
printf("A");
}
else if (a<b) {
printf("B");
}
else if (a=b){
printf("Tie");
}
return 0;
}
| 65 |
32,348 | int main()
{
int n,x,y;
scanf("%d",&n);
x=0;
y=0;
int a[200],b[200];
int i;
for(i=1;i<=n;i++)
{
scanf("%d %d",&a[i],&b[i]);
if(a[i]==0)
{
if(b[i]==1)
x=x+1;
if(b[i]==2)
y=y+1;
}
if(a[i]==1)
{
if(b[i]==0)
y=y+1;
if(b[i]==2)
x=x+1;
}
if(a[i]==2)
{
if(b[i]==0)
x=x+1;
if(b[i]==1)
y=y+1;
}
}
if(x==y)
printf("Tie");
if(x<y)
printf("B");
if(x>y)
printf("A");
return 0;
} | 65 |
32,349 | int main(){
int n,i,j,sz[200][2],a,b;
a=0;
b=0;
scanf("%d",&n);
for(i=0;i<n;i++){
for(j=0;j<1;j++){
scanf("%d ",&sz[i][j]);
}
scanf("%d",&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+=1;
}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+=1;
}else{
a+=0;
b+=0;
}
}
if(a<b){
printf("B");
}else if(a==b){
printf("Tie");
}else {
printf("A");
}
return 0;
}
| 65 |
32,350 | int main(){
int a,b,n,i,c=0,d=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(a==0&&b==1){c++;}
if(a==1&&b==2){c++;}
if(a==2&&b==0){c++;}
if(a==1&&b==0){d++;}
if(a==2&&b==1){d++;}
if(a==0&&b==2){d++;}
if((a==0&&b==0)||(a==1&&b==1)||(a==2&&b==2)){continue;}
}
if(c>d){printf("A");}
if(c<d){printf("B");}
if(c==d){printf("Tie");}
return 0;
}
| 65 |
32,351 |
int main(){
int i,n,c=0,f=0;
scanf("%d",&n);
struct ppp{
int a;int b;}p[200];
for(i=0;i<n;i++){
scanf("%d %d",&p[i].a,&p[i].b);}
for(i=0;i<n;i++){
if(((p[i].a==2)&&(p[i].b==0))||((p[i].a==0)&&(p[i].b==1))||((p[i].a==1)&&(p[i].b==2)))
c++;
if(((p[i].a==2)&&(p[i].b==2))||((p[i].a==0)&&(p[i].b==0))||((p[i].a==1)&&(p[i].b==1)))
f++;}
if(c>(n-f-c)) printf("A");
else if(c<(n-f-c)) printf("B");
else printf("Tie");
return 0;}
| 65 |
32,352 | int main(){
int i,n,a[1000],b[1000],q=0,w=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]) q++;
if(a[i]<b[i]){
if(a[i]==0&&b[i]==2) e++;
else w++;
}
if(a[i]>b[i]){
if(a[i]==2&&b[i]==0) w++;
else e++;
}
}
if(e>w) printf("B");
if(e<w) printf("A");
if(e==w) printf("Tie");
return 0;
}
| 65 |
32,353 | int main()
{
int n,i,a,b,av,bv;
av=0;
bv=0;
scanf("%d", &n);
for(i=0;i<n;i++){
scanf("%d%d", &a, &b);
switch (a){
case 0:
if(b==1){
av++;}
if(b==2){
bv++;}
break;
case 1:
if(b==2){
av++;}
if(b==0){
bv++;}
break;
case 2:
if(b==0){
av++;}
if(b==1){
bv++;}
break;
}
}
if(av>bv){
printf("A");}
if(av==bv){
printf("Tie");}
if(av<bv){
printf("B");}
return 0;
}
| 65 |
32,354 | int main(){
int n;
int a[200],b[200];
int s1=0,s2=0;
scanf("%d\n",&n);
int i;
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
if((a[i]==0)&&(b[i]==2))
{s2++;}
else if((a[i]==2)&&(b[i]==0))
{s1++;}
else{
if(a[i]<b[i])
{s1++;}
else if(a[i]>b[i])
{s2++;}
else{
s1++;s2++;}
}}
if(s1>s2)
{printf("A");}
else if(s1<s2)
{printf("B");}
else
{printf("Tie");}
return 0;} | 65 |
32,355 | int main(){
int n,a ,b,s;
s=0;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(b-a==1||a-b==2){
s=s+1;
}else if(a==b){
s=s+0;
}else{
s=s-1;
}
}
if(s>0){
printf("A");
}else if(s==0){
printf("Tie");
}else{
printf("B");
}
return 0;
}
| 65 |
32,356 | int main(){
int n,a=0,b=0,x,y,i;
int sz[200];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&x,&y);
if((x==0&&y==1)||(x==1&&y==2)||(x==2&&y==0)){
sz[i]=1;
}else if((x==0&&y==2)||(x==1&&y==0)||(x==2&&y==1)){
sz[i]=2;
}else{
sz[i]=0;
}
}
for(i=0;i<n;i++){
if(sz[i]==1){
a+=1;
}else if(sz[i]==2){
b+=1;
}
}
if(a>b){
printf("A\n");
}else if(a<b){
printf("B\n");
}else{
printf("Tie\n");
}
return 0;
}
| 65 |
32,357 | int main(){
int n;
scanf("%d",&n);
int i;
int a[n],b[n];
for(i=0;i<n;i++){
scanf("%d %d",&(a[i]),&(b[i]));
}
int c,d;
c=0;
d=0;
for(i=0;i<n;i++){
if(a[i]==0&&b[i]==1){
c++;
}else if(a[i]==0&&b[i]==0){
c++;
d++;
}else if(a[i]==0&&b[i]==2){
d++;
}else if(a[i]==1&&b[i]==0){
d++;
}else if(a[i]==1&&b[i]==1){
c++;
d++;
}else if(a[i]==1&&b[i]==2){
c++;
}else if(a[i]==2&&b[i]==1){
d++;
}else if(a[i]==2&&b[i]==0){
c++;
}else if(a[i]==2&&b[i]==2){
c++;
d++;
}
}
if(c>d){
printf("A");
}else if(c<d){
printf("B");
}else if(c==d){
printf("Tie");
}
return 0;
} | 65 |
32,358 | int main()
{
int n,i,m=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]!=b[i]){
if(a[i]+b[i]==1){
if(a[i]>b[i]){
p++;
}else{
m++;
}
}else if(a[i]+b[i]==3){
if(a[i]>b[i]){
p++;
}else{
m++;
}
}else if(a[i]+b[i]==2){
if(a[i]>b[i]){
m++;
}else{
p++;
}
}
}
}
if(m>p){
printf("A");
}else if(m<p){
printf("B");
}else if(m==p){
printf("Tie");
}
return 0;
}
| 65 |
32,359 |
int main(){
int n,i,a,b,c;
c=0;
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)){
c++;
}else if(a==b){
c+=0;
}else{
c--;
}
}
if(c>0){
printf("A");
}else if(c==0){
printf("Tie");
}else{
printf("B");
}
return 0;
}
| 65 |
32,360 | int main(){
int sz[200],sc[200],n,i,a=0,b=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&sz[i],&sc[i]);
}
for(i=0;i<n;i++){
if(sz[i]==sc[i]-1||sz[i]==sc[i]+2){
a++;}
if(sc[i]==sz[i]-1||sc[i]==sz[i]+2){
b++;}
}
if(a>b){
printf("A");}
if(a<b){
printf("B");}
if(a==b){
printf("Tie");}
return 0;
}
| 65 |
32,361 | int main()
{
int n,a[200][3],i,A=0,B=0,t=0;
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))
{
a[i][2]=1;
continue;
}
else if(a[i][0]==0&&a[i][1]==2)
{
a[i][2]=2;
continue;
}
else if(a[i][0]==1&&a[i][1]==0)
{
a[i][2]=2;
continue;
}
else if(a[i][0]==1&&a[i][1]==2)
{
a[i][2]=1;
continue;
}
else if(a[i][0]==2&&a[i][1]==1)
{
a[i][2]=2;
continue;
}
else if(a[i][0]==2&&a[i][1]==0)
{
a[i][2]=1;
continue;
}
else if(a[i][0]==a[i][1])
{
a[i][2]=3;
continue;
}
}
for(i=0;i<n;i++)
{
if(a[i][2]==1)
{
A++;
continue;
}
else if(a[i][2]==2)
{
B++;
continue;
}
}
if(A>B)
{
printf("A");
}
else if(A<B)
{
printf("B");
}
else if(A==B)
{
printf("Tie");
}
return 0;
}
| 65 |
32,362 | int main(){
int n,i,a,b,as=0,bs=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(a==0&&b==1){
as+=1;
}else if(a==0&&b==2){
bs+=1;
}else if(a==0&&b==0){
}else if(a==1&&b==0){
bs+=1;
}else if(a==1&&b==1){
}else if(a==1&&b==2){
as+=1;
}else if(a==2&&b==0){
as+=1;
}else if(a==2&&b==1){
bs+=1;
}else{
}
}
if(as>bs){
printf("A");
}else if(as<bs){
printf("B");
}else{
printf("Tie");
}
return 0;
} | 65 |
32,363 | int main(){
int n,i,j,w=0,l=0;
scanf("%d\n",&n);
int sz[n][2];
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]==0)||(sz[i][0]==1&&sz[i][1]==1)||(sz[i][0]==2&&sz[i][1]==2)){
w=w;
l=l;
}
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)){
w=w+1;
l=l;
}
else if((sz[i][0]==0&&sz[i][1]==2)||(sz[i][0]==1&&sz[i][1]==0)||(sz[i][0]==2&&sz[i][1]==1)){
w=w;
l=l+1;
}
}
if(w>l){
printf("A");
}
else if(w<l){
printf("B");
}
else if(w==l){
printf("Tie");
}
return 0;
} | 65 |
32,364 | main()
{
int n,a[200],b[200];
int i,x=0,y=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
scanf("%d",&b[i]);
}
for(i=0;i<n;i++)
{
if(a[i]!=b[i])
{
if(a[i]==0&&b[i]==1)
x+=1;
else if(a[i]==1&&b[i]==2)
x+=1;
else if(a[i]==2&&b[i]==0)
x+=1;
else
y+=1;
}
}
if(x>y) printf("A");
else if(x<y) printf("B");
else printf("Tie");
} | 65 |
32,365 | main()
{
int n;
int i;
scanf("%d",&n);
int a[n],b[n];
int s=0,t=0;
for(i=0;i<n;i++)
{
scanf("%d%d",&a[i],&b[i]);
if(a[i]-b[i]==1||b[i]-a[i]==2)
t++;
else if(a[i]==b[i])
{s++;t++;}
else
s++;
}
if(s>t)
printf("A\n");
else if (s==t)
printf("Tie\n");
else
printf("B\n");
} | 65 |
32,366 | int main()
{
int a[200],b[200],i,j,n,r,s,t;
r=0;
s=0;
t=0;
scanf("%d\n",&n);
for(i=0,j=0;i<n,j<n;i++,j++)
{
scanf("%d%d",&a[i],&b[j]);
}
for(i=0,j=0;i<n;i++,j++)
{
if((a[i]==0&&b[j]==1)||(a[i]==1&&b[j]==2)||(a[i]==2&&b[j]==0))
{
r++;
}
if(a[i]==b[j])
{
s++;
}
if((b[j]==0&&a[i]==1)||(b[j]==1&&a[i]==2)||(b[j]==2&&a[i]==0))
{
t++;
}
}
if(r>t)
{
printf("A");
}
if(t>r)
{
printf("B");
}
if(r==t)
{
printf("Tie");
}
return 0;
} | 65 |
32,367 | int main()
{
int a[200],b[200],n,i,x,y;
x=0;
y=0;
scanf("%d\n",&n);
if(n<=0||n>+200){
return 0;
}
else {
for(i=0;i<n;i++){
scanf("%d %d",&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]==b[i]){
x++;
y++;
}
else{
y++;
}
}
if(x>y){
printf("A");
}
if(x<y){
printf("B");
}
if(x==y){
printf("Tie");
}
}
return 0;
}
| 65 |
32,368 | int main(){
int n;
int r[200],e[200];
int i,a=0,b=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&r[i],&e[i]);
if((r[i]==0&&e[i]==1)||(r[i]==1&&e[i]==2)||(r[i]==2&&e[i]==0)){
a++;}
else if((e[i]==0&&r[i]==1)||(e[i]==1&&r[i]==2)||(e[i]==2&&r[i]==0)){
b++;}
}
if(a>b){printf("A");};
if(a<b){printf("B");};
if(a==b){printf("Tie");};
return 0;
} | 65 |
32,369 | int main(){
int n,sz[1000],s[1000],i=0,m=0,l=0,k=0;
scanf("%d",&n);
struct cui{
int x;
int y;
} cui[300];
for(i=0;i<n;i++){
scanf("%d%d",&cui[i].x,&cui[i].y);
}
m=0;
for(i=0;i<n;i++){
if(cui[i].x==cui[i].y){
m=m+1;
}
if(cui[i].x==0){
if(cui[i].y==1){
k=k+1;
}
else if(cui[i].y==2){l=l+1;}
}
else if(cui[i].x==1){
if(cui[i].y==0){l=l+1;}
else if(cui[i].y==2){k=k+1;}
}
else if(cui[i].x==2){
if(cui[i].y==0){k=k+1;}
else if(cui[i].y==1){l=l+1;}
}}
if(k>l){
printf("A");
}
else if(l>k){
printf("B");
}
else if(l=k){
printf("Tie");
}
return 0;
} | 65 |
32,370 | int main (){
int n,a,b,c,h=0,k=0;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d %d",&a,&b);
c=a-b;
if(c==1){
k++;
}else if(c==2){
h++;
}else if(c==-1){
h++;
}else if(c==-2){
k++;
}else if(c==0){
h++;
k++;
}
}
if(h<k){
printf("B");
}else if(h>k){
printf("A");
}else if(h==k){
printf("Tie");
}
return 0;
}
| 65 |
32,371 | int main(){
int n,p=0,q=0,a[200],b[200],i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]==b[i]-1)
p++;
else if(a[i]==0&&b[i]==2)
q++;
else if(b[i]==a[i]-1)
q++;
else if(b[i]==0&&a[i]==2)
p++;
}
if(p>q)
printf("A");
else if(p<q)
printf("B");
else
printf("Tie");
return 0;
}
| 65 |
32,372 | int main()
{
int n,a[200],b[200],c,d,i;
scanf("%d",&n);
c=0;
d=0;
for(i=0;i<n;i++)
{
scanf("%d%d",&a[i],&b[i]);
if(a[i]==0&&b[i]==1)
{
c++;
}
if(a[i]==0&&b[i]==2)
{
d++;
}
if(a[i]==1&&b[i]==2)
{
c++;
}
if(a[i]==1&&b[i]==0)
{
d++;
}
if(a[i]==2&&b[i]==0)
{
c++;
}
if(a[i]==2&&b[i]==1)
{
d++;
}
}
if(c>d)
{
printf("A");
}
if(c<d)
{
printf("B");
}
if(c==d)
{
printf("Tie");
}
return 0;
}
| 65 |
32,373 | int main(){
int n,a=0,b=0,x[200],y[200];
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d%d",&(x[i]),&(y[i]));
if(y[i]-x[i]==1||x[i]-y[i]==2){
a++;
}else if(x[i]-y[i]==1||y[i]-x[i]==2){
b++;
}else if(x[i]==y[i]){
continue;
}
}
if(a==b){
printf("Tie");
}else if(a>b){
printf("A");
}else if(a<b){
printf("B");
}
return 0;
}
| 65 |
32,374 | int main(){
int n, i, a[1]={0}, b[1]={0}, m, k, c, d;
scanf("%d", &n);
for(i=0;i<n;i++){
scanf("%d%d", &m, &k);
if(m==0&&k==1){
a[0]++;
}
if(m==1&&k==0){
b[0]++;
}
if(m==1&&k==2){
a[0]++;
}
if(m==2&&k==1){
b[0]++;
}
if(m==0&&k==2){
b[0]++;
}
if(m==2&&k==0){
a[0]++;
}
if(m==k){
a[0]++;
b[0]++;
}
}
c=a[0];
d=b[0];
if(c>d){
printf("A");
}
if(c<d){
printf("B");
}
if(c==d){
printf("Tie");
}
return 0;
} | 65 |
32,375 | int main(){
int n,i;
int a,b,x=0;
scanf("%d\n",&n);
for(i=0;i<n;i++){
scanf("%d %d\n",&a,&b);
if((a==0&&b==0)||(a==1&&b==1)||(a==2&&b==2))
x=x;
else if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0))
x++;
else
x--;
}
if(x==0)
printf("Tie");
else if(x>=0)
printf("A");
else
printf("B");
return 0;
} | 65 |
32,376 | int main(){
int sz[1000][3];
int n,a,b;
int i;
int 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]);
}
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]==0&&sz[i][1]==0){
a=a;
}else if(sz[i][0]==1&&sz[i][1]==0){
b++;
}else if(sz[i][0]==1&&sz[i][1]==1){
a=a;
}else if(sz[i][0]==1&&sz[i][1]==2){
a++;
}else if(sz[i][0]==2&&sz[i][1]==0){
a++;
}else if(sz[i][0]==2&&sz[i][1]==1){
b++;
}else{
b=b;
}
}
if(a>b){
printf("A");
}else if(a<b){
printf("B");
}else{
printf("Tie");
}
return 0;
}
| 65 |
32,377 | int main()
{
int n,i,a[200],b[200],x,y;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&a[i] ,&b[i]);
}
x=0;
y=0;
for(i=0;i<n;i++)
{
if(a[i]-b[i]==-1||a[i]-b[i]==2)
x++;
if(a[i]-b[i]==1||a[i]-b[i]==-2)
y++;
}
if(x>y)
printf("A");
if(x<y)
printf("B");
if(x==y)
printf("Tie");
return 0;
}
| 65 |
32,378 | int main ()
{
int n,a=0,b=0,c;
scanf("%d",&n);
int sz[n][2];
for (int i=0;i<n;i++)
{
scanf("%d%d\n",&sz[i][0],&sz[i][1]);
c=sz[i][0]-sz[i][1];
if(c==-1||c==2)
{
a++;
}
if(c==1||c==-2)
{
b++;
}
}
if(a>b)
{
printf("A");
}
if(a<b)
{
printf("B");
}
if(a==b)
{
printf("Tie");
}
return 0;
}
| 65 |
32,379 | int main(){
int n,i;
scanf("%d",&n);
int a[200],b[200];
int h=0,k=0;
for(i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
if(a[i]==0&&b[i]==1) h++;
if(a[i]==0&&b[i]==2) k++;
if(a[i]==1&&b[i]==2) h++;
if(a[i]==1&&b[i]==0) k++;
if(a[i]==2&&b[i]==0) h++;
if(a[i]==2&&b[i]==1) k++;
}
if(h>k) printf("A\n");
if(h<k) printf("B\n");
if(h==k) printf("Tie\n");
return 0;
}
| 65 |
32,380 | int main(){
int n,i,a[100],b[100],c=0,d=0;
scanf("%d",&n);
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]){
continue;
}else{
d++;
}
}
if(c>d){
printf("A");
}
if(c<d){
printf("B");
}
if(c==d){
printf("Tie");
}
return 0;
} | 65 |
32,381 | int main(){
int n,a,b,c=0,d=0;
scanf("%d\n",&n);
for(int i=1;i<=n;i++){
scanf("%d%d",&a,&b);
if(a-b==1){d=d+1;}else if(a-b==-1){
c=c+1;}else if(a-b==-2){
d=d+1;}else if(a-b==2){
c=c+1;}else if(a=b){
c=c;d=d;}}
if(c>d){printf("A");}else if(c==d){
printf("Tie");}else if(c<d){printf("B");}
return 0;
}
| 65 |
32,382 |
int main()
{
int n,a,b,suma,sumb,i;
scanf("%d",&n);
suma=0;sumb=0;
for (i=0;i<n;i++)
{
scanf("%d%d",&a,&b);
if ((b-a==1) || (a-b==2)) {suma++;}
if ((a-b==1) || (b-a==2)) {sumb++;}
}
if (suma>sumb) {printf("A");}
else if (suma==sumb) {printf("Tie");}
else {printf("B");}
return 0;
}
| 65 |
32,383 | int main()
{
int a,b,i,n=0,m=0,l;
scanf("%d\n",&l);
for(i=0;i<l;i++)
{
scanf("%d %d\n",&a,&b);
if((a-b==-1)||(a-b==2))
{m++;}
if((b-a==-1)||(b-a==2))
{n++;}
}
if(m==n){printf("Tie");}
if(m>n){printf("A");}
if(m<n){printf("B");}
}
| 65 |
32,384 | int main(){
int n,i,j;
int caiquan[max][2]={0};
scanf("%d",&n);
for(i=0;i<n;i++){
for(j=0;j<2;j++){
scanf("%d",&caiquan[i][j]);
}
}
int a=0,b=0;
for(i=0;i<n;i++){
if((caiquan[i][0]==0&&caiquan[i][1]==1)||(caiquan[i][0]==1&&caiquan[i][1]==2)||(caiquan[i][0]==2&&caiquan[i][1]==0)){a++;}
if((caiquan[i][1]==0&&caiquan[i][0]==1)||(caiquan[i][1]==1&&caiquan[i][0]==2)||(caiquan[i][1]==2&&caiquan[i][0]==0)){b++;}
}
if(a>b){printf("A\n");}else if(a<b){printf("B\n");}else if(a=b){printf("Tie\n");}
return 0;
}
| 65 |
32,385 | int cai(int a,int b)
{
if(a==b)
return 2;
if(a==0&&b==1)
return 1;
if(a==0&&b==2)
return 0;
if(a==1&&b==0)
return 0;
if(a==1&&b==2)
return 1;
if(a==2&&b==0)
return 1;
if(a==2&&b==1)
return 0;
}
main()
{
int n;
scanf("%d",&n);
int a[200],b[200];
int i,j,k;
j=0;k=0;
for(i=0;i<n;i++)
scanf("%d %d",&a[i],&b[i]);
for(i=0;i<n;i++)
{
if(cai(a[i],b[i])==1)
j++;
if(cai(a[i],b[i])==0)
k++;
}
if(j==k)
printf("Tie");
else if(j>k)
printf("A");
else
printf("B");
}
| 65 |
32,386 | main()
{
int a,b,c,n,m,A,B;
int x[210][2];
scanf("%d",&n);
for(a=0;a<=n-1;a++)
scanf("%d %d",&x[a][0],&x[a][1]);
A=0;
B=0;
for(a=0;a<=n-1;a++)
{
if((x[a][0]==(x[a][1]+1))||(x[a][0]==(x[a][1]-2)))
B++;
else if((x[a][0]==(x[a][1]-1))||(x[a][0]==(x[a][1]+2)))
A++;
else;
}
if(A>B)
printf("A");
else if(A<B)
printf("B");
else
printf("Tie");
}
| 65 |
32,387 | int main(){
int n,time[200][2],A=0,B=0;
scanf("%d",&n);
for(int a=0;a<n;a++){
scanf("%d %d",&(time[a][0]),&(time[a][1]));
}
for(int a=0;a<n;a++){
if((time[a][0]==0&&time[a][1]==2)){
B++;
}
if(time[a][0]>time[a][1]&&(time[a][0]!=2||time[a][1]!=0)){
B++;
}
if((time[a][1]==0&&time[a][0]==2)){
A++;
}
if(time[a][1]>time[a][0]&&(time[a][1]!=2||time[a][0]!=0)){
A++;
}
}
if(A==B){printf("Tie");}
if(A>B){printf("A");}
if(A<B){printf("B");}
return 0;
} | 65 |
32,388 | int main(){
int i,n,a[200],b[200],y=0,k=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
if(a[i]==0){
if(b[i]==0){
y++;
k++;
}else if(b[i]==1){
y++;
}else if(b[i]==2){
k++;
}
}else if(a[i]==1){
if(b[i]==0){
k++;
}else if(b[i]==1){
y++;
k++;
}else if(b[i]==2){
y++;
}
}else if(a[i]==2){
if(b[i]==0){
y++;
}else if(b[i]==1){
k++;
}else if(b[i]==2){
y++;
k++;
}
}
}
if(y>k)
printf("A");
else if(y==k)
printf("Tie");
else if(y<k)
printf("B");
return 0;
} | 65 |
32,389 | int main(){
int n,a,b;
int B=0;
int A=0;
int h[200][2];
scanf("%d",&n);
for(a=0;a<n;a++){
scanf("%d%d",&h[a][0],&h[a][1]);
}
for(b=0;b<n;b++){
if(h[b][0]==0&&h[b][1]==1){
A+=1;
}else if(h[b][0]==1&&h[b][1]==2){
A+=1;
}else if(h[b][0]==2&&h[b][1]==0){
A+=1;
}else if(h[b][1]==0&&h[b][0]==1){
B+=1;
}else if(h[b][1]==1&&h[b][0]==2){
B+=1;
}else if(h[b][1]==2&&h[b][0]==0){
B+=1;
}
}
if(A>B){
printf("A");
}else if(B>A){
printf("B");
}else if(B==A){
printf("Tie");
}
return 0;
} | 65 |
32,390 | int main(){
int n,i;
int a[201],b[201];
int c=0,d=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&&b[i]==1){
c++;}
else if(a[i]==0&&b[i]==2){
d++;}
else if(a[i]==1&&b[i]==0){
d++;}
else if(a[i]==1&&b[i]==2){
c++;}
else if(a[i]==2&&b[i]==0){
c++;}
else if(a[i]==2&&b[i]==1){
d++;}
}
if(c==d){
printf("Tie");}
if(c>d){
printf("A");}
if(c<d){
printf("B");}
return 0;
} | 65 |
32,391 | int main(){
int n,x,y;
x=0;
y=0;
scanf("%d\n",&n);
for(int i=0;i<n;i++){
int a,b;
a=0;
b=0;
scanf("%d %d\n",&a,&b);
if(a==1&&b==0){y++;}
else if(a==2&&b==1){y++;}
else if(a==0&&b==1){x++;}
else if(a==1&&b==2){x++;}
else if(a==2&&b==0){x++;}
else if(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,392 | int main(){
int a,b,n,i,k=0,p=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
if(a==0&&b==1){k++;}
else if(a==1&&b==2){k++;}
else if(a==2&&b==0){k++;}
else if(a==b){p++;}
}
if(k>1.0*(n-p)/2){printf("A");}
else if(k<1.0*(n-p)/2){printf("B");}
else{printf("Tie");}
return 0;
}
| 65 |
32,393 | int win=0;
void jzb(int a,int b)
{
if(a==0)
{
if(b==1) win++;
else if(b==2) win--;
}
else if(a==1)
{
if(b==2) win++;
else if(b==0) win--;
}
else if(a==2)
{
if(b==0) win++;
else if(b==1) win--;
}
}
int main()
{
int t,a,b,i;
scanf("%d",&t);
for(i=0;i<t;i++)
{
scanf("%d%d",&a,&b);
jzb(a,b);
}
if(win>0) printf("A");
else if(win<0) printf("B");
else if(win==0) printf("Tie");
}
| 65 |
32,394 | int main(){
int n;
scanf("%d",&n);
int a[200]={0};
int b[200]={0};
int i;
int wina=0,winb=0;
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){
wina++;
}
else if(a[i]==1&&b[i]==0||a[i]==2&&b[i]==1||a[i]==0&&b[i]==2){
winb++;
}
}
if(wina>winb){printf("A");}
else if(wina<winb){printf("B");}
else if(wina=winb){printf("Tie");}
return 0;
}
| 65 |
32,395 | int main(){
int n,a,b,i,sz[300],s,num;
s=0;
scanf("%d\n",&n);
for(i=0;i<n;i++){
scanf("%d %d\n",&a,&b);
if(a==b){
num=0;}
if((a==0&&b==1)||(a==1&&b==2)||(a==2&&b==0)){
num=1;}
if((b==0&&a==1)||(b==1&&a==2)||(b==2&&a==0)){
num=-1;}
s=s+num;}
if(s==0){
printf("Tie");}
if(s>0){
printf("A");}
if(s<0){
printf("B");}
return 0;
} | 65 |
32,396 | int main()
{
int n,i,x,y;
x=0;
y=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){
x++;
} if(a[i]==0&&b[i]==2){
y++;
}if(a[i]==1&&b[i]==2){
x++;
}if(a[i]==1&&b[i]==0){
y++;
}if(a[i]==2&&b[i]==0)
{x++;
}if(a[i]==2&&b[i]==1){
y++;}
}
if(x>y){
printf("A");}
else if(x==y){
printf("Tie");}
else if(x<y){
printf("B");}
return 0;
}
| 65 |
32,397 | int main()
{
int n,s[2]={0};
scanf("%d",&n);
while(n--)
{
int a,b;
scanf("%d %d",&a,&b);
if(a==0&&b==1) s[0]++;
if(a==1&&b==2) s[0]++;
if(a==2&&b==0) s[0]++;
if(b==0&&a==1) s[1]++;
if(b==1&&a==2) s[1]++;
if(b==2&&a==0) s[1]++;
}
if(s[0]==s[1]) printf("Tie\n");
else if(s[0]>s[1]) printf("A\n");
else printf("B\n");
}
| 65 |
32,398 | int main (){
int n,i,c=0,d=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)||(a[i]==1&&b[i]==2)||(a[i]==2&&b[i]==0)){
c++;
}
if((b[i]==0&&a[i]==1)||(b[i]==1&&a[i]==2)||(b[i]==2&&a[i]==0)){
d++;
}
}
if(c>d){
printf("A");
}
if(c==d){
printf("Tie");
}
if(c<d){
printf("B");
}
return 0;
}
| 65 |
32,399 | int main(){
int n;
int sz[200][2];
int 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]==sz[i][1]){
a++;
b++;
}
if(sz[i][0]>=sz[i][1]){
if(sz[i][0]==2&&sz[i][1]==0)
a++;
else
b++;
}
if(sz[i][0]<=sz[i][1]){
if(sz[i][0]==0&&sz[i][1]==2)
b++;
else
a++;
}
}
if(a>b){
printf("A");
}
if(a==b){
printf("Tie");
}
if(a<b){
printf("B");
}
return 0;
}
| 65 |