题目
思路
这道题没什么难的,凑个数吧,嘿嘿,就是判断每一轮谁赢就可以了
代码
#include <iostream>
using namespace std;
int main(){
int cnt=0, J=0, Y=0;
cin >> cnt;
while(cnt){
cnt--;
int a1,a2,b1,b2;
cin >> a1 >> a2 >> b1 >> b2;
//甲赢
if(a2 == (a1+b1) && b2 != (a1+b1)){
++Y;
}
//乙赢
else if(b2 == (a1+b1) && a2 != (a1+b1))
++J;
}
cout << J << " " << Y;
return 0;
}