作者:yunjinqi 类别:
日期:2023-05-31 11:50:12
阅读:457 次 消耗积分:0 分
#include <stdio.h>
int main(){
int a,b,N;
int j_han,j_hua,y_han,y_hua;
int j_d=0,y_d=0;
if (scanf("%d %d",&a,&b)!=EOF){
// 分析不敲钟的时间
if (scanf("%d",&N)!=EOF){
//printf("a = %d b = %d N = %d",a,b,N);
for (int i=0;i<N;i++){
if (scanf("%d %d %d %d",&j_han,&j_hua,&y_han,&y_hua)!=EOF){
if (j_hua == j_han+y_han && y_hua != j_han+y_han){a--;j_d++;}
if (j_hua != j_han+y_han && y_hua == j_han+y_han){b--;y_d++;}
}
if (a<0){printf("A\n");printf("%d",y_d);break;}
if (b<0){printf("B\n");printf("%d",j_d);break;}
}
}else{
printf("input n wrong");
}
}
else{
printf("input wrong");
}
return 0;
}