結果

問題 No.1981 [Cherry 4th Tune N] アルゴリズムが破滅する例
ユーザー mkawa2mkawa2
提出日時 2022-06-17 21:51:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 997 bytes
コンパイル時間 399 ms
コンパイル使用メモリ 82,316 KB
実行使用メモリ 63,388 KB
最終ジャッジ日時 2024-04-17 13:34:34
合計ジャッジ時間 6,242 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 44 ms
51,840 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 43 ms
52,096 KB
testcase_08 AC 44 ms
52,096 KB
testcase_09 AC 45 ms
52,096 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 43 ms
51,968 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 43 ms
52,096 KB
testcase_17 AC 43 ms
51,840 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 42 ms
52,096 KB
testcase_23 AC 42 ms
51,840 KB
testcase_24 AC 42 ms
51,968 KB
testcase_25 AC 43 ms
52,096 KB
testcase_26 WA -
testcase_27 AC 42 ms
52,220 KB
testcase_28 AC 41 ms
51,968 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 40 ms
51,840 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 42 ms
51,840 KB
testcase_39 AC 43 ms
51,840 KB
testcase_40 AC 41 ms
52,096 KB
testcase_41 AC 46 ms
52,096 KB
testcase_42 AC 46 ms
51,840 KB
testcase_43 AC 44 ms
51,840 KB
testcase_44 WA -
testcase_45 AC 42 ms
52,096 KB
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

# sys.setrecursionlimit(200005)
int1 = lambda x: int(x)-1
pDB = lambda *x: print(*x, end="\n", file=sys.stderr)
p2D = lambda x: print(*x, sep="\n", end="\n\n", file=sys.stderr)
def II(): return int(sys.stdin.readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LF(): return list(map(float, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def SI(): return sys.stdin.readline().rstrip()
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]
inf = (1 << 63)-1
# inf = (1 << 31)-1
# md = 10**9+7
md = 998244353

n, k = LI()

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

ans=[]
for i in range(n-k):
    ans.append((i*2,i*2+n+1))
for i in range(n):
    ans.append((i,i+n))

print(len(ans))
for i,j in ans:
    print(i+1,j+1)
0