結果
| 問題 | No.2493 K-th in L2 with L1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-06 22:07:02 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 589 bytes |
| 記録 | |
| コンパイル時間 | 255 ms |
| コンパイル使用メモリ | 96,500 KB |
| 実行使用メモリ | 79,104 KB |
| 最終ジャッジ日時 | 2026-08-24 12:54:00 |
| 合計ジャッジ時間 | 1,801 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 WA * 3 |
ソースコード
Q = int(input())
for q 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 * 4 < K:
print("No")
continue
K -= 1
if D % 2 == 0:
if K <= 4:
temp = 0
else:
temp = ((K - 4) // 8) + 1
print("Yes")
print((D // 2) + temp, (D // 2) - temp)
elif D % 2 == 1:
temp = K // 8
print("Yes")
print(D - ((D - 1) - temp), ((D - 1) - temp))