結果

問題 No.1981 [Cherry 4th Tune N] アルゴリズムが破滅する例
ユーザー shobonvipshobonvip
提出日時 2022-06-17 22:32:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 302 ms
コンパイル使用メモリ 82,108 KB
実行使用メモリ 63,992 KB
最終ジャッジ日時 2024-04-17 14:46:01
合計ジャッジ時間 5,079 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
52,620 KB
testcase_01 AC 31 ms
53,748 KB
testcase_02 AC 30 ms
52,488 KB
testcase_03 AC 33 ms
54,244 KB
testcase_04 AC 39 ms
63,088 KB
testcase_05 AC 39 ms
61,524 KB
testcase_06 AC 39 ms
61,696 KB
testcase_07 AC 30 ms
52,200 KB
testcase_08 AC 29 ms
53,776 KB
testcase_09 AC 31 ms
52,804 KB
testcase_10 AC 37 ms
59,600 KB
testcase_11 AC 33 ms
54,676 KB
testcase_12 AC 31 ms
52,664 KB
testcase_13 AC 31 ms
52,404 KB
testcase_14 AC 31 ms
53,032 KB
testcase_15 AC 41 ms
62,812 KB
testcase_16 AC 31 ms
52,396 KB
testcase_17 AC 30 ms
51,876 KB
testcase_18 AC 41 ms
62,988 KB
testcase_19 AC 40 ms
61,760 KB
testcase_20 AC 42 ms
62,460 KB
testcase_21 AC 33 ms
53,500 KB
testcase_22 AC 30 ms
53,196 KB
testcase_23 AC 30 ms
53,224 KB
testcase_24 AC 31 ms
51,944 KB
testcase_25 AC 30 ms
52,488 KB
testcase_26 AC 36 ms
53,228 KB
testcase_27 AC 32 ms
52,484 KB
testcase_28 AC 29 ms
52,536 KB
testcase_29 AC 30 ms
52,188 KB
testcase_30 AC 40 ms
61,908 KB
testcase_31 AC 32 ms
52,580 KB
testcase_32 AC 36 ms
53,988 KB
testcase_33 AC 35 ms
59,876 KB
testcase_34 AC 41 ms
62,432 KB
testcase_35 AC 35 ms
54,092 KB
testcase_36 AC 34 ms
53,132 KB
testcase_37 AC 33 ms
53,984 KB
testcase_38 AC 31 ms
52,120 KB
testcase_39 AC 30 ms
52,332 KB
testcase_40 AC 29 ms
51,876 KB
testcase_41 AC 30 ms
52,252 KB
testcase_42 AC 29 ms
52,548 KB
testcase_43 AC 30 ms
52,936 KB
testcase_44 AC 31 ms
51,872 KB
testcase_45 AC 30 ms
53,216 KB
testcase_46 AC 40 ms
63,992 KB
testcase_47 AC 43 ms
63,856 KB
testcase_48 AC 39 ms
60,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
if 2*k < n:
	print(-1)
	exit()
else:
	ret = []
	for i in range(k):
		ret.append((i+1, n-k+i+1))
	if k != n:
		for i in range(n):
			ret.append((i+1, i+1))
	print(len(ret))
	for i,j in ret:
		print(i,j)
0