Description Title -> Link
Thinking
- According to the meaning of the questions you can, lose judgment with the same attention to win.
Code
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <iostream>
using namespace std;
int main(){
int jia1,jia2,yi1,yi2,n;
scanf("%d",&n);
int jiahe=0,yihe=0;
for(int i=0;i<n;i++){
scanf("%d%d%d%d",&jia1,&jia2,&yi1,&yi2);
if((jia1+yi1==jia2)&&(jia1+yi1!=yi2)) yihe++;
else if((jia1+yi1==yi2)&&(jia1+yi1!=jia2)) jiahe++;
else continue;
}
printf("%d %d\n",jiahe,yihe);
}