結果

問題 No.1523 +/- Tree
ユーザー hir355hir355
提出日時 2021-05-28 22:20:28
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 318 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 68,224 KB
最終ジャッジ日時 2024-04-25 01:18:57
合計ジャッジ時間 5,053 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,456 KB
testcase_01 AC 41 ms
51,712 KB
testcase_02 AC 41 ms
51,712 KB
testcase_03 AC 41 ms
51,840 KB
testcase_04 AC 42 ms
51,712 KB
testcase_05 AC 40 ms
51,968 KB
testcase_06 AC 42 ms
51,712 KB
testcase_07 AC 40 ms
51,712 KB
testcase_08 AC 40 ms
51,584 KB
testcase_09 AC 41 ms
51,712 KB
testcase_10 AC 42 ms
51,584 KB
testcase_11 AC 40 ms
51,968 KB
testcase_12 AC 66 ms
66,816 KB
testcase_13 AC 67 ms
67,456 KB
testcase_14 AC 67 ms
66,560 KB
testcase_15 AC 50 ms
58,496 KB
testcase_16 AC 67 ms
66,560 KB
testcase_17 AC 40 ms
51,968 KB
testcase_18 AC 69 ms
67,712 KB
testcase_19 AC 40 ms
52,096 KB
testcase_20 AC 40 ms
51,712 KB
testcase_21 AC 41 ms
51,584 KB
testcase_22 AC 40 ms
51,584 KB
testcase_23 AC 40 ms
51,968 KB
testcase_24 AC 41 ms
52,096 KB
testcase_25 AC 70 ms
67,840 KB
testcase_26 AC 60 ms
63,488 KB
testcase_27 AC 69 ms
67,328 KB
testcase_28 AC 70 ms
67,584 KB
testcase_29 AC 53 ms
60,928 KB
testcase_30 AC 56 ms
61,696 KB
testcase_31 AC 68 ms
67,072 KB
testcase_32 AC 40 ms
51,456 KB
testcase_33 AC 69 ms
67,968 KB
testcase_34 AC 59 ms
63,360 KB
testcase_35 AC 67 ms
66,688 KB
testcase_36 AC 60 ms
63,232 KB
testcase_37 AC 61 ms
63,872 KB
testcase_38 AC 48 ms
58,112 KB
testcase_39 AC 65 ms
66,176 KB
testcase_40 AC 69 ms
68,224 KB
testcase_41 AC 68 ms
67,072 KB
testcase_42 AC 41 ms
51,456 KB
testcase_43 AC 70 ms
67,968 KB
testcase_44 AC 69 ms
67,712 KB
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
if (n - 1) % k == 0:
    print('No')
else:
    print('Yes')
    a = [0] * n
    for i in range(k):
        if i > 0:
            a[i] = 10000000
        for j in range(i + k, n, k):
            a[j] = a[j - k] - 1
    for i in range(n - 1):
        print(i + 1, i + 2, a[i + 1] - a[i])
0