#K82172. Unique Coordinates
Unique Coordinates
Unique Coordinates
Given several coordinate pairs provided via standard input, each pair consists of two integers separated by a space. Some coordinates may be repeated. Your task is to output a Python-style list of tuples representing the coordinate pairs that appear exactly once in the input. The output must follow the format of a Python list with each unique coordinate pair displayed as a tuple in the form ((x, y)). For example, if the input is:
4 2
2 1
1 1
2 1
2 2
2 1
the output should be:
[(4, 2), (1, 1), (2, 2)]
If no coordinate appears exactly once, output an empty list, i.e. []
.
inputFormat
Standard input consists of one or more lines. Each line contains exactly two integers separated by a single space, representing the x and y coordinates.
outputFormat
Print a Python-style list of tuples representing unique coordinates that appear only once in the input. Tuples should be formatted as ((x, y)). If no unique coordinates exist, print an empty list: []
.## sample
4 2
[(4, 2)]