用 STL 中的 list 实现交并差运算
#include <iostream>
#include <list>
using namespace std;
void printList(const list<int>&L)
{
for(list<int>::const_iterator it = L.begin(); it != L.end(); it++)
{
cout << *it << " ";
}
cout << endl;
}
void CreatListA(list<int>&L,int m)
{
list<int> La;
for (int i = 0; i < m; i++)
{
int j;
cin >> j;
L.push_back(j);
}
}
void CreatListB(list<int>&L,int n)
{
for (int i = 0; i < n; i++)
{
int j;
cin >> j;
L.push_back(j);
}