-->
当前位置:首页 > 题库

PROGRAMMING:SDUST Java union of string sets

Luz5年前 (2021-05-10)题库549
Receive n English strings (the number of different strings is more than 10) from the keyboard, take 5 different strings from the beginning and put them into one set S1, then take 5 different strings and put them into another set S2, output each string in * * union * * of * * S1 and S2 in * * alphabetical order (string case sensitive)
###Input format:
A line of English strings separated by spaces (the number of different strings is greater than 10).
###Output format:
In alphabetical order (compare the first letter of the string first, compare the second letter of the string with the same initial, and so on), output the string of S1 and S2 Union.
###Input example:
```in
android python java javaee javase database java jsp servlet java algorithm junit
```
###Output example:
```out
algorithm
android
database
java
javaee
javase
jsp
python
servlet
```







answer:If there is no answer, please comment