import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(bf.readLine());
String[][] str = new String[n][4];
int cup1 = 0, cup2 = 0;
StringBuffer sb=new StringBuffer("");
for (int i = 0; i < n; i++) {
str[i] = bf.readLine().split(" ");
int sum = Integer.parseInt(str[i][0]) + Integer.parseInt(str[i][2]);
if (Integer.parseInt(str[i][1]) == sum && Integer.parseInt(str[i][3]) == sum) {
continue;
} else if (Integer.parseInt(str[i][1]) != sum && Integer.parseInt(str[i][3]) == sum) {
cup1++;
} else if (Integer.parseInt(str[i][1]) == sum && Integer.parseInt(str[i][3]) != sum) {
cup2++;
}
}
System.out.println(cup1+" "+cup2);
}
}
PAT_B_1046_Java(15分)
最新推荐文章于 2021-03-04 22:50:19 发布