#include<stdio.h>
#include<string.h>
int main(){
int num,i,draw=0,A_winsC=0,A_winsJ=0,A_winsB=0,B_winsC=0,B_winsJ=0,B_winsB=0;
int AW=0,AF=0,BW=0,BF=0;
char c1,c2;
scanf("%d",&num);
for(i=0;i<num;i++){
scanf(" %c %c",&c1,&c2);
if(c1==c2){
draw++;
}else if(c1=='C'&c2=='J'){
A_winsC++;
}else if(c1=='J'&c2=='B'){
A_winsJ++;
}else if(c1=='B'&c2=='C'){
A_winsB++;
}else if(c2=='C'&c1=='J'){
B_winsC++;
}else if(c2=='J'&c1=='B'){
B_winsJ++;
}else if(c2=='B'&c1=='C'){
B_winsB++;
}
}
AW=A_winsC+A_winsJ+A_winsB;
AF=num-draw-AW;
BW=B_winsC+B_winsJ+B_winsB;
BF=num-draw-BW;
printf("%d %d %d\n",AW,draw,AF);
printf("%d %d %d\n",BW,draw,BF);
//printf("%d %d %d\n",A_winsC,A_winsJ,A_winsB);
if(A_winsC>=A_winsJ&&A_winsC>A_winsB){
printf("%c ",'C');
}else if(A_winsJ>A_winsB){
printf("%c ",'J');
}else{
printf("%c ",'B');
}
if(B_winsC>=A_winsJ&&B_winsC>A_winsB){
printf("%c",'C');
}else if(B_winsJ>B_winsB){
printf("%c",'J');
}else{
printf("%c",'B');
}
return 0;
}
pat1018
最新推荐文章于 2024-11-17 09:45:06 发布