#include #include #include #include using namespace std; int n, m, x, uniq, minA, minB; struct element { int val; int pos; }; stack st; vector frec (1024); vector a; void popStack() { element e = st.top(); a[e.pos] = -100; st.pop(); } int main() { cin >> n >> m; for(int i = 0; i < n; i++) { cin >> x; if(x < minA) minA = x; a.push_back(x); } for(int i = 0; i < n; i++) { int x = a[i] - minA; if(!frec[x]) { frec[x] = 1; uniq++; } else { element e; e.val = x; e.pos = i; st.push(e); } } for(int i = 0; i < m && !st.empty(); i++) { cin >> x; popStack(); } cout << uniq << endl; for(int i = 0; i < n; i++) { if(a[i] != -100) { cout << a[i] << " "; } } return 0; }