#include<iostream>
using namespace std;
int main(){
int i,a,b,N,Ahan[100],Ahua[100],Bhan[100],Bhua[100],sumA=0,sumB=0;
cin>>a>>b;
cin>>N;
for(i=0;i<N;i++){
cin>>Ahan[i]>>" ">>Ahua[i]>>" ">>Bhan[i]>>" ">>Bhua[i];
}
for(i=0;i<N;i++){
if((Ahua[i]==(Ahan[i]+Bhan[i]))&&(Bhua[i]==(Ahan[i]+Bhan[i])))
continue;
if(Ahua[i]==(Ahan[i]+Bhan[i])){
sumA++;
a--;
if(a<0){
cout<<"A"<<endl;
cout<<sumB;
break;
}
}
else if (Bhua[i]==(Ahan[i]+Bhan[i])){
sumB++;
b--;
if(b<0){
cout<<"B"<<endl;
cout<<sumA;
break;
}
}
}
return 0;
}
请问这个代码是哪里有问题导致总是执行错误呢?求解