結果
| 問題 | No.2493 K-th in L2 with L1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-06-03 09:47:32 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 572 bytes |
| 記録 | |
| コンパイル時間 | 268 ms |
| コンパイル使用メモリ | 85,004 KB |
| 実行使用メモリ | 53,596 KB |
| 最終ジャッジ日時 | 2026-06-03 09:47:35 |
| 合計ジャッジ時間 | 1,590 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 4 |
ソースコード
Q = int(input())
for _ in range(Q):
D,K = map(int, input().split())
if D==0:
if K==1:
print("Yes")
print(0,0)
else:
print("No")
continue
if D%2==1:
if K<=8*(D//2)+4:
print("Yes")
n = (K-1)//8
print(D//2-n, D//2+n)
else:
print("No")
continue
if 1<=K<=4:
print("Yes")
print(D//2,D//2)
elif K<=8*D//2:
n = (K-5)//8
print("Yes")
print(D//2-n-1, D//2+n+1)
else:
print("No")