結果

問題 No.1981 [Cherry 4th Tune N] アルゴリズムが破滅する例
ユーザー rlangevinrlangevin
提出日時 2023-05-21 16:50:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 269 bytes
コンパイル時間 878 ms
コンパイル使用メモリ 86,020 KB
実行使用メモリ 75,640 KB
最終ジャッジ日時 2023-08-23 15:12:27
合計ジャッジ時間 10,756 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
70,812 KB
testcase_01 AC 71 ms
70,432 KB
testcase_02 AC 70 ms
70,920 KB
testcase_03 AC 73 ms
70,556 KB
testcase_04 AC 88 ms
75,572 KB
testcase_05 AC 71 ms
71,064 KB
testcase_06 AC 74 ms
75,104 KB
testcase_07 AC 68 ms
70,948 KB
testcase_08 AC 69 ms
71,008 KB
testcase_09 AC 69 ms
70,840 KB
testcase_10 AC 69 ms
70,760 KB
testcase_11 AC 71 ms
71,064 KB
testcase_12 AC 68 ms
70,944 KB
testcase_13 AC 66 ms
71,092 KB
testcase_14 AC 68 ms
71,140 KB
testcase_15 AC 76 ms
75,620 KB
testcase_16 AC 66 ms
70,868 KB
testcase_17 AC 68 ms
70,996 KB
testcase_18 AC 73 ms
75,008 KB
testcase_19 AC 75 ms
74,712 KB
testcase_20 AC 74 ms
74,572 KB
testcase_21 AC 71 ms
71,004 KB
testcase_22 AC 68 ms
70,948 KB
testcase_23 AC 68 ms
70,872 KB
testcase_24 AC 66 ms
71,136 KB
testcase_25 AC 67 ms
70,872 KB
testcase_26 AC 70 ms
70,796 KB
testcase_27 AC 67 ms
71,048 KB
testcase_28 AC 68 ms
70,844 KB
testcase_29 AC 68 ms
70,820 KB
testcase_30 AC 72 ms
74,712 KB
testcase_31 AC 66 ms
71,044 KB
testcase_32 AC 70 ms
71,136 KB
testcase_33 AC 76 ms
75,008 KB
testcase_34 AC 79 ms
75,460 KB
testcase_35 AC 69 ms
70,584 KB
testcase_36 AC 69 ms
70,764 KB
testcase_37 AC 68 ms
71,044 KB
testcase_38 AC 67 ms
71,004 KB
testcase_39 AC 66 ms
70,768 KB
testcase_40 AC 67 ms
71,052 KB
testcase_41 AC 67 ms
71,088 KB
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 68 ms
71,132 KB
testcase_45 AC 67 ms
70,976 KB
testcase_46 AC 78 ms
75,584 KB
testcase_47 AC 75 ms
74,712 KB
testcase_48 AC 73 ms
74,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
if K < N//2:
    print(-1)
    exit()
    
ans = []
for i in range(K):
    ans.append((i, i))
    
for i in range(K, N):
    ans.append((i, i - K))
    ans.append((i - K, i))
    
print(len(ans))
for a, b in ans:
    print(a + 1, b + 1)
0