https://pintia.cn/problem-sets/994805260223102976/problems/994805277847568384
#include <iostream>
using namespace std;
int main(){
int n, j_lose = 0, y_lose = 0, a, b, c, d;
cin >> n;
for(int i = 0; i < n; i++){
cin >> a >> b >> c >> d;
if(b == a+c && b != d)
y_lose++;
if(d == a+c && d != b)
j_lose++;
}
cout << j_lose << " " << y_lose;
return 0;
}
这是一个简单的C++程序,用于根据输入的四个整数判断比赛的胜负情况。程序接收比赛轮次的数量,然后对于每一轮比赛输入四个整数,分别代表甲队的得分、乙队的得分及裁判A和裁判B的评分。根据裁判评分来决定本轮比赛中哪一方获胜,并累计胜利次数。
2961

被折叠的 条评论
为什么被折叠?



