結果
| 問題 | No.3484 Just a Maze Game |
| コンテスト | |
| ユーザー |
まぬお
|
| 提出日時 | 2026-03-27 22:24:34 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,018 bytes |
| 記録 | |
| コンパイル時間 | 153 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 81,792 KB |
| 最終ジャッジ日時 | 2026-03-27 22:24:51 |
| 合計ジャッジ時間 | 3,051 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 19 WA * 5 |
ソースコード
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right
from itertools import permutations, combinations, groupby
from heapq import heappop, heappush
import math, sys
input = lambda: sys.stdin.readline().rstrip("\r\n")
def printl(li, sep=" "): print(sep.join(map(str, li)))
def yn(flag): print(Yes if flag else No)
_int = lambda x: int(x)-1
MOD = 998244353 #10**9+7
INF = 1<<60
Yes, No = "Alice", "Bob"
for _ in range(int(input())):
N, M, B, W = map(int, input().split())
if N > M: N, M = M, N
ans = No
if N >= 2 and M >= 2:
d = 2
while d*d <= W:
if d > N: break
e = -(-W/d)
if e <= M:
m = W%d
if e-1 >= 2 and m >= 2:
ans = Yes
break
d += 1
if W > 3:
if B <= (N-2)*(M-2):
ans = Yes
else:
k = B-(N-2)*(M-2)
if k&1 == 0: ans = Yes
print(ans)
まぬお