結果

問題 No.1981 [Cherry 4th Tune N] アルゴリズムが破滅する例
ユーザー ikomaikoma
提出日時 2022-06-17 22:56:32
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 1,503 ms
コンパイル使用メモリ 86,676 KB
実行使用メモリ 76,044 KB
最終ジャッジ日時 2023-07-30 14:08:10
合計ジャッジ時間 11,216 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
70,996 KB
testcase_01 AC 67 ms
71,168 KB
testcase_02 AC 68 ms
71,400 KB
testcase_03 AC 72 ms
70,888 KB
testcase_04 AC 84 ms
75,668 KB
testcase_05 AC 72 ms
71,040 KB
testcase_06 AC 73 ms
75,440 KB
testcase_07 AC 69 ms
71,080 KB
testcase_08 AC 69 ms
71,048 KB
testcase_09 AC 69 ms
71,168 KB
testcase_10 AC 70 ms
71,172 KB
testcase_11 AC 72 ms
71,412 KB
testcase_12 AC 69 ms
71,104 KB
testcase_13 AC 70 ms
71,160 KB
testcase_14 AC 70 ms
71,272 KB
testcase_15 AC 76 ms
75,980 KB
testcase_16 AC 69 ms
71,180 KB
testcase_17 AC 69 ms
71,148 KB
testcase_18 AC 73 ms
75,440 KB
testcase_19 AC 72 ms
75,432 KB
testcase_20 AC 73 ms
75,416 KB
testcase_21 AC 70 ms
71,232 KB
testcase_22 AC 68 ms
71,184 KB
testcase_23 AC 68 ms
71,280 KB
testcase_24 AC 72 ms
71,116 KB
testcase_25 AC 69 ms
71,104 KB
testcase_26 AC 70 ms
71,096 KB
testcase_27 AC 70 ms
71,228 KB
testcase_28 AC 68 ms
71,188 KB
testcase_29 AC 67 ms
71,168 KB
testcase_30 AC 72 ms
75,088 KB
testcase_31 AC 67 ms
71,040 KB
testcase_32 AC 69 ms
71,224 KB
testcase_33 AC 74 ms
75,296 KB
testcase_34 AC 76 ms
75,596 KB
testcase_35 AC 69 ms
71,356 KB
testcase_36 AC 72 ms
71,224 KB
testcase_37 AC 71 ms
71,028 KB
testcase_38 AC 68 ms
71,448 KB
testcase_39 AC 68 ms
71,172 KB
testcase_40 AC 67 ms
70,900 KB
testcase_41 AC 70 ms
71,448 KB
testcase_42 AC 69 ms
71,168 KB
testcase_43 AC 69 ms
71,024 KB
testcase_44 AC 69 ms
71,036 KB
testcase_45 AC 68 ms
71,012 KB
testcase_46 AC 84 ms
76,044 KB
testcase_47 AC 76 ms
75,468 KB
testcase_48 AC 76 ms
75,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if K<N-N//2:
    print(-1)
    exit()

edge = []
K = N-K
for i in range(1,K*2,2):
    edge.append((i,i+1))
for i in range(1,N+1):
    edge.append((i,i))

print(len(edge))
for a,b in edge:
    print(a,b)
0