This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<vector> | |
#include<list> | |
#include<cmath> | |
using namespace std; | |
void helper(vector<double>& arr1,int n, vector<double>& arr2, int start, int m, vector<list<double>>& res,bool& isok){ | |
//暴力法:将arr2中的m个数分成n堆,编号0~n-1堆,堆i中数的和等于arr1[i] | |
//对于arr2中的每个数有n中选择,放入哪个堆中,穷举加回溯 |