結果

問題 No.2493 K-th in L2 with L1
ユーザー hato336hato336
提出日時 2023-10-06 21:33:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 445 bytes
コンパイル時間 446 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 79,068 KB
最終ジャッジ日時 2023-10-06 21:33:03
合計ジャッジ時間 2,033 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #


for _ in range(int(input())):
    d,k = map(int,input().split())
    if d == 0 and k == 1:
        print('Yes')
        print(0,0)
        continue
    z = d * 4
    if k > z:
        print('No')
    else:
        print('Yes')
        ans = []
        x,y = 0,d
        for i in range(d//2+1):
            for j in range(4):
                ans.append((x,y))
            x += 1
            y -= 1
        ans.reverse()
        print(*ans[k-1])
0