結果

問題 No.2493 K-th in L2 with L1
ユーザー MottchanMottchan
提出日時 2023-10-06 22:18:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 606 bytes
コンパイル時間 358 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 72,020 KB
最終ジャッジ日時 2023-10-06 22:18:59
合計ジャッジ時間 1,977 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 88 ms
71,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
# sys.setrecursionlimit(5*10**5)
input = sys.stdin.readline
from collections import defaultdict, deque, Counter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right
from math import gcd

def sol():
    d,k = map(int,input().split())

    if d == 0:
        if k == 1:
            print('Yes')
            print(0,0)
        else:
            print('No')
    elif k > d*4:
        print('No')
    else:
        print('Yes')
        if k <= (d-1)*4:
            print(d//2,int(d/2+0.5))
        else:
            print(0,d)
T = int(input())
for i in range(T):
    sol()
0