QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#876377#10022. Jumping GameasdfsdfWA 0ms3712kbC++231.3kb2025-01-30 20:23:572025-01-30 20:23:58

Judging History

This is the latest submission verdict.

  • [2025-01-30 20:23:58]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3712kb
  • [2025-01-30 20:23:57]
  • Submitted

answer

#ifdef _MSC_VER
#  include <intrin.h>
#  define __builtin_popcount __popcnt
#endif
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2,fma")
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef long double ld;
#define MAX 569
#define MAXS 20
#define BMAX 35
#define MOD 998244353
#define INF 1'000'100'000
#define TC 1
#define ln '\n'
#define bb ' '
void solve() {
	int H, W, r, c;
	cin >> H >> W >> r >> c;
	if (H > W) {
		swap(H, W);
		swap(r, c);
	}
	if (H == 1) {
		cout << "Brahma" << ln;
		return;
	}
	if (H == 2) {
		int l = (c - 1) / 2;
		int r = (W - c) / 2;
		if ((l & 1) || (r & 1)) cout << "Annapurna" << ln;
		else cout << "Brahma" << ln;
		return;
	}
	if (H == 3 && W == 3) {
		if (r == 2 && c == 2) cout << "Brahma" << ln;
		else cout << "Annapurna" << ln;
		return;
	}
	if (H == 3 && W == 5) {
		int c1, c2;
		c1 = r == 1 || r == H;
		c2 = c == 1 || c == W;
		if (c1 && c2) cout << "Brahma" << ln;
		else cout << "Annapurna" << ln;
		return;
	}
	cout << "Brahma" << ln;
}
signed main() {
	ios::sync_with_stdio(false), cin.tie(0);
	int T;
	cin >> T;
	while (T--) solve();
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3712kb

input:

2
6 6 6 6
7 19 7 3

output:

Brahma
Brahma

result:

wrong answer 1st words differ - expected: 'Annapurna', found: 'Brahma'