大家帮我看看求两个集合并集的算法?#include using namespace std;int main(void){double a[100],b[100],c[200];int l=0,g=0;cout

来源:学生作业帮助网 编辑:作业帮 时间:2024/08/07 07:59:39
大家帮我看看求两个集合并集的算法?#include using namespace std;int main(void){double a[100],b[100],c[200];int l=0,g=0;cout
xSj@رP"Y #,AuAWӴMRPE)8?տnBhv̜=3<'?oEoo^ _?0@jj B]4٪^ݨ6ڨ dFkjۨE͍B YsItLu,н I2)@ ,oKa]|tuNG>}K|iL߱UO!/QPMa=_wq<ݠW>~].e3tDx;ɔ2@k|>|uƼ5-7*N7Zc =\l>CuP8b.23-ק&AW"!(HLhlD-M"B"`xA5,ɔ,VP:hjyl33%[z>HyRhtS5o&WI‘ɯ&2

大家帮我看看求两个集合并集的算法?#include using namespace std;int main(void){double a[100],b[100],c[200];int l=0,g=0;cout
大家帮我看看求两个集合并集的算法?
#include
using namespace std;
int main(void)
{double a[100],b[100],c[200];
int l=0,g=0;
cout

大家帮我看看求两个集合并集的算法?#include using namespace std;int main(void){double a[100],b[100],c[200];int l=0,g=0;cout
不是演着你的思路,不过是挺好的一个算法,上算法课时候的练习,你可以看一下
/*----------------------------------------------
先对两个集合A,B排序,这样集合的运算会很方便
求A-B,A交B,A并B
----------------------------------------------*/
#include
#include
#include
using namespace std;
#define n 4
#define m 6
#define max 12
void sort(int c[],int num)
{
for(int i =0; i < num; i++)
{
int temp = c[i];
for (int j = i-1; j >= 0; j--)
{
if(c[j] > temp) c[j+1] = c[j];
else break;
}
c[j+1] = temp;
}
}
void print_array(int a[],int num)
{
for(int i = 0; i < num ;i++)
cout