1184C1.md (1556B)
1 Source: https://codeforces.com/problemset/problem/1184/C1 2 3 C1. Heidi and the Turing Test (Easy) 4 5 time limit per test 6 7 3 seconds 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 The Cybermen and the Daleks have long been the Doctor's main enemies. Everyone knows that both these species enjoy destroying everything they encounter. However, a little-known fact about them is that they both also love taking Turing tests! 22 23 Heidi designed a series of increasingly difficult tasks for them to spend their time on, which would allow the Doctor enough time to save innocent lives! 24 25 The funny part is that these tasks would be very easy for a human to solve. 26 27 The first task is as follows. There are some points on the plane. All but one of them are on the boundary of an axis-aligned square (its sides are parallel to the axes). Identify that point. 28 29 Input 30 31 The first line contains an integer $n$ ($2 \le n \le 10$). 32 33 Each of the following $4n + 1$ lines contains two integers $x_i, y_i$ ($0 \leq x_i, y_i \leq 50$), describing the coordinates of the next point. 34 35 It is guaranteed that there are at least $n$ points on each side of the square and all $4n + 1$ points are distinct. 36 37 Output 38 39 Print two integers — the coordinates of the point that is not on the boundary of the square. 40 41 Examples 42 43 Input 44 45 ``` 46 2 47 0 0 48 0 1 49 0 2 50 1 0 51 1 1 52 1 2 53 2 0 54 2 1 55 2 2 56 ``` 57 58 Output 59 60 ``` 61 1 1 62 ``` 63 64 Input 65 66 ``` 67 2 68 0 0 69 0 1 70 0 2 71 0 3 72 1 0 73 1 2 74 2 0 75 2 1 76 2 2 77 ``` 78 79 Output 80 81 ``` 82 0 3 83 ``` 84 85 Note 86 87 In both examples, the square has four sides $x=0$, $x=2$, $y=0$, $y=2$.