Home > Back-end >  The intersection of the two order table set (no duplicate elements in the table), in one order and o
The intersection of the two order table set (no duplicate elements in the table), in one order and o

Time:10-03

[form] input

The number of elements in the table 1

The element

The number of elements in the table 2

The element

[] output form

CodePudding user response:

 

//what I use c + +, do not know right (I am also a novice)
# include
# include
using namespace std;
Int main () {
String a, b;
Cin> a> b;
for (int i=0; i<=a.s considering (); I++) {
For (int j=0; j<=b.s considering (); J++) {
If (a [I]==b [j]) {
coutB [I]='~';
continue;
}
}
}
return 0;
}
  • Related