結果

問題 No.1619 Coccinellidae
ユーザー aaaaaaaaaa2230
提出日時 2021-07-22 22:56:54
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 433 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 82,100 KB
実行使用メモリ 326,956 KB
最終ジャッジ日時 2024-07-17 19:27:43
合計ジャッジ時間 3,818 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other TLE * 1 -- * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
n,m,k = map(int,input().split())
ans = [i for i in range(n-1)]
ans.append(m-sum(ans))
ans2 = deque(ans)

now = 0
while True:
    if n-1-now <= k:
        ans2.appendleft(ans2.pop())
        k -= n-1-now
        now += 1
    else:
        ans = []
        for i in range(n):
            ans.append(ans2.popleft())
        ans.insert(-k,ans.pop())
        for i in ans:
            print(i)
        exit()
0