結果
| 問題 |
No.115 遠足のおやつ
|
| コンテスト | |
| ユーザー |
lllllll88938494
|
| 提出日時 | 2022-03-15 12:14:36 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 353 bytes |
| コンパイル時間 | 87 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 14,008 KB |
| 最終ジャッジ日時 | 2024-09-22 04:12:22 |
| 合計ジャッジ時間 | 7,646 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 TLE * 1 -- * 24 |
ソースコード
n,d,k=map(int,input().split())
def cal(x,cnt,total):
if cnt < k-1:
if (d-total)//(k-cnt) >= n:
return
if cnt == k:
if total == d:
print(*x)
exit()
return
for i in range(x[-1]+1,n+1):
cal(x+[i],cnt+1,total+i)
for i in range(1,n+1):
cal([i],1,i)
print(-1)
lllllll88938494