結果

問題 No.1619 Coccinellidae
ユーザー hir355hir355
提出日時 2021-07-22 21:51:42
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 435 bytes
コンパイル時間 594 ms
コンパイル使用メモリ 87,064 KB
実行使用メモリ 78,460 KB
最終ジャッジ日時 2023-09-24 16:34:17
合計ジャッジ時間 3,786 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
70,980 KB
testcase_01 AC 94 ms
77,744 KB
testcase_02 AC 97 ms
78,436 KB
testcase_03 AC 72 ms
71,180 KB
testcase_04 AC 95 ms
78,432 KB
testcase_05 AC 91 ms
77,852 KB
testcase_06 AC 71 ms
70,984 KB
testcase_07 AC 90 ms
77,900 KB
testcase_08 AC 93 ms
77,864 KB
testcase_09 AC 72 ms
71,144 KB
testcase_10 AC 88 ms
76,916 KB
testcase_11 AC 94 ms
78,108 KB
testcase_12 AC 71 ms
71,152 KB
testcase_13 AC 95 ms
78,024 KB
testcase_14 AC 98 ms
78,460 KB
testcase_15 AC 72 ms
71,184 KB
testcase_16 AC 72 ms
71,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, k = map(int, input().split())
a = list(range(0, n))
a[-1] = m - (n - 2) * (n - 1) // 2
b = [0] * n
for i in range(n - 1, -1, -1):
    if k > i:
        k -= i
        b[n-i-1] = a[i]
    else:
        b[n-k-1] = a[i]
        idx = 0
        for j in range(n-i-1, n-k-1):
            b[j] = idx
            idx += 1
        for j in range(n-k, n):
            b[j] = idx
            idx += 1
        break
for x in b:
    print(x)
0