1046 划拳 (15 分)
#include <iostream> using namespace std; int main(){ int n, A, a, cntA = 0, B, b, cntB = 0; cin >> n; while (n--){ cin >> A >> a >> B >> b; if ((a != A + B && b != A + B) || (a == A + B && b == A + B)) continue; else if (a == A + B) cntB++; else if (b == A + B) cntA++; } cout << cntA << ' ' << cntB << endl; return 0; }