結果
| 問題 |
No.1619 Coccinellidae
|
| コンテスト | |
| ユーザー |
puzneko
|
| 提出日時 | 2021-11-11 23:07:03 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 200 ms / 2,000 ms |
| コード長 | 528 bytes |
| コンパイル時間 | 131 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 15,616 KB |
| 最終ジャッジ日時 | 2024-11-23 21:35:43 |
| 合計ジャッジ時間 | 3,859 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 16 |
ソースコード
n, m, k = map(int, input().split())
numlist = [i for i in range(n)]
listsum = sum(numlist)
numlist[-1] += m - listsum
ans = [-1 for i in range(n+1)]
lastind = n
for i in range(n):
maxadd = n - i - 1
if maxadd >= k:
ans[k] = numlist[i]
lastind = i + 1
break
else:
ans[maxadd] = numlist[i]
k -= maxadd
last = 0
for i in range(lastind,n):
while ans[last] != -1:
last += 1
ans[last] = numlist[i]
last += 1
for i in range(n):
print("{}".format(ans[i]))
puzneko