牛客练习赛7 A 骰⼦的游戏

直接暴力


#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define PI acos(-1.0)
#define in freopen("in.txt", "r", stdin)
#define out freopen("out.txt", "w", stdout)
#define kuaidian ios::sync_with_stdio(0);
 
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int maxn = 1e6 + 7, maxd = 1e8;
const ll mod = 1e9 + 7;
const int INF = 0x7f7f7f7f;
 
int a[9], b[9];
 
int main() {
 
    int T;
    scanf("%d", &T);
    for(int tt = 0; tt < T; ++tt) {
        for(int i = 0; i < 6; ++i)
            scanf("%d", &a[i]);
        for(int i = 0; i < 6; ++i)
            scanf("%d", &b[i]);
        int t1 = 0, t2 = 0;
        for(int i = 0; i < 6; ++i) {
            for(int j = 0; j < 6; ++j) {
                if(a[i] > b[j]) t1++;
                else if(a[i] < b[j]) t2++;
            }
        }
 
        if(t1 == t2) puts("Tie");
        else if(t1 > t2) puts("Alice");
        else puts("Bob");
    }
 
    return 0;
}


你可能感兴趣的:(牛客练习赛7 A 骰⼦的游戏)