結果

問題 No.1619 Coccinellidae
ユーザー keijakkeijak
提出日時 2021-07-23 19:27:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 396 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 10,916 KB
実行使用メモリ 14,636 KB
最終ジャッジ日時 2023-09-25 18:29:58
合計ジャッジ時間 2,937 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,752 KB
testcase_01 AC 86 ms
13,180 KB
testcase_02 AC 95 ms
14,560 KB
testcase_03 AC 15 ms
7,896 KB
testcase_04 AC 114 ms
14,636 KB
testcase_05 AC 58 ms
11,996 KB
testcase_06 AC 16 ms
7,892 KB
testcase_07 AC 71 ms
12,084 KB
testcase_08 AC 65 ms
11,820 KB
testcase_09 AC 15 ms
7,980 KB
testcase_10 AC 63 ms
11,432 KB
testcase_11 AC 78 ms
12,712 KB
testcase_12 AC 16 ms
7,800 KB
testcase_13 AC 104 ms
14,236 KB
testcase_14 AC 89 ms
14,472 KB
testcase_15 AC 16 ms
7,804 KB
testcase_16 AC 15 ms
7,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, k = map(int, input().split())
a = [-1 for i in range(n)]

r = n
for i in range(n):
    r = n - 1 - i
    if k <= r:
        p = (n-1) - k
        a[p] = r
        break
    a[i] = r
    k -= r

cur = 0
for i in range(n):
    if a[i] != -1:
        continue
    a[i] = cur
    cur += 1

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

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