結果
| 問題 |
No.115 遠足のおやつ
|
| コンテスト | |
| ユーザー |
takakin
|
| 提出日時 | 2020-05-19 00:49:12 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 5,000 ms |
| コード長 | 284 bytes |
| コンパイル時間 | 371 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,368 KB |
| 最終ジャッジ日時 | 2025-01-03 01:56:39 |
| 合計ジャッジ時間 | 2,793 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 40 |
ソースコード
import sys
input=lambda: sys.stdin.readline().rstrip()
import itertools
n,d,k=map(int,input().split())
r=k-1
A=[]
cur=0
for i in range(1,n+1):
if cur+i+(2*n-r+1)*r//2>=d and n-i>=r:
A.append(i)
r-=1
cur+=i
else:
continue
if len(A)!=k:
print(-1)
else:
print(*A)
takakin