結果
| 問題 |
No.3030 Kruskal-Katona
|
| コンテスト | |
| ユーザー |
Today03
|
| 提出日時 | 2025-02-21 22:07:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 319 bytes |
| コンパイル時間 | 632 ms |
| コンパイル使用メモリ | 82,600 KB |
| 実行使用メモリ | 82,764 KB |
| 最終ジャッジ日時 | 2025-02-21 22:07:51 |
| 合計ジャッジ時間 | 21,117 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 1 TLE * 2 -- * 10 |
ソースコード
def binom(n,k): if k<0 or k>n:return 0 if k>n-k:k=n-k ret=1 for i in range(k): ret=ret*(n-i)//(i+1) return ret N,I=map(int,input().split()) ans=[] sum=0 tmp=I for n in reversed(range(1,I+100000)): now=binom(n,tmp) if sum+now<=N: sum+=now ans.append(n) tmp-=1 if sum==N or tmp==0:break print(*ans)
Today03