【題解】AtCoder ABC 059D – Alice&Brown

【題目敘述】https://atcoder.jp/contests/abc059/tasks/arc072_b
【解題想法】Nim Game,打表觀察找出pattern

#include <iostream>
using namespace std;

long long x, y;

int main() {
    cin >> x >> y;
    if (abs(x-y) <= 1) cout << "Brown\n";
    else cout << "Alice\n";
}

分享本文 Share with friends