結果

問題 No.630 門松グラフ
ユーザー convexineqconvexineq
提出日時 2021-03-03 18:44:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 125 ms / 1,500 ms
コード長 327 bytes
コンパイル時間 358 ms
コンパイル使用メモリ 82,496 KB
実行使用メモリ 80,728 KB
最終ジャッジ日時 2024-04-14 10:33:05
合計ジャッジ時間 5,407 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,708 KB
testcase_01 AC 39 ms
53,356 KB
testcase_02 AC 39 ms
53,596 KB
testcase_03 AC 42 ms
52,216 KB
testcase_04 AC 39 ms
52,812 KB
testcase_05 AC 42 ms
53,152 KB
testcase_06 AC 41 ms
54,024 KB
testcase_07 AC 39 ms
52,068 KB
testcase_08 AC 41 ms
52,276 KB
testcase_09 AC 40 ms
52,304 KB
testcase_10 AC 50 ms
52,204 KB
testcase_11 AC 40 ms
52,692 KB
testcase_12 AC 40 ms
53,300 KB
testcase_13 AC 41 ms
52,616 KB
testcase_14 AC 39 ms
51,816 KB
testcase_15 AC 39 ms
53,008 KB
testcase_16 AC 39 ms
52,556 KB
testcase_17 AC 40 ms
51,944 KB
testcase_18 AC 39 ms
52,432 KB
testcase_19 AC 40 ms
52,616 KB
testcase_20 AC 125 ms
80,356 KB
testcase_21 AC 39 ms
52,516 KB
testcase_22 AC 125 ms
80,728 KB
testcase_23 AC 40 ms
52,012 KB
testcase_24 AC 104 ms
76,712 KB
testcase_25 AC 39 ms
52,136 KB
testcase_26 AC 110 ms
76,660 KB
testcase_27 AC 102 ms
76,656 KB
testcase_28 AC 124 ms
79,872 KB
testcase_29 AC 116 ms
79,828 KB
testcase_30 AC 115 ms
77,580 KB
testcase_31 AC 113 ms
77,900 KB
testcase_32 AC 97 ms
77,624 KB
testcase_33 AC 97 ms
76,636 KB
testcase_34 AC 113 ms
77,628 KB
testcase_35 AC 97 ms
76,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
if m+1 < n or n//2*(n-n//2) < m:
    print("NO")
    exit()
print("YES")
print(*range(1,n+1))
for i in range(n//2):
    print(i+1,n//2+1)
    m -= 1
while True:
    for i in range(n//2):
        for j in range(n//2+1,n):
            if m == 0: exit()
            print(i+1,j+1)
            m -= 1
0