QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#876377 | #10022. Jumping Game | asdfsdf | WA | 0ms | 3712kb | C++23 | 1.3kb | 2025-01-30 20:23:57 | 2025-01-30 20:23:58 |
Judging History
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'