結果
問題 |
No.2027 (1, 2, 3, …, N) 's Subset Sum
|
ユーザー |
![]() |
提出日時 | 2022-08-18 00:22:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 209 bytes |
コンパイル時間 | 83 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 17,572 KB |
最終ジャッジ日時 | 2024-10-05 07:05:12 |
合計ジャッジ時間 | 4,026 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | TLE * 1 -- * 24 |
ソースコード
n,s = map(int, input().split()) for i in range(1, 2 ** n): sub = [j+1 for j in range(n) if (i >> j) & 1] if sum(sub) == s: print(len(sub)) print(*sub) break else: print(-1)