結果

問題 No.630 門松グラフ
ユーザー convexineqconvexineq
提出日時 2021-03-03 18:41:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 329 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 82,604 KB
実行使用メモリ 77,892 KB
最終ジャッジ日時 2024-04-14 10:30:44
合計ジャッジ時間 7,396 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 37 ms
52,004 KB
testcase_02 AC 36 ms
52,548 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 37 ms
53,220 KB
testcase_06 AC 42 ms
52,428 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 37 ms
52,692 KB
testcase_10 AC 37 ms
53,504 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 37 ms
52,340 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 37 ms
52,344 KB
testcase_22 WA -
testcase_23 AC 37 ms
52,980 KB
testcase_24 WA -
testcase_25 AC 37 ms
51,892 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
if m+1 < n or n//2*(n-n//2) < m:
    print("NO")
    exit()
print("YES")
a = list(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