cf/mirror

Merging the Sets

CF
2146B1100· newbie1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
3 2
2 1 2
1 1
1 2
4 10
3 1 2 3
2 4 5
1 6
4 7 8 9 10
2 5
4 1 2 3 4
4 1 2 3 4
5 5
5 1 2 3 4 5
5 1 2 3 4 5
5 1 2 3 4 5
5 1 2 3 4 5
5 1 2 3 4 5
5 10
4 1 2 3 4
5 1 2 5 6 7
5 2 6 7 8 9
4 6 7 8 9
2 9 10
5 5
1 1
1 2
1 3
2 4 5
1 5
Output
YES
NO
NO
YES
YES
NO
2146B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)