ARC 171

https://atcoder.jp/contests/arc171

A. No Attacking

https://atcoder.jp/contests/arc171/tasks/arc171_a

void solve() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    auto cal = []() -> void {
        ll N, A, B;
        cin >> N >> A >> B;

        bool ans = true;
        if (A > N) ans = false;

        // ポーンは奇数行目、ルークは偶数行目に置くのが最適
        // ルークを偶数行目においてもまだ余っている場合は奇数行目におく
        // 開いてる行数 * (N-A) が B 以上であれば良い配置にできる。そうでなければできない。
        ll mx = (N + 1) / 2 * (N - A);
        if (A > N / 2) {
            mx -= (A - N / 2) * (N - A);
        }
        yesno(ans && B <= mx);
    };

    int t;
    cin >> t;
    rep(i, t) cal();
}

B. Chmax

https://atcoder.jp/contests/arc171/tasks/arc171_b

C. Swap on Tree

https://atcoder.jp/contests/arc171/tasks/arc171_c

D. Rolling Hash

https://atcoder.jp/contests/arc171/tasks/arc171_d

E. Rookhopper’s Tour

https://atcoder.jp/contests/arc171/tasks/arc171_e

F. Both Reversible

https://atcoder.jp/contests/arc171/tasks/arc171_f