結果

問題 No.1619 Coccinellidae
ユーザー だれだれ
提出日時 2021-07-21 20:54:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 82,384 KB
最終ジャッジ日時 2023-09-24 15:10:01
合計ジャッジ時間 3,471 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,356 KB
testcase_01 AC 98 ms
80,948 KB
testcase_02 AC 107 ms
82,384 KB
testcase_03 AC 74 ms
71,044 KB
testcase_04 AC 102 ms
82,204 KB
testcase_05 AC 103 ms
80,300 KB
testcase_06 AC 76 ms
71,104 KB
testcase_07 AC 98 ms
80,164 KB
testcase_08 AC 98 ms
79,888 KB
testcase_09 AC 71 ms
71,208 KB
testcase_10 AC 91 ms
78,488 KB
testcase_11 AC 101 ms
80,636 KB
testcase_12 AC 73 ms
71,164 KB
testcase_13 AC 99 ms
82,096 KB
testcase_14 AC 102 ms
82,212 KB
testcase_15 AC 68 ms
70,928 KB
testcase_16 AC 69 ms
71,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, k = map(int, input().split())
now = 0

v = [1] * n
a = [-1] * n

for i in range(n - 1, -1, -1):
    if k >= i:
        a[now] = i
        now += 1
        v[i] = 0
        k -= i

for i in range(n):
    if v[i]:
        a[now] = i
        now += 1
    if a[i] == n - 1:
        a[i] += m - n * (n - 1) // 2

print(*a, sep = "\n")
0