結果

問題 No.1981 [Cherry 4th Tune N] アルゴリズムが破滅する例
ユーザー 👑 rin204rin204
提出日時 2022-06-24 16:12:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 311 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 82,520 KB
実行使用メモリ 63,972 KB
最終ジャッジ日時 2024-04-25 21:54:13
合計ジャッジ時間 6,113 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,096 KB
testcase_01 AC 38 ms
53,264 KB
testcase_02 AC 35 ms
53,144 KB
testcase_03 AC 38 ms
53,708 KB
testcase_04 AC 44 ms
62,312 KB
testcase_05 AC 42 ms
61,308 KB
testcase_06 AC 44 ms
61,728 KB
testcase_07 AC 36 ms
52,952 KB
testcase_08 AC 36 ms
53,260 KB
testcase_09 AC 36 ms
52,488 KB
testcase_10 AC 42 ms
58,640 KB
testcase_11 AC 38 ms
53,664 KB
testcase_12 AC 35 ms
53,672 KB
testcase_13 AC 35 ms
52,540 KB
testcase_14 AC 36 ms
52,900 KB
testcase_15 AC 48 ms
63,972 KB
testcase_16 AC 36 ms
52,628 KB
testcase_17 AC 36 ms
52,952 KB
testcase_18 AC 48 ms
62,828 KB
testcase_19 AC 45 ms
61,912 KB
testcase_20 AC 45 ms
61,628 KB
testcase_21 AC 39 ms
55,028 KB
testcase_22 AC 35 ms
52,340 KB
testcase_23 AC 35 ms
53,004 KB
testcase_24 AC 35 ms
52,816 KB
testcase_25 AC 35 ms
53,008 KB
testcase_26 AC 37 ms
53,940 KB
testcase_27 AC 36 ms
52,856 KB
testcase_28 AC 35 ms
53,620 KB
testcase_29 AC 35 ms
53,488 KB
testcase_30 AC 44 ms
60,908 KB
testcase_31 AC 36 ms
52,688 KB
testcase_32 AC 40 ms
54,376 KB
testcase_33 AC 43 ms
58,872 KB
testcase_34 AC 47 ms
62,708 KB
testcase_35 AC 38 ms
52,756 KB
testcase_36 AC 39 ms
54,396 KB
testcase_37 AC 39 ms
54,172 KB
testcase_38 AC 38 ms
52,636 KB
testcase_39 AC 35 ms
52,568 KB
testcase_40 AC 36 ms
52,696 KB
testcase_41 AC 34 ms
53,216 KB
testcase_42 AC 36 ms
53,552 KB
testcase_43 AC 34 ms
53,212 KB
testcase_44 WA -
testcase_45 AC 36 ms
52,592 KB
testcase_46 AC 47 ms
63,552 KB
testcase_47 AC 48 ms
63,196 KB
testcase_48 AC 50 ms
63,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
if n == 1:
    if k == 0:
        print(-1)
    else:
        print(1, 1)
    exit()

if 2 * k < n:
    print(-1)
    exit()

print(n + k)
for i in range(1, k + 1):
    print(i, i)
j = 1 + n // 2
for i in range(1, n + 1):
    print(i, j)
    j += 1
    if j > n:
        j -= n
0