結果

問題 No.3211 NAND Oracle
ユーザー titia
提出日時 2025-07-26 00:09:10
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 798 bytes
コンパイル時間 444 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2025-07-26 00:09:18
合計ジャッジ時間 6,471 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

Q,K=map(int,input().split())

if Q==1:
    if K>=2:
        print("Yes")
        print(1,2)
    else:
        print("No")
elif Q==2:
    if K>=3:
        print("Yes")
        print(1,2)
        print(1,2)
    else:
        print("No")
elif Q==3:
    if K>=3:
        print("Yes")
        print(1,2)
        print(1,2)
        print(3,4)
    else:
        print("No")
elif Q==4:
    if K>=4:
        print("Yes")
        print(1,2)
        print(1,2)
        print(3,4)
        print(3,4)
    else:
        print("No")
elif Q>=5:
    if K>=5:
        print("Yes")
        print(1,2)
        print(1,2)
        print(3,4)
        print(4,5)
        print(4,5)

        for i in range(Q-5):
            print(6,7)
    else:
        print("No")
        
        
0