题解 | 纸牌游戏
纸牌游戏
https://www.nowcoder.com/practice/74f915e366094b19b94334de8b68e733
C++
#include <iostream> using namespace std; int main() { int t, a1, a2, b1, b2; cin >> t; while (t--) { cin >> a1 >> a2 >> b1 >> b2; int aw=0; if (a1>b1 && a2>=b2 || a2>b2 && a1>=b1) aw+=2; if (a1>b2 && a2>=b1 || a2>b1 && a1>=b2) aw+=2; cout << aw << endl; } } // 64 位输出请用 printf("%lld")