Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- #define int long long
- int cash = -1e18;
- void rec(int num, int sum, int cnt) {
- if (sum < cash) {
- return;
- }
- if (num == m) {
- return;
- }
- rec(num + 1, sum - 2 * a[num], cnt + 2);
- rec(num + 1, sum - a[num], cnt + 1);
- rec(num + 1, sum, cnt);
- }
- signed main() {
- int n, m;
- cin >> n >> m;
- }
- /*
- 1 1 1 1 1 1
- 2 1 1 1 1
- 2 2 1 1
- 3 2 1
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement