codeforces-scrape

Codeforces scraped problems and editorials
git clone git://git.laack.co/codeforces-scrape.git
Log | Files | Refs | README

683C.md (993B)


      1 Source: https://codeforces.com/problemset/problem/683/C
      2 
      3 C. Symmetric Difference
      4 
      5 time limit per test
      6 
      7 1 second
      8 
      9 memory limit per test
     10 
     11 256 megabytes
     12 
     13 input
     14 
     15 standard input
     16 
     17 output
     18 
     19 standard output
     20 
     21 You are given two sets of numbers. Your task is to print all numbers from the sets, that both sets don't contain simultaneously.
     22 
     23 Input
     24 
     25 The first line contains the description of the first set, the second line contains the description of the second set. Each description begins with the number of elements in this set. All elements of the set follow in the arbitrary order. In each set all elements are distinct and both sets are not empty. The number of elements in each set doesn't exceed 1000. All elements of the sets are integers from -1000 to 1000.
     26 
     27 Output
     28 
     29 Print the number of the required numbers and then the numbers themselves separated by a space.
     30 
     31 Examples
     32 
     33 Input
     34 
     35 ```
     36 3 1 2 3  
     37 3 2 3 4
     38 ```
     39 
     40 Output
     41 
     42 ```
     43 2 1 4
     44 ```
     45 
     46 Input
     47 
     48 ```
     49 5 1 4 8 9 10  
     50 4 1 2 8 10
     51 ```
     52 
     53 Output
     54 
     55 ```
     56 3 2 4 9
     57 ```